* [PATCH net-next v1] net: pcs: xpcs: add 10000baseCR_Full to 10GBASE-R link modes
@ 2026-11-16 10:16 Francesco Dolcini
2026-11-16 13:30 ` Andrew Lunn
2026-11-17 22:17 ` netdev-bot+sashiko
0 siblings, 2 replies; 3+ messages in thread
From: Francesco Dolcini @ 2026-11-16 10:16 UTC (permalink / raw)
To: Andrew Lunn, Heiner Kallweit, Russell King, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: Francesco Dolcini, netdev, linux-kernel
From: Francesco Dolcini <francesco.dolcini@toradex.com>
An SFP+ direct attach cable is reported by the SFP layer as
10000baseCR_Full, and this link mode is missing from the 10GBASE-R
supported list, therefore xpcs_validate() masks it away and the
10GBASE-R interface cannot be used with such a cable.
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
---
drivers/net/pcs/pcs-xpcs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/pcs/pcs-xpcs.c b/drivers/net/pcs/pcs-xpcs.c
index 6466e0ff2a98..3378528e57f0 100644
--- a/drivers/net/pcs/pcs-xpcs.c
+++ b/drivers/net/pcs/pcs-xpcs.c
@@ -114,6 +114,7 @@ static const int xpcs_100gbasep_features[] = {
static const int xpcs_10gbaser_features[] = {
ETHTOOL_LINK_MODE_Pause_BIT,
ETHTOOL_LINK_MODE_Asym_Pause_BIT,
+ ETHTOOL_LINK_MODE_10000baseCR_Full_BIT,
ETHTOOL_LINK_MODE_10000baseSR_Full_BIT,
ETHTOOL_LINK_MODE_10000baseLR_Full_BIT,
ETHTOOL_LINK_MODE_10000baseLRM_Full_BIT,
--
2.47.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next v1] net: pcs: xpcs: add 10000baseCR_Full to 10GBASE-R link modes
2026-11-16 10:16 [PATCH net-next v1] net: pcs: xpcs: add 10000baseCR_Full to 10GBASE-R link modes Francesco Dolcini
@ 2026-11-16 13:30 ` Andrew Lunn
2026-11-17 22:17 ` netdev-bot+sashiko
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2026-11-16 13:30 UTC (permalink / raw)
To: Francesco Dolcini
Cc: Heiner Kallweit, Russell King, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Francesco Dolcini, netdev,
linux-kernel
On Mon, Nov 16, 2026 at 11:16:44AM +0100, Francesco Dolcini wrote:
> From: Francesco Dolcini <francesco.dolcini@toradex.com>
>
> An SFP+ direct attach cable is reported by the SFP layer as
> 10000baseCR_Full, and this link mode is missing from the 10GBASE-R
> supported list, therefore xpcs_validate() masks it away and the
> 10GBASE-R interface cannot be used with such a cable.
>
> Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Looks sensible.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next v1] net: pcs: xpcs: add 10000baseCR_Full to 10GBASE-R link modes
2026-11-16 10:16 [PATCH net-next v1] net: pcs: xpcs: add 10000baseCR_Full to 10GBASE-R link modes Francesco Dolcini
2026-11-16 13:30 ` Andrew Lunn
@ 2026-11-17 22:17 ` netdev-bot+sashiko
1 sibling, 0 replies; 3+ messages in thread
From: netdev-bot+sashiko @ 2026-11-17 22:17 UTC (permalink / raw)
To: francesco
Cc: andrew, hkallweit1, linux, davem, edumazet, kuba, pabeni,
francesco.dolcini, netdev, linux-kernel
Thank you for your contribution! Sashiko AI review found 2 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 1
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] The commit message names the mechanism: a link mode the SFP
layer reports for 10GBASE-R is missing from the XPCS 10GBASE-R list,…
- [Low] The patch fixes a user-visible functional bug but has no Fixes:
tag and no stable Cc.
--
net: pcs: xpcs: add 10000baseCR_Full to 10GBASE-R link modes
This commit adds ETHTOOL_LINK_MODE_10000baseCR_Full_BIT to the
xpcs_10gbaser_features[] list. The SFP layer reports SFP+ direct attach
cables as 10000baseCR_Full, and with this change xpcs_validate() no longer
masks that mode away on the 10GBASE-R interface.
> diff --git a/drivers/net/pcs/pcs-xpcs.c b/drivers/net/pcs/pcs-xpcs.c
> index 6466e0ff2a98b..3378528e57f05 100644
> --- a/drivers/net/pcs/pcs-xpcs.c
> +++ b/drivers/net/pcs/pcs-xpcs.c
> @@ -114,6 +114,7 @@ static const int xpcs_100gbasep_features[] = {
> static const int xpcs_10gbaser_features[] = {
> ETHTOOL_LINK_MODE_Pause_BIT,
> ETHTOOL_LINK_MODE_Asym_Pause_BIT,
> + ETHTOOL_LINK_MODE_10000baseCR_Full_BIT,
[Severity: Low]
Should this patch have a Fixes: tag and a stable Cc?
This commit added the xpcs_10gbaser_features[] array without
10000baseCR_Full:
af8de1e307bf ("net: pcs: Add 10GBASE-R mode for Synopsys Designware XPCS")
Before this patch, a DAC module is rejected through this path:
phylink_sfp_config_optical()
phylink_validate_mask()
...
xpcs_validate()
linkmode_and(supported, supported, xpcs_supported);
Only Autoneg, Pause and Asym_Pause are left after that. So
phylink_is_empty_linkmode() returns true, and phylink reports:
"unsupported SFP module: validation with support %*pb failed\n"
Every kernel since af8de1e307bf seems to have this problem, including the
current stable and LTS trees.
> ETHTOOL_LINK_MODE_10000baseSR_Full_BIT,
> ETHTOOL_LINK_MODE_10000baseLR_Full_BIT,
> ETHTOOL_LINK_MODE_10000baseLRM_Full_BIT,
[Severity: Medium]
Is 10000baseT_Full also missing from this list?
sfp_select_interface() in drivers/net/phy/sfp-bus.c maps six link modes to
10GBASE-R:
if (phylink_test(link_modes, 10000baseCR_Full) ||
phylink_test(link_modes, 10000baseSR_Full) ||
phylink_test(link_modes, 10000baseLR_Full) ||
phylink_test(link_modes, 10000baseLRM_Full) ||
phylink_test(link_modes, 10000baseER_Full) ||
phylink_test(link_modes, 10000baseT_Full))
return PHY_INTERFACE_MODE_10GBASER;
After this patch, xpcs_10gbaser_features[] has the first five of these but
not 10000baseT_Full.
For a 10GBASE-T SFP+ module, sfp_parse_support() sets only 10000baseT_Full,
together with 10GBASER:
case SFF8024_ECC_10GBASE_T_SFI:
case SFF8024_ECC_10GBASE_T_SR:
phylink_set(modes, 10000baseT_Full);
__set_bit(PHY_INTERFACE_MODE_10GBASER, interfaces);
break;
Suppose no PHY can be accessed on the module. Then
phylink_sfp_config_optical() validates that mask against 10GBASER, and the
linkmode_and() in xpcs_validate() clears 10000baseT_Full.
Wouldn't that reject the module the same way DAC cables were rejected before
this patch?
If a PHY is detected, phylink_sfp_config_phy() calls phylink_validate() with
PHY_INTERFACE_MODE_NA. The 10GBASER pass would again drop all the 10G copper
modes, so the module couldn't run at 10G over 10GBASE-R either.
The existing comment in xpcs_validate() also hints that this kind of masking
may not be the right approach:
/* Populate the supported link modes for this PHY interface type.
* FIXME: what about the port modes and autoneg bit? This masks
* all those away.
*/
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261116101644.83097-1-francesco%40dolcini.it
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-17 22:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-16 10:16 [PATCH net-next v1] net: pcs: xpcs: add 10000baseCR_Full to 10GBASE-R link modes Francesco Dolcini
2026-11-16 13:30 ` Andrew Lunn
2026-11-17 22:17 ` netdev-bot+sashiko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox