linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/5] net: stmmac: provide platform select_pcs method
@ 2024-06-13 10:35 Russell King (Oracle)
  2024-06-13 10:36 ` [PATCH net-next v2 1/5] net: stmmac: add select_pcs() platform method Russell King (Oracle)
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Russell King (Oracle) @ 2024-06-13 10:35 UTC (permalink / raw)
  To: Serge Semin
  Cc: Alexandre Torgue, Andrew Halaney, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Jose Abreu, linux-arm-kernel, linux-stm32,
	Maxime Coquelin, netdev, Paolo Abeni, Romain Gantois

Hi,

This series adds a select_pcs() method to the stmmac platform data to
allow platforms that need to provide their own PCSes to do so, moving
the decision making into platform code.

This avoids questions such as "what should the priority of XPCS vs
some other platform PCS be?" and when we provide a PCS for the
internal PCS, how that interacts with both the XPCS and platform
provided PCS.

Note that if a platform implements the select_pcs() method, then the
return values are:
- a phylink_pcs pointer - the PCS to be used.
- NULL - no phylink_pcs to be used.
Otherwise (if not implemented or returns an error-pointer), then
allow the the stmmac internal PCS to be used if appropriate (once
that patch set is merged.)

Patch 1 introduces the new method.
Patch 2 converts Intel mGBE to use this to provide the XPCS and
 removes the XPCS decision making from core code.
Patch 3 provides an implementation for rzn1 to return its PCS.
Patch 4 does the same for socfpga.
Patch 5 removes the core code returning priv->hw->phylink_pcs.

No functional change is anticipated. Once this has been merged, it
will be expected that platforms should populate all three PCS
methods or none of the PCS methods.

v1->v2:
- Fix build error in patch 2.
- Add attributations from Romain Gantois.

 drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c   | 11 +++++++++++
 drivers/net/ethernet/stmicro/stmmac/dwmac-rzn1.c    |  7 +++++++
 drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c |  7 +++++++
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c   | 10 +++++++---
 include/linux/stmmac.h                              |  4 +++-
 5 files changed, 35 insertions(+), 4 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] 9+ messages in thread

end of thread, other threads:[~2024-06-15  2:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-13 10:35 [PATCH net-next v2 0/5] net: stmmac: provide platform select_pcs method Russell King (Oracle)
2024-06-13 10:36 ` [PATCH net-next v2 1/5] net: stmmac: add select_pcs() platform method Russell King (Oracle)
2024-06-14 16:38   ` Serge Semin
2024-06-14 17:21     ` Russell King (Oracle)
2024-06-13 10:36 ` [PATCH net-next v2 2/5] net: stmmac: dwmac-intel: provide a select_pcs() implementation Russell King (Oracle)
2024-06-13 10:36 ` [PATCH net-next v2 3/5] net: stmmac: dwmac-rzn1: provide " Russell King (Oracle)
2024-06-13 10:36 ` [PATCH net-next v2 4/5] net: stmmac: dwmac-socfpga: " Russell King (Oracle)
2024-06-13 10:36 ` [PATCH net-next v2 5/5] net: stmmac: clean up stmmac_mac_select_pcs() Russell King (Oracle)
2024-06-15  2:10 ` [PATCH net-next v2 0/5] net: stmmac: provide platform select_pcs method patchwork-bot+netdevbpf

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