To make the RTL8221B work on systems where the PHY is on-board rather than inside an SFP module (like GL-iNet MT-6000 or TP-LINK XDR608x) I still have to either patch phylink to enable in-band-status on the MAC/PCS side anyway (rather than relying only on out-of-band status which seems to be what Linux usually does) or configure the PHY to not use in-band-status as in this patch:
(it may need some love to conditionally enable/disable SGMII in-band-status)
Yep, solving the inband status/an issue is something that I would like to have also. But because the standard for it came very late, now all hardware handles it in different ways, and it now cannot be solved easily.
To get this patch-set to be accepted, I’ll leave the entire inband issue out of this patch-set, same as Marek’s patch-set.
No brand name, and same label design as SFP-2.5G-T. I bought that from BPI’s official taobao store. And photos in the store page are also using SFP-2.5G-T rather than SFP-2.5G-T-R-RM.
Besides, how do you test your patches? I have no clue about how to backport your patches to openwrt’s 5.15…
linux-bpir64-git-6.7.9.bpi.xxxxxxxxxxx.aarch64.pkg.tar.xz file. It is an archlinux package, but also a simple archive you can extract the linux image and modules from.
[ 259.254593] sfp sfp-2: module OEM SFP-2.5G-T-R-RM rev 1.0 sn 2401050130 dc 240105
[ 259.303890] hwmon hwmon1: temp1_input not attached to any thermal zone
[ 264.200000] mt7530-mdio mdio-bus:1f lan4: switched to phy/2500base-x link mode
[ 265.369926] mt7530-mdio mdio-bus:1f lan4: PHY [i2c:sfp-2:11] driver [RTL8221B-VB-CG 2.5Gbps PHY (C45)] (irq=POLL)
[ 272.759918] mt7530-mdio mdio-bus:1f lan4: No phy led trigger registered for speed(100)
[ 272.860118] mt7530-mdio mdio-bus:1f lan4: Link is Up - 100Mbps/Full - flow control rx/tx
[ 272.868285] brlan: port 6(lan4) entered blocking state
[ 272.873418] brlan: port 6(lan4) entered forwarding state
[ 296.599435] mt7530-mdio mdio-bus:1f lan4: Link is Down
[ 296.604701] brlan: port 6(lan4) entered disabled state
[ 315.159919] mt7530-mdio mdio-bus:1f lan4: No phy led trigger registered for speed(1000)
[ 315.260114] mt7530-mdio mdio-bus:1f lan4: Link is Up - 1Gbps/Full - flow control rx/tx
[ 315.268103] brlan: port 6(lan4) entered blocking state
[ 315.273235] brlan: port 6(lan4) entered forwarding state
[ 347.007322] mt7530-mdio mdio-bus:1f lan4: Link is Down
[ 347.012707] brlan: port 6(lan4) entered disabled state
[ 366.119920] mt7530-mdio mdio-bus:1f lan4: No phy led trigger registered for speed(1000)
[ 366.220108] mt7530-mdio mdio-bus:1f lan4: Link is Up - 1Gbps/Full - flow control rx/tx
[ 366.228097] brlan: port 6(lan4) entered blocking state
[ 366.233232] brlan: port 6(lan4) entered forwarding state
[ 413.478011] mt7530-mdio mdio-bus:1f lan4: Link is Down
[ 413.639945] brlan: port 6(lan4) entered disabled state
[ 417.559916] mt7530-mdio mdio-bus:1f lan4: No phy led trigger registered for speed(2500)
[ 417.670114] mt7530-mdio mdio-bus:1f lan4: Link is Up - 2.5Gbps/Full - flow control rx/tx
[ 417.678274] brlan: port 6(lan4) entered blocking state
[ 417.683410] brlan: port 6(lan4) entered forwarding state