netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC net-next 00/16] net: add negotiation of in-band capabilities
@ 2024-11-26  9:23 Russell King (Oracle)
  2024-11-26  9:24 ` [PATCH RFC net-next 01/16] net: phylink: pass phylink and pcs into phylink_pcs_neg_mode() Russell King (Oracle)
                   ` (15 more replies)
  0 siblings, 16 replies; 32+ messages in thread
From: Russell King (Oracle) @ 2024-11-26  9:23 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit
  Cc: Alexander Couzens, Andrew Lunn, AngeloGioacchino Del Regno,
	Broadcom internal kernel review list, Daniel Golle,
	David S. Miller, Eric Dumazet, Florian Fainelli, Ioana Ciornei,
	Jakub Kicinski, Jose Abreu, linux-arm-kernel, linux-mediatek,
	Marcin Wojtas, Matthias Brugger, netdev, Paolo Abeni

Hi,

Yes, this is one patch over the limit of 15 for netdev - but I think it's
important to include the last patch to head off review comments like "why
don't you remove phylink_phy_no_inband() in this series?"

Phylink's handling of in-band has been deficient for a long time, and
people keep hitting problems with it. Notably, situations with the way-
to-late standardized 2500Base-X and whether that should or should not
have in-band enabled. We have also been carrying a hack in the form of
phylink_phy_no_inband() for a PHY that has been used on a SFP module,
but has no in-band capabilities, not even for SGMII.

When phylink is trying to operate in in-band mode, this series will look
at the capabilities of the MAC-side PCS and PHY, and work out whether
in-band can or should be used, programming the PHY as appropriate. This
includes in-band bypass mode at the PHY.

We don't... yet... support that on the MAC side PCS, because that
requires yet more complexity.

Patch 1 passes struct phylink and struct phylink_pcs into
phylink_pcs_neg_mode() so we can look at more state in this function in
a future patch.

Patch 2 splits "cur_link_an_mode" (the MLO_AN_* mode) into two separate
purposes - a requested and an active mode. The active mode is the one
we will be using for the MAC, which becomes dependent on the result of
in-band negotiation.

Patch 3 adds debug to phylink_major_config() so we can see what is going
on with the requested and active AN modes.

Patch 4 adds to phylib a method to get the in-band capabilities of the
PHY from phylib. Patches 5 and 6 add implementations for BCM84881 and
some Marvell PHYs found on SFPs.

Patch 7 adds to phylib a method to configure the PHY in-band signalling,
and patch 8 implements it for those Marvell PHYs that support the method
in patch 4.

Patch 9 does the same as patch 4 but for the MAC-side PCS, with patches
10 through 14 adding support to several PCS.

Patch 15 adds the code to phylink_pcs_neg_mode() which looks at the
capabilities, and works out whether to use in-band or out-band mode for
driving the link between the MAC PCS and PHY.

Patch 16 removes the phylink_phy_no_inband() hack now that we are
publishing the in-band capabilities from the BCM84881 PHY driver.

 drivers/net/ethernet/marvell/mvneta.c           |  27 +-
 drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c |  25 +-
 drivers/net/pcs/pcs-lynx.c                      |  22 ++
 drivers/net/pcs/pcs-mtk-lynxi.c                 |  16 ++
 drivers/net/pcs/pcs-xpcs.c                      |  28 ++
 drivers/net/phy/bcm84881.c                      |  10 +
 drivers/net/phy/marvell.c                       |  48 ++++
 drivers/net/phy/phy.c                           |  52 ++++
 drivers/net/phy/phylink.c                       | 352 +++++++++++++++++++-----
 include/linux/phy.h                             |  34 +++
 include/linux/phylink.h                         |  17 ++
 11 files changed, 539 insertions(+), 92 deletions(-)

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

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

end of thread, other threads:[~2024-11-27 14:08 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-26  9:23 [PATCH RFC net-next 00/16] net: add negotiation of in-band capabilities Russell King (Oracle)
2024-11-26  9:24 ` [PATCH RFC net-next 01/16] net: phylink: pass phylink and pcs into phylink_pcs_neg_mode() Russell King (Oracle)
2024-11-26 20:01   ` Andrew Lunn
2024-11-26  9:24 ` [PATCH RFC net-next 02/16] net: phylink: split cur_link_an_mode into requested and active Russell King (Oracle)
2024-11-26 20:02   ` Andrew Lunn
2024-11-26  9:24 ` [PATCH RFC net-next 03/16] net: phylink: add debug for phylink_major_config() Russell King (Oracle)
2024-11-26 20:03   ` Andrew Lunn
2024-11-26  9:24 ` [PATCH RFC net-next 04/16] net: phy: add phy_inband_caps() Russell King (Oracle)
2024-11-26 20:56   ` Andrew Lunn
2024-11-26  9:24 ` [PATCH RFC net-next 05/16] net: phy: bcm84881: implement phy_inband_caps() method Russell King (Oracle)
2024-11-26 20:57   ` Andrew Lunn
2024-11-26  9:24 ` [PATCH RFC net-next 06/16] net: phy: marvell: " Russell King (Oracle)
2024-11-26 20:58   ` Andrew Lunn
2024-11-26  9:24 ` [PATCH RFC net-next 07/16] net: phy: add phy_config_inband() Russell King (Oracle)
2024-11-26 21:00   ` Andrew Lunn
2024-11-26  9:24 ` [PATCH RFC net-next 08/16] net: phy: marvell: implement config_inband() method Russell King (Oracle)
2024-11-26 21:00   ` Andrew Lunn
2024-11-26  9:25 ` [PATCH RFC net-next 09/16] net: phylink: add pcs_inband_caps() method Russell King (Oracle)
2024-11-26 21:05   ` Andrew Lunn
2024-11-26  9:25 ` [PATCH RFC net-next 10/16] net: mvneta: implement " Russell King (Oracle)
2024-11-26 21:06   ` Andrew Lunn
2024-11-26  9:25 ` [PATCH RFC net-next 11/16] net: mvpp2: " Russell King (Oracle)
2024-11-26 21:07   ` Andrew Lunn
2024-11-26  9:25 ` [PATCH RFC net-next 12/16] net: pcs: pcs-lynx: " Russell King (Oracle)
2024-11-27 14:08   ` Maxime Chevallier
2024-11-26  9:25 ` [PATCH RFC net-next 13/16] net: pcs: pcs-mtk-lynxi: " Russell King (Oracle)
2024-11-26  9:25 ` [PATCH RFC net-next 14/16] net: pcs: xpcs: " Russell King (Oracle)
2024-11-26  9:25 ` [PATCH RFC net-next 15/16] net: phylink: add negotiation of in-band capabilities Russell King (Oracle)
2024-11-26 21:18   ` Andrew Lunn
2024-11-26 21:43     ` Russell King (Oracle)
2024-11-26  9:25 ` [PATCH RFC net-next 16/16] net: phylink: remove phylink_phy_no_inband() Russell King (Oracle)
2024-11-26 21:19   ` Andrew Lunn

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).