| 30 May 2025 |
emily | right, okay. though in the case of the 10G DAC it says only 10000baseCR/Full. | 14:44:38 |
K900 | Or at least it really shouldn't | 14:44:39 |
emily |
So the supported link modes are the modes that the hardware of the NIC that ethtool is interrogated can actually do. The advertised modes are the modes that are advertised to the partner on the other end over the cable, and the link partner advertised modes are the modes that the NIC at the other end is advertising over the cable.
hmm ok.
| 14:45:05 |
K900 | The advertised mode selection is kinda smart | 14:45:31 |
emily | so I guess the advertised modes are going to be a subset of the supported link modes, which is why for my DAC it only shows the one that was actually chosen (?) | 14:45:31 |
K900 | As in there's some auto-selection going on | 14:45:42 |
K900 | Not sure what exactly | 14:45:48 |
emily | oh ugh could this be OpenWrt-brained DT stuff? | 14:46:06 |
emily | like the device tree says it's 10G only? | 14:46:16 |
K900 | I don't think the device tree should say anything | 14:48:54 |
K900 | But there might be some PCS stuff going on | 14:49:01 |
emily | sfp2 {
tx-disable-gpios = <0x08 0x00 0x00>;
i2c-bus = <0x59>;
rate-select0-gpios = <0x08 0x03 0x01>;
maximum-power-milliwatt = <0xbb8>;
mod-def0-gpios = <0x08 0x53 0x01>;
compatible = "sff,sfp";
tx-fault-gpios = <0x08 0x01 0x00>;
phandle = <0x4d>;
los-gpios = <0x08 0x02 0x00>;
};
yeah I guess nothing here looks relevant
| 14:49:41 |
K900 | That's definitely unrelated, you want to be looking at the MACs/PHYs | 14:50:36 |
K900 | But I think openwrt still ships the older PCS patchset that just encodes all the selection logic inside the driver | 14:51:01 |
K900 | * But I think openwrt still ships the older PCS patchset that just encodes all the selection logic inside the MAC driver | 14:51:08 |
emily | mac@2 {
phy-mode = "usxgmii";
compatible = "mediatek,eth-mac";
status = "okay";
pcs-handle = <0x4e 0x4f>;
managed = "in-band-status";
phys = <0x50>;
reg = <0x02>;
openwrt,netdev-name = "sfp-wan";
phandle = <0x91>;
sfp = <0x51>;
};
| 14:51:44 |
emily | phy-mode seems suspicious. | 14:51:48 |
K900 | https://github.com/K900/linux/blob/bpi-r4-test/arch/arm64/boot/dts/mediatek/mt7988a.dtsi#L1267 | 14:53:56 |
emily | do you have a pointer to the DT used by your kernel stuff? | 14:54:02 |
emily | ah, thanks | 14:54:04 |
K900 | The mainline way of handling it will be this | 14:54:09 |
K900 | Where there's multiple PCS possibly attached to one MAC | 14:54:17 |
K900 | And they're selected at runtime | 14:54:23 |
emily | this is 1 Gbit/s and 10 Gbit/s, right? | 14:54:42 |
emily | I'm hoping to use 2.5 Gbit/s at some point | 14:54:51 |
K900 | SGMII can go up to 2.5G | 14:55:16 |
emily | oh okay | 14:55:25 |
K900 | And USXGMII handles 5G and higher | 14:55:25 |
emily | cool. so in other words I'm screwed with OpenWrt but it should hopefully just work with your branch? | 14:55:48 |
emily | I was hoping to get it working well under OpenWrt as a baseline but maybe the hope for that has passed :p | 14:56:15 |