public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Josua Mayer <josua@solid-run.com>
To: Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>
Cc: Mikhail Anikin <mikhail.anikin@solid-run.com>,
	Rabeeh Khoury <rabeeh@solid-run.com>,
	Yazan Shhady <yazan.shhady@solid-run.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Josua Mayer <josua@solid-run.com>
Subject: [PATCH 2/2] net: sfp: support 25G long-range modules (extended compliance code 0x3)
Date: Sun, 18 Jan 2026 16:07:38 +0200	[thread overview]
Message-ID: <20260118-sfp-25g-lr-v1-2-2daf48ffae7f@solid-run.com> (raw)
In-Reply-To: <20260118-sfp-25g-lr-v1-0-2daf48ffae7f@solid-run.com>

The extended compliance code value SFF8024_ECC_100GBASE_ER4_25GBASE_ER
(0x3) means either 4-lane 100G or single lane 25G.

Set 25000baseLR_Full mode supported in addition to the already set
100000baseLR4_ER4_Full, and handle it in sfp_select_interface.

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 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/phy/sfp-bus.c b/drivers/net/phy/sfp-bus.c
index b945d75966d5..2caa0e0c4ec8 100644
--- a/drivers/net/phy/sfp-bus.c
+++ b/drivers/net/phy/sfp-bus.c
@@ -247,6 +247,7 @@ 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);
+		phylink_set(modes, 25000baseLR_Full);
 		break;
 	case SFF8024_ECC_100GBASE_CR4:
 		phylink_set(modes, 100000baseCR4_Full);
@@ -342,7 +343,8 @@ phy_interface_t sfp_select_interface(struct sfp_bus *bus,
 {
 	if (phylink_test(link_modes, 25000baseCR_Full) ||
 	    phylink_test(link_modes, 25000baseKR_Full) ||
-	    phylink_test(link_modes, 25000baseSR_Full))
+	    phylink_test(link_modes, 25000baseSR_Full) ||
+	    phylink_test(link_modes, 25000baseLR_Full))
 		return PHY_INTERFACE_MODE_25GBASER;
 
 	if (phylink_test(link_modes, 10000baseCR_Full) ||

-- 
2.43.0



  parent reply	other threads:[~2026-01-18 14:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-18 14:07 [PATCH 0/2] net: sfp: support 25G long-range modules (extended compliance code 0x3) Josua Mayer
2026-01-18 14:07 ` [PATCH 1/2] net: ethtool: Add link mode for 25Gbps long-range fiber Josua Mayer
2026-01-18 14:07 ` Josua Mayer [this message]
2026-01-18 16:01   ` [PATCH 2/2] net: sfp: support 25G long-range modules (extended compliance code 0x3) Andrew Lunn
2026-01-19  7:30     ` Josua Mayer
2026-01-19 10:48       ` Russell King (Oracle)
2026-01-19 19:30   ` Jakub Kicinski
2026-01-21  9:44     ` Josua Mayer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260118-sfp-25g-lr-v1-2-2daf48ffae7f@solid-run.com \
    --to=josua@solid-run.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mikhail.anikin@solid-run.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rabeeh@solid-run.com \
    --cc=yazan.shhady@solid-run.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox