mbox series

[net-next,v2,0/5] net: stmmac: provide platform select_pcs method

Message ID ZmrLbdwv6ALoy+gs@shell.armlinux.org.uk (mailing list archive)
Headers show
Series net: stmmac: provide platform select_pcs method | expand

Message

Russell King (Oracle) June 13, 2024, 10:35 a.m. UTC
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(-)

Comments

patchwork-bot+netdevbpf@kernel.org June 15, 2024, 2:10 a.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 13 Jun 2024 11:35:25 +0100 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - [net-next,v2,1/5] net: stmmac: add select_pcs() platform method
    https://git.kernel.org/netdev/net-next/c/6c3282a6b296
  - [net-next,v2,2/5] net: stmmac: dwmac-intel: provide a select_pcs() implementation
    https://git.kernel.org/netdev/net-next/c/135553da844c
  - [net-next,v2,3/5] net: stmmac: dwmac-rzn1: provide select_pcs() implementation
    https://git.kernel.org/netdev/net-next/c/804c9866e078
  - [net-next,v2,4/5] net: stmmac: dwmac-socfpga: provide select_pcs() implementation
    https://git.kernel.org/netdev/net-next/c/98a6d9f192d3
  - [net-next,v2,5/5] net: stmmac: clean up stmmac_mac_select_pcs()
    https://git.kernel.org/netdev/net-next/c/93f84152e4ae

You are awesome, thank you!