I installed OpenWrt 24.10.0-rc5 r28304-6dacba30a7 / LuCI openwrt-24.10 branch 25.001.48925~f5c1806 on my MikroTik RB5009 and everything works great save my SFP+ port. I have a Magic-SFP (https://www.mdslink.com/magic-sfp/) which operates at 2.5G and does work without issue on stock Mikrotik hardware (autoneg off and forcing 2500) but I cannot get it to operate in any capacity in OpenWrt.
Using ethtools (removing ethtool and installing ethtool-full) I get this on the empty cage:
root@OpenWrt:~# ethtool sfp
Settings for sfp:
Supported ports: [ MII ]
Supported link modes: 10000baseT/Full
10000baseKX4/Full
10000baseKR/Full
10000baseCR/Full
10000baseSR/Full
10000baseLR/Full
10000baseLRM/Full
10000baseER/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10000baseT/Full
10000baseKX4/Full
10000baseKR/Full
10000baseCR/Full
10000baseSR/Full
10000baseLR/Full
10000baseLRM/Full
10000baseER/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Speed: Unknown!
Duplex: Unknown! (255)
Auto-negotiation: on
Port: MII
PHYAD: 0
Transceiver: internal
Supports Wake-on: d
Wake-on: d
Link detected: no
plugging in the module ethtools returns
Supported ports: [ TP ]
Supported link modes: 1000baseX/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 1000baseX/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: No
Advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Full
Auto-negotiation: off
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
MDI-X: Unknown
Supports Wake-on: d
Wake-on: d
Link detected: no
The SFP port just doesn't seem to want to communicate with the rest of the network and neither can serve as a DHCP client or communicate out for a DHCP server.
Interesting. Is that something I can do from the firmware? Will I need to build a custom image? The module does work without issue in some no-name switches and MikroTik's default firmware but I do get that the module is highly specialized and comes from a very small vendor.
Indeed I can't seem to get EEPROM info:
root@cammarouter:~# ethtool -e sfp
Cannot get EEPROM data: Not supported
Bummer. ethtool -m sfp does respond with information but not -e so i don't know what the deal is. I've got a BananaPi R4 coming so it'll be interested if the issue continues there. I only have one other device with an SFP port but its not + so I don't think that is a fair comparison.
Ignore the -e, that is for dumping via custom network driver OP, that doesn't matter.
Again, your issue is that EEPROM is not properly populated and kernel is thus limiting it to 1000Base-X only, you need to add a quirk for the module, I have linked you to the quirk for another module but only the vendor and model strings will be different.
I have exactly the same problem in RB5009 and a SFP 10G BASE-T being recognized as Transceiver type: 10G Ethernet: 10G Base-SR
I would like to patch the sfp.c as your examples, but I do not really know how to get those information to adapt for example SFP_QUIRK_F("Walsun", "HXSX-ATRC-1", sfp_fixup_fs_10gt), to my device. Reading the function, those two first parameters are vendor and part number i suppose, so should I use OEM and SFP-10G-T since those are the output I get in my ethtool?
Actually looking closer on the sfp.c, it does appear to already have a SFP_QUIRK_F("OEM", "SFP-10G-T", sfp_fixup_rollball_cc), , so I do not know what to do then.
# ethtool -m sfp
Identifier : 0x03 (SFP)
Extended identifier : 0x04 (GBIC/SFP defined by 2-wire interface ID)
Connector : 0x07 (LC)
Transceiver codes : 0x10 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Transceiver type : 10G Ethernet: 10G Base-SR
Encoding : 0x06 (64B/66B)
BR, Nominal : 10300MBd
Rate identifier : 0x00 (unspecified)
Length (SMF,km) : 0km
Length (SMF) : 0m
Length (50um) : 80m
Length (62.5um) : 20m
Length (Copper) : 0m
Length (OM3) : 300m
Laser wavelength : 850nm
Vendor name : OEM
Vendor OUI : 00:90:65
Vendor PN : SFP-10G-T
Vendor rev : 02
Option values : 0x00 0x1a
Option : RX_LOS implemented
Option : TX_FAULT implemented
Option : TX_DISABLE implemented
BR margin, max : 0%
BR margin, min : 0%
Vendor SN : CSY392O71271
Date code : 240618
Optical diagnostics support : Yes
Laser bias current : 6.000 mA
Laser output power : 0.5000 mW / -3.01 dBm
Receiver signal average optical power : 0.0000 mW / -inf dBm
Module temperature : 45.66 degrees C / 114.19 degrees F
Module voltage : 3.3278 V
Alarm/warning flags implemented : Yes
Laser bias current high alarm : Off
Laser bias current low alarm : Off
Laser bias current high warning : Off
Laser bias current low warning : Off
Laser output power high alarm : Off
Laser output power low alarm : Off
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 : On
Laser bias current high alarm threshold : 15.000 mA
Laser bias current low alarm threshold : 1.000 mA
Laser bias current high warning threshold : 13.000 mA
Laser bias current low warning threshold : 2.000 mA
Laser output power high alarm threshold : 1.9952 mW / 3.00 dBm
Laser output power low alarm threshold : 0.1584 mW / -8.00 dBm
Laser output power high warning threshold : 1.5848 mW / 2.00 dBm
Laser output power low warning threshold : 0.1778 mW / -7.50 dBm
Module temperature high alarm threshold : 95.00 degrees C / 203.00 degrees F
Module temperature low alarm threshold : -50.00 degrees C / -58.00 degrees F
Module temperature high warning threshold : 90.00 degrees C / 194.00 degrees F
Module temperature low warning threshold : -45.00 degrees C / -49.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 : 1.1220 mW / 0.50 dBm
Laser rx power low alarm threshold : 0.0199 mW / -17.01 dBm
Laser rx power high warning threshold : 1.0000 mW / 0.00 dBm
Laser rx power low warning threshold : 0.0223 mW / -16.52 dBm
Well, that is because EEPROM advertises the connector as LC, but I see that it finds the onboard AQR via RollBall protocol just fine so it should work even when miss-represented