public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>
Cc: davem@davemloft.net, "Andrew Lunn" <andrew@lunn.ch>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Eric Dumazet" <edumazet@google.com>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Jonas Jelonek" <jelonek.jonas@gmail.com>,
	"Florian Fainelli" <f.fainelli@gmail.com>,
	"Heiner Kallweit" <hkallweit1@gmail.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	thomas.petazzoni@bootlin.com, "Simon Horman" <horms@kernel.org>,
	"Romain Gantois" <romain.gantois@bootlin.com>,
	"Marek Behún" <kabel@kernel.org>,
	bcm-kernel-feedback-list@broadcom.com
Subject: Re: [PATCH net-next 2/6] net: phylink: Allow more interfaces in SFP interface selection
Date: Fri, 6 Mar 2026 08:18:48 +0100	[thread overview]
Message-ID: <83f277bf-a1f6-4cca-8adf-87f77f77bbc6@bootlin.com> (raw)
In-Reply-To: <aamy7-Y4xRv_yTKW@shell.armlinux.org.uk>


>>>> 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@broadcom.com/
> 
> 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
> 


  reply	other threads:[~2026-03-06  7:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-14 22:57 [PATCH net-next 0/6] net: sfp: Add support for SGMII to 100FX modules Maxime Chevallier
2026-01-14 22:57 ` [PATCH net-next 1/6] " Maxime Chevallier
2026-01-14 22:57 ` [PATCH net-next 2/6] net: phylink: Allow more interfaces in SFP interface selection Maxime Chevallier
2026-01-14 23:30   ` Russell King (Oracle)
2026-01-15  7:49     ` Maxime Chevallier
2026-02-13  8:41     ` Maxime Chevallier
2026-03-05 15:05       ` Russell King (Oracle)
2026-03-05 16:35         ` Maxime Chevallier
2026-03-05 16:44           ` Russell King (Oracle)
2026-03-06  7:18             ` Maxime Chevallier [this message]
2026-01-14 22:57 ` [PATCH net-next 3/6] net: phy: Store module caps for PHYs embedded in SFP Maxime Chevallier
2026-01-14 22:57 ` [PATCH net-next 4/6] net: phy: broadcom: Support SGMII to 100FX on BCM5461 Maxime Chevallier
2026-01-14 22:57 ` [PATCH net-next 5/6] net: mdio: mdio-i2c: Add single-byte C22 MDIO protocol Maxime Chevallier
2026-01-14 22:57 ` [PATCH net-next 6/6] net: sfp: Add support for some BCM5461-based SGMII to 100FX modules Maxime Chevallier

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=83f277bf-a1f6-4cca-8adf-87f77f77bbc6@bootlin.com \
    --to=maxime.chevallier@bootlin.com \
    --cc=andrew@lunn.ch \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=horms@kernel.org \
    --cc=jelonek.jonas@gmail.com \
    --cc=kabel@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=romain.gantois@bootlin.com \
    --cc=thomas.petazzoni@bootlin.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