net: pcs: lynx: add support for 25GBASE-R
Subsystems (5)
PATCH v2 1/1 net: pcs: lynx: add support for 25GBASE-R
The Lynx PCS never supported 25GBASE-R. Add it, so that a 25G DPMAC on LX2160A can be driven by phylink.
The SerDes side had the mode since the commit
1cab8fba5073 ("phy: lynx-28g: add support for 25GBASER")
and dpaa2-mac maps DPMAC_ETH_IF_CAUI to PHY_INTERFACE_MODE_25GBASER, but the PCS never handled it, so phylink_validate() failed with the interface.
25GBASE-R is a serial mode without clause-37 in-band autonegotiation, exactly like 10GBASE-R: it does not needs any configuration, its state is read with phylink_mii_c45_pcs_get_state(), and it reports LINK_INBAND_DISABLE.
phylink_mii_c45_pcs_get_state() is extended in the same patch because without it the link comes up reporting Unknown/Unknown.
---
Repost of the RFC now that net-next has reopened, rebased on net-next.
---
Changes in v2:
- Reword: this adds 25GBASE-R support, it does not fix a regression
(Ioana Ciornei)
- Squash in the phylink_mii_c45_pcs_get_state() 25GBASER case, without
which the link comes up as Unknown/Unknown (Ioana Ciornei)
- Link to v1: https://lore.kernel.org/r/[email protected]
--- drivers/net/pcs/pcs-lynx.c | 6 +++++- drivers/net/phy/phylink.c | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-)
drivers/net/pcs/pcs-lynx.c +5 -1
@@ -46,6 +46,7 @@ static unsigned int lynx_pcs_inband_caps(struct phylink_pcs *pcs,return LINK_INBAND_DISABLE |LINK_INBAND_ENABLE ;case PHY_INTERFACE_MODE_10GBASER : +case PHY_INTERFACE_MODE_25GBASER :return LINK_INBAND_DISABLE ;case PHY_INTERFACE_MODE_USXGMII :
@@ -97,6 +98,7 @@ static void lynx_pcs_get_state(struct phylink_pcs *pcs, unsigned int neg_mode,lynx_pcs_get_state_usxgmii (lynx->mdio, state);break ;case PHY_INTERFACE_MODE_10GBASER : +case PHY_INTERFACE_MODE_25GBASER :phylink_mii_c45_pcs_get_state (lynx->mdio, state);break ;default :
@@ -188,7 +190,8 @@ static int lynx_pcs_config(struct phylink_pcs *pcs, unsigned int neg_mode,return lynx_pcs_config_usxgmii (lynx->mdio, ifmode, advertising, neg_mode);case PHY_INTERFACE_MODE_10GBASER : -/* Nothing to do here for 10GBASER */ +case PHY_INTERFACE_MODE_25GBASER : +/* Nothing to do here for 10GBASER and 25GBASER */ break ;default :return -EOPNOTSUPP ;
@@ -279,6 +282,7 @@ static const phy_interface_t lynx_interfaces[] = {PHY_INTERFACE_MODE_1000BASEX ,PHY_INTERFACE_MODE_2500BASEX ,PHY_INTERFACE_MODE_10GBASER , +PHY_INTERFACE_MODE_25GBASER ,PHY_INTERFACE_MODE_USXGMII , PHY_INTERFACE_MODE_10G_QXGMII, };
drivers/net/phy/phylink.c +5 -0
@@ -4360,6 +4360,11 @@ void phylink_mii_c45_pcs_get_state(struct mdio_device *pcs, state->duplex =DUPLEX_FULL ;break ; +case PHY_INTERFACE_MODE_25GBASER : + state->speed =SPEED_25000 ; + state->duplex =DUPLEX_FULL ; +break ; +default :break ; }
---
base-commit: c8ea08ba34f2a2e9bfb18ff3d69eb2d69b324f49
change-id: 20260825-for-upstream-lynx-25gbaser-v1-30097d909d09
Best regards,
Signature · 1 line
Vincent Jardin <[email protected]>
Hi Vincent,
Quoted 16 lines · On 9/22/26 21:40, Vincent Jardin via B4 Relay wrote:
From: Vincent Jardin <[email protected]>
The Lynx PCS never supported 25GBASE-R. Add it, so that a 25G DPMAC on LX2160A can be driven by phylink.
The SerDes side had the mode since the commit
1cab8fba5073("phy: lynx-28g: add support for 25GBASER")
and dpaa2-mac mapsDPMAC_ETH_IF_CAUItoPHY_INTERFACE_MODE_25GBASER, but the PCS never handled it, sophylink_validate()failed with the interface.25GBASE-R is a serial mode without clause-37 in-band autonegotiation, exactly like 10GBASE-R: it does not needs any configuration, its state is read with
phylink_mii_c45_pcs_get_state(), and it reportsLINK_INBAND_DISABLE.
Quoted 7 lines
phylink_mii_c45_pcs_get_state()is extended in the same patch because without it the link comes up reporting Unknown/Unknown.Suggested-by Ioana Ciornei <[email protected]>Co-developed-by Ioana Ciornei <[email protected]>Signed-off-by Ioana Ciornei <[email protected]>Signed-off-by Vincent Jardin <[email protected]>
Maxime
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 5 lines · On Tue, 22 Sep 2026 21:40:33 +0200 you wrote:
From: Vincent Jardin <[email protected]>
The Lynx PCS never supported 25GBASE-R. Add it, so that a 25G DPMAC on LX2160A can be driven by phylink.
Quoted 7 lines
The SerDes side had the mode since the commit
1cab8fba5073("phy: lynx-28g: add support for 25GBASER")
and dpaa2-mac mapsDPMAC_ETH_IF_CAUItoPHY_INTERFACE_MODE_25GBASER, but the PCS never handled it, sophylink_validate()failed with the interface.[...]
Here is the summary with links:
- [net-next,v2] net: pcs: lynx: add support for 25GBASE-R
https://git.kernel.org/netdev/net-next/c/e8965b0523f2
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
On 22 September 2026
What??
20:40:33 BST, Vincent Jardin via B4 Relay
Quoted 96 lines · <[email protected]> wrote:
From: Vincent Jardin <[email protected]>
The Lynx PCS never supported 25GBASE-R. Add it, so that a 25G DPMAC on LX2160A can be driven by phylink.
The SerDes side had the mode since the commit
1cab8fba5073("phy: lynx-28g: add support for 25GBASER")
and dpaa2-mac mapsDPMAC_ETH_IF_CAUItoPHY_INTERFACE_MODE_25GBASER, but the PCS never handled it, sophylink_validate()failed with the interface.25GBASE-R is a serial mode without clause-37 in-band autonegotiation, exactly like 10GBASE-R: it does not needs any configuration, its state is read with
phylink_mii_c45_pcs_get_state(), and it reportsLINK_INBAND_DISABLE.
phylink_mii_c45_pcs_get_state()is extended in the same patch because without it the link comes up reporting Unknown/Unknown.Suggested-by Ioana Ciornei <[email protected]>Co-developed-by Ioana Ciornei <[email protected]>Signed-off-by Ioana Ciornei <[email protected]>Signed-off-by Vincent Jardin <[email protected]>---
Repost of the RFC now that net-next has reopened, rebased on net-next.
---
Changes in v2:
- Reword: this adds 25GBASE-R support, it does not fix a regression
(Ioana Ciornei)
- Squash in thephylink_mii_c45_pcs_get_state()25GBASER case, without
which the link comes up as Unknown/Unknown (Ioana Ciornei)
- Link to v1: https://lore.kernel.org/r/[email protected]
---drivers/net/pcs/pcs-lynx.c| 6 +++++-drivers/net/phy/phylink.c| 5 +++++2 files changed, 10 insertions(+), 1 deletion(-)drivers/net/pcs/pcs-lynx.c +5
-1@@ -46,6 +46,7 @@ static unsigned int lynx_pcs_inband_caps(struct phylink_pcs *pcs,return LINK_INBAND_DISABLE |LINK_INBAND_ENABLE ;case PHY_INTERFACE_MODE_10GBASER : +case PHY_INTERFACE_MODE_25GBASER :return LINK_INBAND_DISABLE ;case PHY_INTERFACE_MODE_USXGMII :@@ -97,6 +98,7 @@ static void lynx_pcs_get_state(struct phylink_pcs *pcs, unsigned int neg_mode,lynx_pcs_get_state_usxgmii (lynx->mdio, state);break ;case PHY_INTERFACE_MODE_10GBASER : +case PHY_INTERFACE_MODE_25GBASER :phylink_mii_c45_pcs_get_state (lynx->mdio, state);break ;default :@@ -188,7 +190,8 @@ static int lynx_pcs_config(struct phylink_pcs *pcs, unsigned int neg_mode,return lynx_pcs_config_usxgmii (lynx->mdio, ifmode, advertising, neg_mode);case PHY_INTERFACE_MODE_10GBASER : -/* Nothing to do here for 10GBASER */ +case PHY_INTERFACE_MODE_25GBASER : +/* Nothing to do here for 10GBASER and 25GBASER */ break ;default :return -EOPNOTSUPP ;@@ -279,6 +282,7 @@ static const phy_interface_t lynx_interfaces[] = {PHY_INTERFACE_MODE_1000BASEX ,PHY_INTERFACE_MODE_2500BASEX ,PHY_INTERFACE_MODE_10GBASER , +PHY_INTERFACE_MODE_25GBASER ,PHY_INTERFACE_MODE_USXGMII , PHY_INTERFACE_MODE_10G_QXGMII, };drivers/net/phy/phylink.c +5
-1@@ -4360,6 +4360,11 @@ void phylink_mii_c45_pcs_get_state(struct mdio_device *pcs, state->duplex =DUPLEX_FULL ;break ; +case PHY_INTERFACE_MODE_25GBASER : + state->speed =SPEED_25000 ; + state->duplex =DUPLEX_FULL ; +break ; +default :break ; } ---base-commit:
c8ea08ba34f2a2e9bfb18ff3d69eb2d69b324f49
change-id: 20260825-for-upstream-lynx-25gbaser-v1-30097d909d09
Quoted 2 lines
Best regards,