netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mv88e6xxx: 2500base-x inband AN is broken on Amethyst? what to do?
@ 2021-01-13  0:18 Marek Behún
  2021-01-13  4:22 ` Marek Behun
  2021-01-13 10:28 ` Russell King - ARM Linux admin
  0 siblings, 2 replies; 8+ messages in thread
From: Marek Behún @ 2021-01-13  0:18 UTC (permalink / raw)
  To: Russell King - ARM Linux admin, andrew; +Cc: netdev, olteanv, pavana.sharma

Hello,

it seems that inband AN is broken on Amethyst when on 2500base-x mode.

Even SERDES scripts for Amethyst from Marvell has autonegotiation
disabled for 2500base-x mode. For all the other supported Serdes modes
autonegotiation is enabled in these scripts.

The current implementation in mv88e6390_serdes_pcs_config() enables
autonegotiation if phylink_autoneg_inband(mode) is true:

  if (phylink_autoneg_inband(mode))
    bmcr = val | BMCR_ANENABLE;
  else
    bmcr = val & ~BMCR_ANENABLE;

But for PHY_INTERFACE_MODE_2500BASEX this is broken on Amethyst. The
2500base-x mode seems to work only with autoneg disabled.

The result is that when I connect via a passive SFP cable Amethyst
serdes port with a Peridot serdes port, they will not link. If I
disable autonegotiation on both sides, they will link, though.

What is strange is that if I don't use Peridot, but connect the SFP
directly to Serdes on Armada 3720, where the mvneta driver also enables
autonegotiation for 2500base-x mode, they will link even if Amethyst
does not enable 2500base-x.

To summarize:
	Amethyst  <->	Peridot
	AN -		AN -		works
	AN -		AN +		does not work

	Amethyst  <->	Armada 3720 serdes
	AN -		AN +		works

(It is possible that Marvell may find some workaround by touch some
 undocumented registers, to solve this. I will try to open a bug
 report.)

Should we just print an error in the serdes_pcs_config method if inband
autonegotiation is being requested?

phylink's code currently allows connecting SFPs in non MLO_AN_INBAND
mode only for when there is Broadcom BCM84881 PHY inside the SFP (by
method phylink_phy_no_inband() in phylink.c).

I wonder whether we can somehow in a sane way implement code to inform
phylink from the mv88e6xxx driver that inband is not supported for the
specific mode. Maybe the .mac_config/.pcs_config method could return an
error indicating this? Or the mv88e6xxx driver can just print an error
that the mode is not supported, and try to ask the user to disable AN?
That would need implementing this in ethtool for SFP, though.

What do you guys think?

Marek

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-01-14  2:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-13  0:18 mv88e6xxx: 2500base-x inband AN is broken on Amethyst? what to do? Marek Behún
2021-01-13  4:22 ` Marek Behun
2021-01-13 10:28 ` Russell King - ARM Linux admin
2021-01-13 17:03   ` Marek Behún
2021-01-13 20:08   ` Marek Behún
2021-01-13 21:21     ` Russell King - ARM Linux admin
2021-01-13 21:37       ` Marek Behún
2021-01-13 21:48         ` Russell King - ARM Linux admin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).