[PATCH RFC net-next v2 2/2] net: sfp: support 25G long-range modules (extended compliance code 0x3)

Josua Mayer posted 2 patches 1 month, 1 week ago
[PATCH RFC net-next v2 2/2] net: sfp: support 25G long-range modules (extended compliance code 0x3)
Posted by Josua Mayer 1 month, 1 week ago
The extended compliance code value SFF8024_ECC_100GBASE_ER4_25GBASE_ER
(0x3) means either 4-lane 100G or single lane 25G.

Set 25000baseSR_Full mode supported in addition to the already set
100000baseLR4_ER4_Full.

This is slightly wrong considering 25000baseSR_Full is short-range but
the compliance code means long range.

Unfortunately ethtool.h does not (currently) provide a bit for 25G
long-range modules.
Should it be added?
Are there any reasons to not have long-range variants?

This fixes detection of 25G capability for two SFP fiber modules:

- GigaLight GSS-SPO250-LRT
- FS SFP-25G23-BX20-I

Signed-off-by: Josua Mayer <josua@solid-run.com>
---
 drivers/net/phy/sfp-bus.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/phy/sfp-bus.c b/drivers/net/phy/sfp-bus.c
index b945d75966d5..5bb3fa6e9b4f 100644
--- a/drivers/net/phy/sfp-bus.c
+++ b/drivers/net/phy/sfp-bus.c
@@ -247,6 +247,8 @@ static void sfp_module_parse_support(struct sfp_bus *bus,
 	case SFF8024_ECC_100GBASE_LR4_25GBASE_LR:
 	case SFF8024_ECC_100GBASE_ER4_25GBASE_ER:
 		phylink_set(modes, 100000baseLR4_ER4_Full);
+		/* should be 25000baseLR_Full (not defined in ethtool.h) */
+		phylink_set(modes, 25000baseSR_Full);
 		break;
 	case SFF8024_ECC_100GBASE_CR4:
 		phylink_set(modes, 100000baseCR4_Full);

-- 
2.43.0
Re: [PATCH RFC net-next v2 2/2] net: sfp: support 25G long-range modules (extended compliance code 0x3)
Posted by Russell King (Oracle) 1 month, 1 week ago
On Thu, Jan 01, 2026 at 06:05:39PM +0200, Josua Mayer wrote:
> The extended compliance code value SFF8024_ECC_100GBASE_ER4_25GBASE_ER
> (0x3) means either 4-lane 100G or single lane 25G.
> 
> Set 25000baseSR_Full mode supported in addition to the already set
> 100000baseLR4_ER4_Full.
> 
> This is slightly wrong considering 25000baseSR_Full is short-range but
> the compliance code means long range.
> 
> Unfortunately ethtool.h does not (currently) provide a bit for 25G
> long-range modules.
> Should it be added?
> Are there any reasons to not have long-range variants?

Good questions, not something I can answer though.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Re: [PATCH RFC net-next v2 2/2] net: sfp: support 25G long-range modules (extended compliance code 0x3)
Posted by Andrew Lunn 1 month, 1 week ago
> Unfortunately ethtool.h does not (currently) provide a bit for 25G
> long-range modules.
> Should it be added?
> Are there any reasons to not have long-range variants?

Please add it.

Thanks
       Andrew