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 1/2] net: ethtool: Add link mode for 25Gbps long-range fiber
Date: Sun, 18 Jan 2026 16:07:37 +0200 [thread overview]
Message-ID: <20260118-sfp-25g-lr-v1-1-2daf48ffae7f@solid-run.com> (raw)
In-Reply-To: <20260118-sfp-25g-lr-v1-0-2daf48ffae7f@solid-run.com>
ethtool.h header already has a link-mode bit for short-range (SR) fiber.
but missing the long-range (LR) variant.
Define link-mode bit for 25Gbps long-range fiber (25000baseLR_Full).
Signed-off-by: Josua Mayer <josua@solid-run.com>
---
drivers/net/phy/phy-core.c | 2 +-
include/uapi/linux/ethtool.h | 1 +
net/ethtool/common.c | 2 ++
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/phy-core.c b/drivers/net/phy/phy-core.c
index 3badf6e84554..cccd1316e145 100644
--- a/drivers/net/phy/phy-core.c
+++ b/drivers/net/phy/phy-core.c
@@ -18,7 +18,7 @@
*/
const char *phy_speed_to_str(int speed)
{
- BUILD_BUG_ON_MSG(__ETHTOOL_LINK_MODE_MASK_NBITS != 125,
+ BUILD_BUG_ON_MSG(__ETHTOOL_LINK_MODE_MASK_NBITS != 126,
"Enum ethtool_link_mode_bit_indices and phylib are out of sync. "
"If a speed or mode has been added please update phy_speed_to_str "
"and the PHY settings array.\n");
diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
index ce9aeb65a8e1..51929f3e00d9 100644
--- a/include/uapi/linux/ethtool.h
+++ b/include/uapi/linux/ethtool.h
@@ -2094,6 +2094,7 @@ enum ethtool_link_mode_bit_indices {
ETHTOOL_LINK_MODE_1600000baseKR8_Full_BIT = 122,
ETHTOOL_LINK_MODE_1600000baseDR8_Full_BIT = 123,
ETHTOOL_LINK_MODE_1600000baseDR8_2_Full_BIT = 124,
+ ETHTOOL_LINK_MODE_25000baseLR_Full_BIT = 125,
/* must be last entry */
__ETHTOOL_LINK_MODE_MASK_NBITS
diff --git a/net/ethtool/common.c b/net/ethtool/common.c
index 4036561b078b..0010debce4e6 100644
--- a/net/ethtool/common.c
+++ b/net/ethtool/common.c
@@ -237,6 +237,7 @@ const char link_mode_names[][ETH_GSTRING_LEN] = {
__DEFINE_LINK_MODE_NAME(1600000, KR8, Full),
__DEFINE_LINK_MODE_NAME(1600000, DR8, Full),
__DEFINE_LINK_MODE_NAME(1600000, DR8_2, Full),
+ __DEFINE_LINK_MODE_NAME(25000, LR, Full),
};
static_assert(ARRAY_SIZE(link_mode_names) == __ETHTOOL_LINK_MODE_MASK_NBITS);
@@ -464,6 +465,7 @@ const struct link_mode_info link_mode_params[] = {
__DEFINE_LINK_MODE_PARAMS(1600000, KR8, Full, K),
__DEFINE_LINK_MODE_PARAMS(1600000, DR8, Full, D),
__DEFINE_LINK_MODE_PARAMS(1600000, DR8_2, Full, D),
+ __DEFINE_LINK_MODE_PARAMS(25000, LR, Full, L),
};
static_assert(ARRAY_SIZE(link_mode_params) == __ETHTOOL_LINK_MODE_MASK_NBITS);
EXPORT_SYMBOL_GPL(link_mode_params);
--
2.43.0
next prev 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 ` Josua Mayer [this message]
2026-01-18 14:07 ` [PATCH 2/2] " Josua Mayer
2026-01-18 16:01 ` 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-1-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