Re: [PATCH net-next 2/6] net: phylink: Allow more interfaces in SFP interface selection
From: Maxime Chevallier
Date: Fri Mar 06 2026 - 02:19:23 EST
>>>> In your tree there's :
>>>>
>>>> net: phylink: use phy interface mode bitmaps for SFP PHYs
>>>> net: phy: add supported_interfaces to Aquantia AQR113C
>>>> net: phy: add supported_interfaces to marvell10g PHYs
>>>> net: phy: add supported_interfaces to marvell PHYs
>>>> net: phy: add supported_interfaces to bcm84881
>>>> net: phy: add supported_interfaces to phylib
>>>>
>>>> These would be pre-requisites for the 100FX-SGMII SFP support, as the
>>>> interface resolution currently doesn't elect SGMII for 100FX modules.
>>>>
>>>> That would require some changes to the current host_interfaces API as
>>>> well, potentially replacing it altogether.
>>>>
>>>> Is this something you can do, or can I get your permission to submit
>>>> these (ofc maybe with more stuff to deal with host_interfaces)
>>>
>>> One of the issues that will need to be solved is how to tell
>>> 100FX-SGMII (e.g. https://www.fs.com/uk/products/37770.html) which need
>>> SGMII apart from 100FX modules that don't (e.g.
>>> https://www.fs.com/uk/products/37324.html)
>>>
>>> host_interfaces don't satisfy that, because this has nothing to do with
>>> what the host can do. Either the module has a PHY and uses SGMII on
>>> the host side, or it doesn't have a PHY in which case 100BASE-X needs
>>> to be used. If we have a PHY, then we will work out using what we
>>> already have.
>>>
>>> Given that 100FX-SGMII, the PHY _should_ be coming up in SGMII mode,
>>> so that's what we need to use to talk to them.
>>
>> _should_ indeed. All modules I got required some level of configuration
>> of the internal PHY for it to work, and without Florian's help [1] on
>> how to setup the broadcom PHY in SGMII to 100FX mode, all the modules I
>> tried were just fancy paperweights :(
>>
>> [1] : https://lore.kernel.org/netdev/24146e10-5e9c-42f5-9bbe-fe69ddb01d95@xxxxxxxxxxxx/
>
> If they don't come up configured correctly, then how do commercial off
> the shelf switches work with these modules?
I have no clue, I've only ever tested these with linux boards :/
>
>>> If we change the PHY's
>>> mode to something else, we get into the horrid problems that is rate
>>> matching, which gives us the problem that we don't have very good
>>> support for that (e.g. PHYs that require the MAC to pace the transmit
>>> rate.)
>>>
>>> I suspect there is no way to tell these SFPs apart using the EEPROM,
>>> which means we're left with the "does this module that looks like a
>>> optical module have a PHY?" problem that we already use for copper
>>> SFPs. If there's no detectable PHY, then we'd likely have to assume
>>> that the SFP requires 100BASE-X.
>>
>> I agree with that completely. From the few such modules I have, we don't
>> have much to work with in the eeprom to come-up with a proper generic
>> support for these.
>>
>> I see no way around that other than probing for a PHY for every 100FX
>> module, and see what we get. Alternatively, we could rely on fixups
>> and have that internal hardcoded database of supported modules ?
>
> Note that there is base.e100_base_fx and base.e100_base_lx, but also
> base.e_base_px and base.e_base_bx10 which can also require 100BASE-X
> provided the bitrate is for 100. It would be good to know what
> capabilities your modules report.
Ah I didn't know about e_base_bx10 and e_base_px. See below for the capabilities.
>
> (side note, I'm looking at:
> if ((id->base.e_base_px || id->base.e_base_bx10) && br_nom == 100) {
> and wondering whether that should be 1.25x 100.)
>
> I have some EEPROM dumps in my database for:
>
> Transceiver codes : 0x00 0x00 0x01 0x20 0x00 0x00 0x00 0x00 0x00
> Transceiver type : SONET: OC-3, short reach
> Transceiver type : Ethernet: 100BASE-FX
> Encoding : 0x02 (4B/5B)
> BR, Nominal : 100MBd
>
> Connector : 0x07 (LC)
> Transceiver codes : 0x00 0x10 0x02 0x10 0x00 0x00 0x00 0x00 0x00
> Transceiver type : SONET: SONET reach specifier bit 1
> Transceiver type : SONET: OC-3, single mode, inter. reach
> Transceiver type : Ethernet: 100BASE-LX/LX10
> Encoding : 0x02 (4B/5B)
> BR, Nominal : 100MBd
>
> Connector : 0x07 (LC)
> Transceiver codes : 0x00 0x00 0x01 0x10 0x00 0x00 0x00 0x00 0x00
> Transceiver type : SONET: OC-3, short reach
> Transceiver type : Ethernet: 100BASE-LX/LX10
> Encoding : 0x02 (4B/5B)
> BR, Nominal : 100MBd
>
> Connector : 0x07 (LC)
> Transceiver codes : 0x00 0x00 0x00 0x40 0x00 0x00 0x00 0x00 0x00
> Transceiver type : Ethernet: BASE-BX10
> Encoding : 0x02 (4B/5B)
> BR, Nominal : 100MBd
>
> I don't have the actual modules though. I think all of these are
> ones which require 100BASE-X rather than having a PHY.
Then here's more for your database :)
- Prolabs GLC-GE-100FX-C, with bcm5461 PHY. Works after this series.
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 0x80
Encoding : 0x02 (4B/5B)
BR Nominal : 100MBd
Rate identifier : 0x00 (unspecified)
Length (SMF) : 0km
Length (OM2) : 2000m
Length (OM1) : 2000m
Length (Copper or Active cable) : 0m
Length (OM3) : 0m
Laser wavelength : 1310nm
Vendor name : CISCO-PROLABS
Vendor OUI : 00:00:00
Vendor PN : GLC-GE-100FX-C
Vendor rev : D2
Option values : 0x00 0x1a
Option : TX_DISABLE implemented
BR margin max : 0%
BR margin min : 0%
Vendor SN : PRLF6AFB1141
Date code : 241216
- Prolabs SFP-GE-100FX-C, with bcm5461 PHY. Doesn't work after this series :
Identifier : 0x03 (SFP)
Extended identifier : 0x04 (GBIC/SFP defined by 2-wire interface ID)
Connector : 0x07 (LC)
Transceiver codes : 0x00 0x00 0x00 0x20 0x00 0x00 0x00 0x00 0x00
Transceiver type : Ethernet: 100BASE-FX
Encoding : 0x02 (4B/5B)
BR Nominal : 100MBd
Rate identifier : 0x00 (unspecified)
Length (SMF) : 0km
Length (OM2) : 2000m
Length (OM1) : 2000m
Length (Copper or Active cable) : 0m
Length (OM3) : 0m
Laser wavelength : 1310nm
Vendor name : PROLABS
Vendor OUI : 00:00:00
Vendor PN : SFP-GE-100FX-C
Vendor rev : A3
Option values : 0x00 0x1a
Option : TX_DISABLE implemented
BR margin max : 0%
BR margin min : 0%
Vendor SN : PR21F07D1463
Date code : 250416
Optical diagnostics support : Yes
Laser bias current : 0.000 mA
Laser output power : 0.0000 mW / -inf dBm
Receiver signal average optical power : 0.0000 mW / -inf dBm
Module temperature : 22.17 degrees C / 71.90 degrees F
Module voltage : 3.3329 V
Alarm/warning flags implemented : Yes
Laser bias current high alarm : Off
Laser bias current low alarm : On
Laser bias current high warning : Off
Laser bias current low warning : On
Laser output power high alarm : Off
Laser output power low alarm : On
Laser output power high warning : Off
Laser output power low warning : On
Module temperature high alarm : Off
Module temperature low alarm : Off
Module temperature high warning : Off
Module temperature low warning : Off
Module voltage high alarm : Off
Module voltage low alarm : Off
Module voltage high warning : Off
Module voltage low warning : Off
Laser rx power high alarm : Off
Laser rx power low alarm : On
Laser rx power high warning : Off
Laser rx power low warning : On
Laser bias current high alarm threshold : 100.000 mA
Laser bias current low alarm threshold : 2.000 mA
Laser bias current high warning threshold : 80.000 mA
Laser bias current low warning threshold : 4.000 mA
Laser output power high alarm threshold : 0.1510 mW / -8.21 dBm
Laser output power low alarm threshold : 0.0253 mW / -15.97 dBm
Laser output power high warning threshold : 0.1259 mW / -9.00 dBm
Laser output power low warning threshold : 0.0316 mW / -15.00 dBm
Module temperature high alarm threshold : 75.00 degrees C / 167.00 degrees F
Module temperature low alarm threshold : -5.00 degrees C / 23.00 degrees F
Module temperature high warning threshold : 70.00 degrees C / 158.00 degrees F
Module temperature low warning threshold : 0.00 degrees C / 32.00 degrees F
Module voltage high alarm threshold : 3.6300 V
Module voltage low alarm threshold : 2.9700 V
Module voltage high warning threshold : 3.4600 V
Module voltage low warning threshold : 3.1300 V
Laser rx power high alarm threshold : 1.0000 mW / 0.00 dBm
Laser rx power low alarm threshold : 0.0003 mW / -35.23 dBm
Laser rx power high warning threshold : 0.5000 mW / -3.01 dBm
Laser rx power low warning threshold : 0.0006 mW / -32.22 dBm
- FS SFP-GB-GE-T, with bcm5461 PHY, works after this series :
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 : 0x02 (4B/5B)
BR Nominal : 100MBd
Rate identifier : 0x00 (unspecified)
Length (SMF) : 0km
Length (OM2) : 2000m
Length (OM1) : 2000m
Length (Copper or Active cable) : 0m
Length (OM3) : 0m
Laser wavelength : 1310nm
Vendor name : FS
Vendor OUI : 00:00:00
Vendor PN : SFP-GE-100FX
Vendor rev : 1.0
Option values : 0x00 0x12
Option : TX_DISABLE implemented
BR margin max : 0%
BR margin min : 0%
Vendor SN : C2405662285
Date code : 240606
Optical diagnostics support : Yes
Laser bias current : 0.000 mA
Laser output power : 0.0000 mW / -inf dBm
Receiver signal average optical power : 0.0000 mW / -inf dBm
Module temperature : 3.96 degrees C / 39.13 degrees F
Module voltage : 3.3236 V
Alarm/warning flags implemented : Yes
Laser bias current high alarm : Off
Laser bias current low alarm : On
Laser bias current high warning : Off
Laser bias current low warning : Off
Laser output power high alarm : Off
Laser output power low alarm : On
Laser output power high warning : Off
Laser output power low warning : Off
Module temperature high alarm : Off
Module temperature low alarm : Off
Module temperature high warning : Off
Module temperature low warning : Off
Module voltage high alarm : Off
Module voltage low alarm : Off
Module voltage high warning : Off
Module voltage low warning : Off
Laser rx power high alarm : Off
Laser rx power low alarm : On
Laser rx power high warning : Off
Laser rx power low warning : Off
Laser bias current high alarm threshold : 90.000 mA
Laser bias current low alarm threshold : 2.000 mA
Laser bias current high warning threshold : 80.000 mA
Laser bias current low warning threshold : 4.000 mA
Laser output power high alarm threshold : 0.0631 mW / -12.00 dBm
Laser output power low alarm threshold : 0.0063 mW / -22.01 dBm
Laser output power high warning threshold : 0.0501 mW / -13.00 dBm
Laser output power low warning threshold : 0.0079 mW / -21.02 dBm
Module temperature high alarm threshold : 85.00 degrees C / 185.00 degrees F
Module temperature low alarm threshold : -5.00 degrees C / 23.00 degrees F
Module temperature high warning threshold : 75.00 degrees C / 167.00 degrees F
Module temperature low warning threshold : 0.00 degrees C / 32.00 degrees F
Module voltage high alarm threshold : 3.5700 V
Module voltage low alarm threshold : 3.1300 V
Module voltage high warning threshold : 3.4700 V
Module voltage low warning threshold : 3.1500 V
Laser rx power high alarm threshold : 0.7943 mW / -1.00 dBm
Laser rx power low alarm threshold : 0.0006 mW / -32.22 dBm
Laser rx power high warning threshold : 0.6310 mW / -2.00 dBm
Laser rx power low warning threshold : 0.0008 mW / -30.97 dBm
- Phoenix Contact FL SFP FX, not sure what's in it, not even sure it's
the right kind of module as it shows 200MBd ?
Identifier : 0x03 (SFP)
Extended identifier : 0x04 (GBIC/SFP defined by 2-wire interface ID)
Connector : 0x07 (LC)
Transceiver codes : 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00
Transceiver type : SONET: OC-3, short reach
Encoding : 0x02 (4B/5B)
BR Nominal : 200MBd
Rate identifier : 0x00 (unspecified)
Length (SMF) : 0km
Length (OM2) : 2000m
Length (OM1) : 2000m
Length (Copper or Active cable) : 0m
Length (OM3) : 0m
Laser wavelength : 1310nm
Vendor name : PHOENIX CONTACT
Vendor OUI : 00:a0:45
Vendor PN : 2891081
Vendor rev : 02
Option values : 0x00 0x1a
Option : TX_DISABLE implemented
BR margin max : 0%
BR margin min : 0%
Vendor SN : 3053642005
Date code : 240709
Optical diagnostics support : Yes
Laser bias current : 0.000 mA
Laser output power : 0.0000 mW / -inf dBm
Receiver signal average optical power : 0.0000 mW / -inf dBm
Module temperature : 17.00 degrees C / 62.60 degrees F
Module voltage : 3.3285 V
Alarm/warning flags implemented : Yes
Laser bias current high alarm : Off
Laser bias current low alarm : On
Laser bias current high warning : Off
Laser bias current low warning : On
Laser output power high alarm : Off
Laser output power low alarm : On
Laser output power high warning : Off
Laser output power low warning : On
Module temperature high alarm : Off
Module temperature low alarm : Off
Module temperature high warning : Off
Module temperature low warning : Off
Module voltage high alarm : Off
Module voltage low alarm : Off
Module voltage high warning : Off
Module voltage low warning : Off
Laser rx power high alarm : Off
Laser rx power low alarm : On
Laser rx power high warning : Off
Laser rx power low warning : On
Laser bias current high alarm threshold : 80.000 mA
Laser bias current low alarm threshold : 2.000 mA
Laser bias current high warning threshold : 70.000 mA
Laser bias current low warning threshold : 4.000 mA
Laser output power high alarm threshold : 0.0794 mW / -11.00 dBm
Laser output power low alarm threshold : 0.0100 mW / -20.00 dBm
Laser output power high warning threshold : 0.0631 mW / -12.00 dBm
Laser output power low warning threshold : 0.0126 mW / -19.00 dBm
Module temperature high alarm threshold : 110.00 degrees C / 230.00 degrees F
Module temperature low alarm threshold : -40.00 degrees C / -40.00 degrees F
Module temperature high warning threshold : 100.00 degrees C / 212.00 degrees F
Module temperature low warning threshold : -35.00 degrees C / -31.00 degrees F
Module voltage high alarm threshold : 3.6000 V
Module voltage low alarm threshold : 3.0000 V
Module voltage high warning threshold : 3.5000 V
Module voltage low warning threshold : 3.1000 V
Laser rx power high alarm threshold : 0.5012 mW / -3.00 dBm
Laser rx power low alarm threshold : 0.0010 mW / -30.00 dBm
Laser rx power high warning threshold : 0.3981 mW / -4.00 dBm
Laser rx power low warning threshold : 0.0013 mW / -28.86 dBm
Maxime
>