Module neets interface down and up after reboot in sfp2 cage

Hello,

I’m using a GLC-SX-MMD module in the sfp2 cage of a BPI-R3 running the latest OpenWrt 24.10.2 build. The issue is that I have to restart the sfp2 interface after boot; otherwise the link doesn’t work. TX is active, but no RX is received. My switch shows the same—TX appears fine, but there’s no RX. As soon as I run ip link set sfp2 down && ip link set sfp2 up on the BPI, the interface starts working. Doing this on the switch has no effect.

Here are some details about my system:

root@GW:~# ethtool sfp2
Settings for sfp2:
	Supported ports: [ FIBRE ]
	Supported link modes:   1000baseX/Full
	Supported pause frame use: Symmetric Receive-only
	Supports auto-negotiation: Yes
	Supported FEC modes: Not reported
	Advertised link modes:  1000baseX/Full
	Advertised pause frame use: Symmetric Receive-only
	Advertised auto-negotiation: No
	Advertised FEC modes: Not reported
	Speed: 1000Mb/s
	Duplex: Full
	Auto-negotiation: off
	Port: FIBRE
	PHYAD: 0
	Transceiver: internal
	Supports Wake-on: d
	Wake-on: d
	Link detected: yes
root@GW:~# ethtool -m sfp2
	Identifier                                : 0x03 (SFP)
	Extended identifier                       : 0x04 (GBIC/SFP defined by 2-wire interface ID)
	Connector                                 : 0x07 (LC)
	Transceiver codes                         : 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00
	Transceiver type                          : Ethernet: 1000BASE-SX
	Encoding                                  : 0x01 (8B/10B)
	BR, Nominal                               : 1300MBd
	Rate identifier                           : 0x00 (unspecified)
	Length (SMF,km)                           : 0km
	Length (SMF)                              : 0m
	Length (50um)                             : 550m
	Length (62.5um)                           : 270m
	Length (Copper)                           : 0m
	Length (OM3)                              : 0m
	Laser wavelength                          : 850nm
	Vendor name                               : OEM
	Vendor OUI                                : 00:90:65
	Vendor PN                                 : GLC-SX-MMD     _
	Vendor rev                                : _e
	Option values                             : 0x00 0x12
	Option                                    : RX_LOS implemented
	Option                                    : TX_DISABLE implemented
	BR margin, max                            : 0%
	BR margin, min                            : 0%
	Vendor SN                                 : CSGE2O90093
	Date code                                 : 240927
	Optical diagnostics support               : Yes
	Laser bias current                        : 7.230 mA
	Laser output power                        : 0.3428 mW / -4.65 dBm
	Receiver signal average optical power     : 0.3361 mW / -4.74 dBm
	Module temperature                        : 45.96 degrees C / 114.73 degrees F
	Module voltage                            : 3.3359 V
	Alarm/warning flags implemented           : No

Related is this

https://patchwork.kernel.org/project/netdevbpf/patch/[email protected]/

However you need a fix for phylink_sfp_config_optical() instead of phylink_sfp_config_phy().

So this info can maybe help you in the right direction what to patch.

You could try similar to this one:

https://patchwork.kernel.org/project/netdevbpf/patch/[email protected]/

It will affect both of the above functions if you just always set changed to true, removing the if statement of this patch. Just to try if this helps and pinpoint a real solution.

Note: The patch in question is at the bottom of the page.

But you would always need to apply some patch. Easiest solution is to execute your commands automatically at startup.

1 Like

Thanks for reaching out!

I’ll check whether these patches are related to the issue I’m facing. You’re absolutely right, that it’s sufficient for me to use the described method to trigger the commands once at startup.