* [PATCH net-next v2] ixgbe: Add 10G-BX support
@ 2025-10-14 4:18 Birger Koblitz
2025-10-14 12:27 ` Andrew Lunn
2025-10-15 7:59 ` Paul Menzel
0 siblings, 2 replies; 8+ messages in thread
From: Birger Koblitz @ 2025-10-14 4:18 UTC (permalink / raw)
To: Tony Nguyen, Przemek Kitszel, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: intel-wired-lan, netdev, linux-kernel, Birger Koblitz
Adds support for 10G-BX modules, i.e. 10GBit Ethernet over a single strand
Single-Mode fiber
The initialization of a 10G-BX SFP+ is the same as for a 10G SX/LX module,
and is identified according to SFF-8472 table 5-3, footnote 3 by the
10G Ethernet Compliance Codes field being empty, the Nominal Bit
Rate being compatible with 12.5GBit, and the module being a fiber module
with a Single Mode fiber link length.
This was tested using a Lightron WSPXG-HS3LC-IEA 1270/1330nm 10km
transceiver:
$ sudo ethtool -m enp1s0f1
Identifier : 0x03 (SFP)
Extended identifier : 0x04 (GBIC/SFP defined by 2-wire interface ID)
Connector : 0x07 (LC)
Transceiver codes : 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Encoding : 0x01 (8B/10B)
BR Nominal : 10300MBd
Rate identifier : 0x00 (unspecified)
Length (SMF) : 10km
Length (OM2) : 0m
Length (OM1) : 0m
Length (Copper or Active cable) : 0m
Length (OM3) : 0m
Laser wavelength : 1330nm
Vendor name : Lightron Inc.
Vendor OUI : 00:13:c5
Vendor PN : WSPXG-HS3LC-IEA
Vendor rev : 0000
Option values : 0x00 0x1a
Option : TX_DISABLE implemented
BR margin max : 0%
BR margin min : 0%
Vendor SN : S142228617
Date code : 140611
Optical diagnostics support : Yes
Signed-off-by: Birger Koblitz <mail@birger-koblitz.de>
---
Changes in v2:
Allow also modules with only Byte 15 (100m SM link length) set to
be identified as BX
---
drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c | 7 ++++
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 2 ++
drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | 43 +++++++++++++++++++++---
drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h | 2 ++
drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 2 ++
5 files changed, 51 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c
index d5b1b974b4a33e7dd51b7cfe5ea211ff038a36f0..892a73a4bc6b0bb1c976ca95bf874059b987054f 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c
@@ -342,6 +342,13 @@ static int ixgbe_get_link_capabilities_82599(struct ixgbe_hw *hw,
return 0;
}
+ if (hw->phy.sfp_type == ixgbe_sfp_type_10g_bx_core0 ||
+ hw->phy.sfp_type == ixgbe_sfp_type_10g_bx_core1) {
+ *speed = IXGBE_LINK_SPEED_10GB_FULL;
+ *autoneg = false;
+ return 0;
+ }
+
/*
* Determine link capabilities based on the stored value of AUTOC,
* which represents EEPROM defaults. If AUTOC value has not been
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
index 2d660e9edb80af8fc834e097703dfd6a82b8c45b..76edf02bc47e5dd24bb0936f730f036181f6dc2a 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
@@ -351,6 +351,8 @@ static int ixgbe_get_link_ksettings(struct net_device *netdev,
case ixgbe_sfp_type_1g_lx_core1:
case ixgbe_sfp_type_1g_bx_core0:
case ixgbe_sfp_type_1g_bx_core1:
+ case ixgbe_sfp_type_10g_bx_core0:
+ case ixgbe_sfp_type_10g_bx_core1:
ethtool_link_ksettings_add_link_mode(cmd, supported,
FIBRE);
ethtool_link_ksettings_add_link_mode(cmd, advertising,
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
index 2449e4cf2679ddf3277f4ada7619303eb618d393..ad6a1eae6042bb16e329fb817bcfcb87e9008ce8 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
@@ -1541,6 +1541,8 @@ int ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
u8 identifier = 0;
u8 cable_tech = 0;
u8 cable_spec = 0;
+ u8 sm_length_km = 0;
+ u8 sm_length_100m = 0;
int status;
if (hw->mac.ops.get_media_type(hw) != ixgbe_media_type_fiber) {
@@ -1678,6 +1680,31 @@ int ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
else
hw->phy.sfp_type =
ixgbe_sfp_type_1g_bx_core1;
+ /* Support Ethernet 10G-BX, checking the Bit Rate
+ * Nominal Value as per SFF-8472 to be 12.5 Gb/s (67h) and
+ * Single Mode fibre with at least 1km link length
+ */
+ } else if ((!comp_codes_10g) && (bitrate_nominal == 0x67) &&
+ (!(cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE)) &&
+ (!(cable_tech & IXGBE_SFF_DA_ACTIVE_CABLE))) {
+ status = hw->phy.ops.read_i2c_eeprom(hw,
+ IXGBE_SFF_SM_LENGTH_KM,
+ &sm_length_km);
+ if (status != 0)
+ goto err_read_i2c_eeprom;
+ status = hw->phy.ops.read_i2c_eeprom(hw,
+ IXGBE_SFF_SM_LENGTH_100M,
+ &sm_length_100m);
+ if (status != 0)
+ goto err_read_i2c_eeprom;
+ if (sm_length_km > 0 || sm_length_100m >= 10) {
+ if (hw->bus.lan_id == 0)
+ hw->phy.sfp_type =
+ ixgbe_sfp_type_10g_bx_core0;
+ else
+ hw->phy.sfp_type =
+ ixgbe_sfp_type_10g_bx_core1;
+ }
} else {
hw->phy.sfp_type = ixgbe_sfp_type_unknown;
}
@@ -1768,7 +1795,9 @@ int ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core0 ||
hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core1 ||
hw->phy.sfp_type == ixgbe_sfp_type_1g_bx_core0 ||
- hw->phy.sfp_type == ixgbe_sfp_type_1g_bx_core1)) {
+ hw->phy.sfp_type == ixgbe_sfp_type_1g_bx_core1 ||
+ hw->phy.sfp_type == ixgbe_sfp_type_10g_bx_core0 ||
+ hw->phy.sfp_type == ixgbe_sfp_type_10g_bx_core1)) {
hw->phy.type = ixgbe_phy_sfp_unsupported;
return -EOPNOTSUPP;
}
@@ -1786,7 +1815,9 @@ int ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core0 ||
hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core1 ||
hw->phy.sfp_type == ixgbe_sfp_type_1g_bx_core0 ||
- hw->phy.sfp_type == ixgbe_sfp_type_1g_bx_core1)) {
+ hw->phy.sfp_type == ixgbe_sfp_type_1g_bx_core1 ||
+ hw->phy.sfp_type == ixgbe_sfp_type_10g_bx_core0 ||
+ hw->phy.sfp_type == ixgbe_sfp_type_10g_bx_core1)) {
/* Make sure we're a supported PHY type */
if (hw->phy.type == ixgbe_phy_sfp_intel)
return 0;
@@ -2016,20 +2047,22 @@ int ixgbe_get_sfp_init_sequence_offsets(struct ixgbe_hw *hw,
return -EOPNOTSUPP;
/*
- * Limiting active cables and 1G Phys must be initialized as
+ * Limiting active cables, 10G BX and 1G Phys must be initialized as
* SR modules
*/
if (sfp_type == ixgbe_sfp_type_da_act_lmt_core0 ||
sfp_type == ixgbe_sfp_type_1g_lx_core0 ||
sfp_type == ixgbe_sfp_type_1g_cu_core0 ||
sfp_type == ixgbe_sfp_type_1g_sx_core0 ||
- sfp_type == ixgbe_sfp_type_1g_bx_core0)
+ sfp_type == ixgbe_sfp_type_1g_bx_core0 ||
+ sfp_type == ixgbe_sfp_type_10g_bx_core0)
sfp_type = ixgbe_sfp_type_srlr_core0;
else if (sfp_type == ixgbe_sfp_type_da_act_lmt_core1 ||
sfp_type == ixgbe_sfp_type_1g_lx_core1 ||
sfp_type == ixgbe_sfp_type_1g_cu_core1 ||
sfp_type == ixgbe_sfp_type_1g_sx_core1 ||
- sfp_type == ixgbe_sfp_type_1g_bx_core1)
+ sfp_type == ixgbe_sfp_type_1g_bx_core1 ||
+ sfp_type == ixgbe_sfp_type_10g_bx_core1)
sfp_type = ixgbe_sfp_type_srlr_core1;
/* Read offset to PHY init contents */
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h
index 81179c60af4e0199a8b9d0fcdf34654b02eedfac..039ba4b6c120f3e824c93cb00fdd9483e7cf9cba 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h
@@ -32,6 +32,8 @@
#define IXGBE_SFF_QSFP_1GBE_COMP 0x86
#define IXGBE_SFF_QSFP_CABLE_LENGTH 0x92
#define IXGBE_SFF_QSFP_DEVICE_TECH 0x93
+#define IXGBE_SFF_SM_LENGTH_KM 0xE
+#define IXGBE_SFF_SM_LENGTH_100M 0xF
/* Bitmasks */
#define IXGBE_SFF_DA_PASSIVE_CABLE 0x4
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
index b1bfeb21537acc44c31aedcb0584374e8f6ecd45..61f2ef67defddeab9ff4aa83c8f017819594996b 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
@@ -3286,6 +3286,8 @@ enum ixgbe_sfp_type {
ixgbe_sfp_type_1g_lx_core1 = 14,
ixgbe_sfp_type_1g_bx_core0 = 15,
ixgbe_sfp_type_1g_bx_core1 = 16,
+ ixgbe_sfp_type_10g_bx_core0 = 17,
+ ixgbe_sfp_type_10g_bx_core1 = 18,
ixgbe_sfp_type_not_present = 0xFFFE,
ixgbe_sfp_type_unknown = 0xFFFF
---
base-commit: 67029a49db6c1f21106a1b5fcdd0ea234a6e0711
change-id: 20251012-10gbx-ab482c5e1d54
Best regards,
--
Birger Koblitz <mail@birger-koblitz.de>
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH net-next v2] ixgbe: Add 10G-BX support
2025-10-14 4:18 [PATCH net-next v2] ixgbe: Add 10G-BX support Birger Koblitz
@ 2025-10-14 12:27 ` Andrew Lunn
2025-10-14 13:07 ` [Intel-wired-lan] " Paul Menzel
2025-10-15 7:59 ` Paul Menzel
1 sibling, 1 reply; 8+ messages in thread
From: Andrew Lunn @ 2025-10-14 12:27 UTC (permalink / raw)
To: Birger Koblitz
Cc: Tony Nguyen, Przemek Kitszel, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, intel-wired-lan,
netdev, linux-kernel
On Tue, Oct 14, 2025 at 06:18:27AM +0200, Birger Koblitz wrote:
61;8003;1c> Adds support for 10G-BX modules, i.e. 10GBit Ethernet over a single strand
> Single-Mode fiber
> The initialization of a 10G-BX SFP+ is the same as for a 10G SX/LX module,
> and is identified according to SFF-8472 table 5-3, footnote 3 by the
> 10G Ethernet Compliance Codes field being empty, the Nominal Bit
> Rate being compatible with 12.5GBit, and the module being a fiber module
> with a Single Mode fiber link length.
>
> This was tested using a Lightron WSPXG-HS3LC-IEA 1270/1330nm 10km
> transceiver:
> $ sudo ethtool -m enp1s0f1
> Identifier : 0x03 (SFP)
> Extended identifier : 0x04 (GBIC/SFP defined by 2-wire interface ID)
> Connector : 0x07 (LC)
> Transceiver codes : 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
> Encoding : 0x01 (8B/10B)
> BR Nominal : 10300MBd
> Rate identifier : 0x00 (unspecified)
> Length (SMF) : 10km
> Length (OM2) : 0m
> Length (OM1) : 0m
> Length (Copper or Active cable) : 0m
> Length (OM3) : 0m
> Laser wavelength : 1330nm
> Vendor name : Lightron Inc.
> Vendor OUI : 00:13:c5
> Vendor PN : WSPXG-HS3LC-IEA
> Vendor rev : 0000
> Option values : 0x00 0x1a
> Option : TX_DISABLE implemented
> BR margin max : 0%
> BR margin min : 0%
> Vendor SN : S142228617
> Date code : 140611
> Optical diagnostics support : Yes
>
> Signed-off-by: Birger Koblitz <mail@birger-koblitz.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [Intel-wired-lan] [PATCH net-next v2] ixgbe: Add 10G-BX support
2025-10-14 12:27 ` Andrew Lunn
@ 2025-10-14 13:07 ` Paul Menzel
2025-10-14 13:22 ` Birger Koblitz
0 siblings, 1 reply; 8+ messages in thread
From: Paul Menzel @ 2025-10-14 13:07 UTC (permalink / raw)
To: Andrew Lunn, Birger Koblitz
Cc: Tony Nguyen, Przemek Kitszel, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, intel-wired-lan,
netdev, linux-kernel
Dear Birger, dear Andrew,
Am 14.10.25 um 14:27 schrieb Andrew Lunn:
> On Tue, Oct 14, 2025 at 06:18:27AM +0200, Birger Koblitz wrote:
> 61;8003;1c> Adds support for 10G-BX modules, i.e. 10GBit Ethernet over a single strand
>> Single-Mode fiber
>> The initialization of a 10G-BX SFP+ is the same as for a 10G SX/LX module,
>> and is identified according to SFF-8472 table 5-3, footnote 3 by the
>> 10G Ethernet Compliance Codes field being empty, the Nominal Bit
>> Rate being compatible with 12.5GBit, and the module being a fiber module
>> with a Single Mode fiber link length.
>>
>> This was tested using a Lightron WSPXG-HS3LC-IEA 1270/1330nm 10km
>> transceiver:
>> $ sudo ethtool -m enp1s0f1
>> Identifier : 0x03 (SFP)
>> Extended identifier : 0x04 (GBIC/SFP defined by 2-wire interface ID)
>> Connector : 0x07 (LC)
>> Transceiver codes : 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
>> Encoding : 0x01 (8B/10B)
>> BR Nominal : 10300MBd
>> Rate identifier : 0x00 (unspecified)
>> Length (SMF) : 10km
>> Length (OM2) : 0m
>> Length (OM1) : 0m
>> Length (Copper or Active cable) : 0m
>> Length (OM3) : 0m
>> Laser wavelength : 1330nm
>> Vendor name : Lightron Inc.
>> Vendor OUI : 00:13:c5
>> Vendor PN : WSPXG-HS3LC-IEA
>> Vendor rev : 0000
>> Option values : 0x00 0x1a
>> Option : TX_DISABLE implemented
>> BR margin max : 0%
>> BR margin min : 0%
>> Vendor SN : S142228617
>> Date code : 140611
>> Optical diagnostics support : Yes
>>
>> Signed-off-by: Birger Koblitz <mail@birger-koblitz.de>
>
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Unfortunately I do not see the original patch on the mailing list
*intel-wired-lan*, and lore.kernel.org also does not have it [1].
Kind regards,
Paul
[1]:
https://lore.kernel.org/intel-wired-lan/0c753725-fd6f-4f85-9371-f7342f86acff@lunn.ch/T/#u
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Intel-wired-lan] [PATCH net-next v2] ixgbe: Add 10G-BX support
2025-10-14 13:07 ` [Intel-wired-lan] " Paul Menzel
@ 2025-10-14 13:22 ` Birger Koblitz
2025-10-14 23:36 ` Jacob Keller
0 siblings, 1 reply; 8+ messages in thread
From: Birger Koblitz @ 2025-10-14 13:22 UTC (permalink / raw)
To: Paul Menzel, Andrew Lunn
Cc: Tony Nguyen, Przemek Kitszel, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, intel-wired-lan,
netdev, linux-kernel
On 14/10/2025 15:07, Paul Menzel wrote:
> Unfortunately I do not see the original patch on the mailing list *intel-wired-lan*, and lore.kernel.org also does not have it [1].
>
I have several emails from intel-wired-lan stating that "Your message to Intel-wired-lan awaits moderator approval" as I am not myself on that list.
Birger
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Intel-wired-lan] [PATCH net-next v2] ixgbe: Add 10G-BX support
2025-10-14 13:22 ` Birger Koblitz
@ 2025-10-14 23:36 ` Jacob Keller
0 siblings, 0 replies; 8+ messages in thread
From: Jacob Keller @ 2025-10-14 23:36 UTC (permalink / raw)
To: Birger Koblitz, Paul Menzel, Andrew Lunn
Cc: Tony Nguyen, Przemek Kitszel, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, intel-wired-lan,
netdev, linux-kernel
[-- Attachment #1.1: Type: text/plain, Size: 516 bytes --]
On 10/14/2025 6:22 AM, Birger Koblitz wrote:
>
>
> On 14/10/2025 15:07, Paul Menzel wrote:
>> Unfortunately I do not see the original patch on the mailing list *intel-wired-lan*, and lore.kernel.org also does not have it [1].
>>
> I have several emails from intel-wired-lan stating that "Your message to Intel-wired-lan awaits moderator approval" as I am not myself on that list.
>
> Birger
>
I approved the messages. They should make it through to the list and
archives soon.
Thanks,
Jake
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Intel-wired-lan] [PATCH net-next v2] ixgbe: Add 10G-BX support
2025-10-14 4:18 [PATCH net-next v2] ixgbe: Add 10G-BX support Birger Koblitz
2025-10-14 12:27 ` Andrew Lunn
@ 2025-10-15 7:59 ` Paul Menzel
2025-10-15 9:16 ` Birger Koblitz
1 sibling, 1 reply; 8+ messages in thread
From: Paul Menzel @ 2025-10-15 7:59 UTC (permalink / raw)
To: Birger Koblitz
Cc: Tony Nguyen, Przemek Kitszel, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, intel-wired-lan,
netdev, linux-kernel
Dear Birger,
Thank you for your patch.
Am 14.10.25 um 06:18 schrieb Birger Koblitz:
> Adds support for 10G-BX modules, i.e. 10GBit Ethernet over a single strand
> Single-Mode fiber
I’d use imperative mood, and add a dot/period at the end.
> The initialization of a 10G-BX SFP+ is the same as for a 10G SX/LX module,
> and is identified according to SFF-8472 table 5-3, footnote 3 by the
> 10G Ethernet Compliance Codes field being empty, the Nominal Bit
> Rate being compatible with 12.5GBit, and the module being a fiber module
> with a Single Mode fiber link length.
>
> This was tested using a Lightron WSPXG-HS3LC-IEA 1270/1330nm 10km
> transceiver:
> $ sudo ethtool -m enp1s0f1
> Identifier : 0x03 (SFP)
> Extended identifier : 0x04 (GBIC/SFP defined by 2-wire interface ID)
> Connector : 0x07 (LC)
> Transceiver codes : 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
> Encoding : 0x01 (8B/10B)
> BR Nominal : 10300MBd
> Rate identifier : 0x00 (unspecified)
> Length (SMF) : 10km
> Length (OM2) : 0m
> Length (OM1) : 0m
> Length (Copper or Active cable) : 0m
> Length (OM3) : 0m
> Laser wavelength : 1330nm
> Vendor name : Lightron Inc.
> Vendor OUI : 00:13:c5
> Vendor PN : WSPXG-HS3LC-IEA
> Vendor rev : 0000
> Option values : 0x00 0x1a
> Option : TX_DISABLE implemented
> BR margin max : 0%
> BR margin min : 0%
> Vendor SN : S142228617
> Date code : 140611
> Optical diagnostics support : Yes
>
> Signed-off-by: Birger Koblitz <mail@birger-koblitz.de>
> ---
> Changes in v2:
> Allow also modules with only Byte 15 (100m SM link length) set to
> be identified as BX
> ---
> drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c | 7 ++++
> drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 2 ++
> drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | 43 +++++++++++++++++++++---
> drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h | 2 ++
> drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 2 ++
> 5 files changed, 51 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c
> index d5b1b974b4a33e7dd51b7cfe5ea211ff038a36f0..892a73a4bc6b0bb1c976ca95bf874059b987054f 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c
> @@ -342,6 +342,13 @@ static int ixgbe_get_link_capabilities_82599(struct ixgbe_hw *hw,
> return 0;
> }
>
> + if (hw->phy.sfp_type == ixgbe_sfp_type_10g_bx_core0 ||
> + hw->phy.sfp_type == ixgbe_sfp_type_10g_bx_core1) {
> + *speed = IXGBE_LINK_SPEED_10GB_FULL;
> + *autoneg = false;
> + return 0;
> + }
> +
> /*
> * Determine link capabilities based on the stored value of AUTOC,
> * which represents EEPROM defaults. If AUTOC value has not been
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
> index 2d660e9edb80af8fc834e097703dfd6a82b8c45b..76edf02bc47e5dd24bb0936f730f036181f6dc2a 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
> @@ -351,6 +351,8 @@ static int ixgbe_get_link_ksettings(struct net_device *netdev,
> case ixgbe_sfp_type_1g_lx_core1:
> case ixgbe_sfp_type_1g_bx_core0:
> case ixgbe_sfp_type_1g_bx_core1:
> + case ixgbe_sfp_type_10g_bx_core0:
> + case ixgbe_sfp_type_10g_bx_core1:
> ethtool_link_ksettings_add_link_mode(cmd, supported,
> FIBRE);
> ethtool_link_ksettings_add_link_mode(cmd, advertising,
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
> index 2449e4cf2679ddf3277f4ada7619303eb618d393..ad6a1eae6042bb16e329fb817bcfcb87e9008ce8 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
> @@ -1541,6 +1541,8 @@ int ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
> u8 identifier = 0;
> u8 cable_tech = 0;
> u8 cable_spec = 0;
> + u8 sm_length_km = 0;
> + u8 sm_length_100m = 0;
> int status;
>
> if (hw->mac.ops.get_media_type(hw) != ixgbe_media_type_fiber) {
> @@ -1678,6 +1680,31 @@ int ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
> else
> hw->phy.sfp_type =
> ixgbe_sfp_type_1g_bx_core1;
> + /* Support Ethernet 10G-BX, checking the Bit Rate
> + * Nominal Value as per SFF-8472 to be 12.5 Gb/s (67h) and
> + * Single Mode fibre with at least 1km link length
> + */
> + } else if ((!comp_codes_10g) && (bitrate_nominal == 0x67) &&
> + (!(cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE)) &&
> + (!(cable_tech & IXGBE_SFF_DA_ACTIVE_CABLE))) {
> + status = hw->phy.ops.read_i2c_eeprom(hw,
> + IXGBE_SFF_SM_LENGTH_KM,
> + &sm_length_km);
> + if (status != 0)
> + goto err_read_i2c_eeprom;
Should an error be logged?
> + status = hw->phy.ops.read_i2c_eeprom(hw,
> + IXGBE_SFF_SM_LENGTH_100M,
> + &sm_length_100m);
> + if (status != 0)
> + goto err_read_i2c_eeprom;
Should an error be logged?
> + if (sm_length_km > 0 || sm_length_100m >= 10) {
> + if (hw->bus.lan_id == 0)
> + hw->phy.sfp_type =
> + ixgbe_sfp_type_10g_bx_core0;
> + else
> + hw->phy.sfp_type =
> + ixgbe_sfp_type_10g_bx_core1;
I’d prefer the ternary operator, if only the same variable is assigned
in both branches.
> + }
> } else {
> hw->phy.sfp_type = ixgbe_sfp_type_unknown;
> }
> @@ -1768,7 +1795,9 @@ int ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
> hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core0 ||
> hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core1 ||
> hw->phy.sfp_type == ixgbe_sfp_type_1g_bx_core0 ||
> - hw->phy.sfp_type == ixgbe_sfp_type_1g_bx_core1)) {
> + hw->phy.sfp_type == ixgbe_sfp_type_1g_bx_core1 ||
> + hw->phy.sfp_type == ixgbe_sfp_type_10g_bx_core0 ||
> + hw->phy.sfp_type == ixgbe_sfp_type_10g_bx_core1)) {
> hw->phy.type = ixgbe_phy_sfp_unsupported;
> return -EOPNOTSUPP;
> }
> @@ -1786,7 +1815,9 @@ int ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
> hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core0 ||
> hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core1 ||
> hw->phy.sfp_type == ixgbe_sfp_type_1g_bx_core0 ||
> - hw->phy.sfp_type == ixgbe_sfp_type_1g_bx_core1)) {
> + hw->phy.sfp_type == ixgbe_sfp_type_1g_bx_core1 ||
> + hw->phy.sfp_type == ixgbe_sfp_type_10g_bx_core0 ||
> + hw->phy.sfp_type == ixgbe_sfp_type_10g_bx_core1)) {
> /* Make sure we're a supported PHY type */
> if (hw->phy.type == ixgbe_phy_sfp_intel)
> return 0;
> @@ -2016,20 +2047,22 @@ int ixgbe_get_sfp_init_sequence_offsets(struct ixgbe_hw *hw,
> return -EOPNOTSUPP;
>
> /*
> - * Limiting active cables and 1G Phys must be initialized as
> + * Limiting active cables, 10G BX and 1G Phys must be initialized as
> * SR modules
> */
> if (sfp_type == ixgbe_sfp_type_da_act_lmt_core0 ||
> sfp_type == ixgbe_sfp_type_1g_lx_core0 ||
> sfp_type == ixgbe_sfp_type_1g_cu_core0 ||
> sfp_type == ixgbe_sfp_type_1g_sx_core0 ||
> - sfp_type == ixgbe_sfp_type_1g_bx_core0)
> + sfp_type == ixgbe_sfp_type_1g_bx_core0 ||
> + sfp_type == ixgbe_sfp_type_10g_bx_core0)
> sfp_type = ixgbe_sfp_type_srlr_core0;
> else if (sfp_type == ixgbe_sfp_type_da_act_lmt_core1 ||
> sfp_type == ixgbe_sfp_type_1g_lx_core1 ||
> sfp_type == ixgbe_sfp_type_1g_cu_core1 ||
> sfp_type == ixgbe_sfp_type_1g_sx_core1 ||
> - sfp_type == ixgbe_sfp_type_1g_bx_core1)
> + sfp_type == ixgbe_sfp_type_1g_bx_core1 ||
> + sfp_type == ixgbe_sfp_type_10g_bx_core1)
> sfp_type = ixgbe_sfp_type_srlr_core1;
>
> /* Read offset to PHY init contents */
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h
> index 81179c60af4e0199a8b9d0fcdf34654b02eedfac..039ba4b6c120f3e824c93cb00fdd9483e7cf9cba 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h
> @@ -32,6 +32,8 @@
> #define IXGBE_SFF_QSFP_1GBE_COMP 0x86
> #define IXGBE_SFF_QSFP_CABLE_LENGTH 0x92
> #define IXGBE_SFF_QSFP_DEVICE_TECH 0x93
> +#define IXGBE_SFF_SM_LENGTH_KM 0xE
> +#define IXGBE_SFF_SM_LENGTH_100M 0xF
>
> /* Bitmasks */
> #define IXGBE_SFF_DA_PASSIVE_CABLE 0x4
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
> index b1bfeb21537acc44c31aedcb0584374e8f6ecd45..61f2ef67defddeab9ff4aa83c8f017819594996b 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
> @@ -3286,6 +3286,8 @@ enum ixgbe_sfp_type {
> ixgbe_sfp_type_1g_lx_core1 = 14,
> ixgbe_sfp_type_1g_bx_core0 = 15,
> ixgbe_sfp_type_1g_bx_core1 = 16,
> + ixgbe_sfp_type_10g_bx_core0 = 17,
> + ixgbe_sfp_type_10g_bx_core1 = 18,
>
> ixgbe_sfp_type_not_present = 0xFFFE,
> ixgbe_sfp_type_unknown = 0xFFFF
Kind regards,
Paul
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [Intel-wired-lan] [PATCH net-next v2] ixgbe: Add 10G-BX support
2025-10-15 7:59 ` Paul Menzel
@ 2025-10-15 9:16 ` Birger Koblitz
2025-10-15 9:38 ` Paul Menzel
0 siblings, 1 reply; 8+ messages in thread
From: Birger Koblitz @ 2025-10-15 9:16 UTC (permalink / raw)
To: Paul Menzel
Cc: Tony Nguyen, Przemek Kitszel, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, intel-wired-lan,
netdev, linux-kernel
Dear Paul,
thank you for your feedback!
On 15/10/2025 9:59 am, Paul Menzel wrote:
> Am 14.10.25 um 06:18 schrieb Birger Koblitz:
>> Adds support for 10G-BX modules, i.e. 10GBit Ethernet over a single
>> strand
>> Single-Mode fiber
>
> I’d use imperative mood, and add a dot/period at the end.
I will put this into the next patch-version.
>> @@ -1678,6 +1680,31 @@ int ixgbe_identify_sfp_module_generic(struct
>> ixgbe_hw *hw)
>> else
>> hw->phy.sfp_type =
>> ixgbe_sfp_type_1g_bx_core1;
>> + /* Support Ethernet 10G-BX, checking the Bit Rate
>> + * Nominal Value as per SFF-8472 to be 12.5 Gb/s (67h) and
>> + * Single Mode fibre with at least 1km link length
>> + */
>> + } else if ((!comp_codes_10g) && (bitrate_nominal == 0x67) &&
>> + (!(cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE)) &&
>> + (!(cable_tech & IXGBE_SFF_DA_ACTIVE_CABLE))) {
>> + status = hw->phy.ops.read_i2c_eeprom(hw,
>> + IXGBE_SFF_SM_LENGTH_KM,
>> + &sm_length_km);
>> + if (status != 0)
>> + goto err_read_i2c_eeprom;
>
> Should an error be logged?
>
This needs to be read in the context of the rest of the SFP
identification function. Several bytes of the EEPROM have already been
read for module identification by the existing code before reaching this
point, and failure is handled everywhere by the same goto. What will
happen if EEPROM reading fails is that an error message will be logged
that the Module is not supported. This is because the type is not filled
in and the module therefore considered unsupported. The actual error
(ret_val = -ENOENT) is ignored e.g. in
ixgbe_52599/ixgbe_init_phy_ops_82599(). The error logged is probably
good enough: the module cannot be positively identified and is not
enabled. I say good enough, because this is actually what is the case:
the EEPROM is broken and ther
>> + status = hw->phy.ops.read_i2c_eeprom(hw,
>> + IXGBE_SFF_SM_LENGTH_100M,
>> + &sm_length_100m);
>> + if (status != 0)
>> + goto err_read_i2c_eeprom;
>
> Should an error be logged?
Same here.
>
>> + if (sm_length_km > 0 || sm_length_100m >= 10) {
>> + if (hw->bus.lan_id == 0)
>> + hw->phy.sfp_type =
>> + ixgbe_sfp_type_10g_bx_core0;
>> + else
>> + hw->phy.sfp_type =
>> + ixgbe_sfp_type_10g_bx_core1;
>
> I’d prefer the ternary operator, if only the same variable is assigned
> in both branches.
Me, too. But this is merely code that can be found verbosely the same in
several places before in this identification function, for each type of
module identified basically once. If the same code would be written
differently in this place, it would probably confuse readers who would
wonder what is different.
Cheers,
Birger
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [Intel-wired-lan] [PATCH net-next v2] ixgbe: Add 10G-BX support
2025-10-15 9:16 ` Birger Koblitz
@ 2025-10-15 9:38 ` Paul Menzel
0 siblings, 0 replies; 8+ messages in thread
From: Paul Menzel @ 2025-10-15 9:38 UTC (permalink / raw)
To: Birger Koblitz
Cc: Tony Nguyen, Przemek Kitszel, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, intel-wired-lan,
netdev, linux-kernel
Dear Birger,
Thank you for your prompt reply.
Am 15.10.25 um 11:16 schrieb Birger Koblitz:
> On 15/10/2025 9:59 am, Paul Menzel wrote:
>> Am 14.10.25 um 06:18 schrieb Birger Koblitz:
>>> Adds support for 10G-BX modules, i.e. 10GBit Ethernet over a single strand
>>> Single-Mode fiber
>>
>> I’d use imperative mood, and add a dot/period at the end.
> I will put this into the next patch-version.
>
>>> @@ -1678,6 +1680,31 @@ int ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
>>> else
>>> hw->phy.sfp_type =
>>> ixgbe_sfp_type_1g_bx_core1;
>>> + /* Support Ethernet 10G-BX, checking the Bit Rate
>>> + * Nominal Value as per SFF-8472 to be 12.5 Gb/s (67h) and
>>> + * Single Mode fibre with at least 1km link length
>>> + */
>>> + } else if ((!comp_codes_10g) && (bitrate_nominal == 0x67) &&
>>> + (!(cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE)) &&
>>> + (!(cable_tech & IXGBE_SFF_DA_ACTIVE_CABLE))) {
>>> + status = hw->phy.ops.read_i2c_eeprom(hw,
>>> + IXGBE_SFF_SM_LENGTH_KM,
>>> + &sm_length_km);
>>> + if (status != 0)
>>> + goto err_read_i2c_eeprom;
>>
>> Should an error be logged?
>>
> This needs to be read in the context of the rest of the SFP
> identification function. Several bytes of the EEPROM have already been
> read for module identification by the existing code before reaching this
> point, and failure is handled everywhere by the same goto. What will
> happen if EEPROM reading fails is that an error message will be logged
> that the Module is not supported. This is because the type is not filled
> in and the module therefore considered unsupported. The actual error
> (ret_val = -ENOENT) is ignored e.g. in ixgbe_52599/
> ixgbe_init_phy_ops_82599(). The error logged is probably good enough:
> the module cannot be positively identified and is not enabled. I say
> good enough, because this is actually what is the case: the EEPROM is
> broken and ther
>
>>> + status = hw->phy.ops.read_i2c_eeprom(hw,
>>> + IXGBE_SFF_SM_LENGTH_100M,
>>> + &sm_length_100m);
>>> + if (status != 0)
>>> + goto err_read_i2c_eeprom;
>>
>> Should an error be logged?
> Same here.
>
>>
>>> + if (sm_length_km > 0 || sm_length_100m >= 10) {
>>> + if (hw->bus.lan_id == 0)
>>> + hw->phy.sfp_type =
>>> + ixgbe_sfp_type_10g_bx_core0;
>>> + else
>>> + hw->phy.sfp_type =
>>> + ixgbe_sfp_type_10g_bx_core1;
>>
>> I’d prefer the ternary operator, if only the same variable is assigned
>> in both branches.
> Me, too. But this is merely code that can be found verbosely the same in
> several places before in this identification function, for each type of
> module identified basically once. If the same code would be written
> differently in this place, it would probably confuse readers who would
> wonder what is different.
You are right in all accounts. Thank you for the explanations.
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Kind regards,
Paul
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-10-15 9:39 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-14 4:18 [PATCH net-next v2] ixgbe: Add 10G-BX support Birger Koblitz
2025-10-14 12:27 ` Andrew Lunn
2025-10-14 13:07 ` [Intel-wired-lan] " Paul Menzel
2025-10-14 13:22 ` Birger Koblitz
2025-10-14 23:36 ` Jacob Keller
2025-10-15 7:59 ` Paul Menzel
2025-10-15 9:16 ` Birger Koblitz
2025-10-15 9:38 ` Paul Menzel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).