Skip to content

Convert xpcs to phylink_pcs_ops

Vladimir Oltean netdev 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest9 patches 0 repliesNew
  2. v2 RFC9 patches 10 repliesSuperseded
  3. v1 RFC8 patches 4 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9net: pcs: xpcs: delete shim definition for mdio_xpcs_get_ops()include/linux/pcs/pcs-xpcs.h+0 -70 replies
2/9net: pcs: xpcs: there is only one PHY IDdrivers/net/pcs/pcs-xpcs.c+78 -510 replies
3/9net: pcs: xpcs: make the checks related to the PHY interface mode statelessdrivers/net/ethernet/stmicro/stmmac/stmmac_main.c drivers/net/pcs/pcs-xpcs.c include/linux/pcs/pcs-xpcs.h+120 -650 replies
4/9net: pcs: xpcs: export xpcs_validatedrivers/net/ethernet/stmicro/stmmac/hwif.h drivers/net/ethernet/stmicro/stmmac/stmmac_main.c drivers/net/pcs/pcs-xpcs.c +1 more+8 -130 replies
5/9net: pcs: xpcs: export xpcs_config_eeedrivers/net/ethernet/stmicro/stmmac/hwif.h drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c drivers/net/pcs/pcs-xpcs.c +1 more+12 -120 replies
6/9net: pcs: xpcs: export xpcs_probedrivers/net/ethernet/stmicro/stmmac/hwif.h drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c drivers/net/pcs/pcs-xpcs.c +1 more+4 -60 replies
7/9net: pcs: xpcs: use mdiobus_c45_addr in xpcs_{read,write}drivers/net/pcs/pcs-xpcs.c+2 -20 replies
8/9net: pcs: xpcs: convert to mdio_devicedrivers/net/ethernet/stmicro/stmmac/common.h drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +3 more+76 -370 replies
9/9net: pcs: xpcs: convert to phylink_pcs_opsdrivers/net/ethernet/stmicro/stmmac/common.h drivers/net/ethernet/stmicro/stmmac/hwif.h drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +4 more+78 -970 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 net-next 0/9] Convert xpcs to phylink_pcs_ops

From: Vladimir Oltean <[email protected]>

Background: the sja1105 DSA driver currently drives a Designware XPCS for SGMII and 2500base-X, and it would be nice to reuse some code with the xpcs module. This would also help consolidate the phylink_pcs_ops, since the only other dedicated PCS driver, currently, is the lynx_pcs.

Therefore, this series makes the xpcs expose the same kind of API that the lynx_pcs module does. The main changes are getting rid of struct mdio_xpcs_ops, being compatible with struct phylink_pcs_ops and being less reliant on the phy_interface_t passed to xpcs_probe (now renamed to xpcs_create).

This patch series is partially tested (some code paths have been covered on the NXP SJA1105 and some others with the help of Vee Khee Wong on Intel Tiger Lake / stmmac) but further testing on 10G setups would be appreciated, if possible.

Vladimir Oltean (9):
net: pcs: xpcs: delete shim definition for mdio_xpcs_get_ops()
net: pcs: xpcs: there is only one PHY ID
net: pcs: xpcs: make the checks related to the PHY interface mode
stateless
net: pcs: xpcs: export xpcs_validate
net: pcs: xpcs: export xpcs_config_eee
net: pcs: xpcs: export xpcs_probe
net: pcs: xpcs: use mdiobus_c45_addr in xpcs_{read,write}
net: pcs: xpcs: convert to mdio_device
net: pcs: xpcs: convert to phylink_pcs_ops

 drivers/net/ethernet/stmicro/stmmac/common.h  |   3 +-
 drivers/net/ethernet/stmicro/stmmac/hwif.h    |  14 -
 .../ethernet/stmicro/stmmac/stmmac_ethtool.c  |  12 +-
 .../net/ethernet/stmicro/stmmac/stmmac_main.c |  39 +-
 .../net/ethernet/stmicro/stmmac/stmmac_mdio.c |  47 +--
 drivers/net/pcs/pcs-xpcs.c                    | 395 ++++++++++++------
 include/linux/pcs/pcs-xpcs.h                  |  40 +-
 7 files changed, 319 insertions(+), 231 deletions(-)
Signature · 1 line
2.25.1