1 Jun 2025 |
emily | when you ethtool -s sfp-wan advertise 0x20 , what part of this whole system are you adjusting? | 13:02:37 |
K900 | Technically it's both | 13:02:55 |
K900 | (yay) | 13:02:57 |
emily | ah, autonegotiation it looks like | 13:03:00 |
emily | oh good it's both. | 13:03:10 |
K900 | It is supposed to be for autonegotiation | 13:03:13 |
K900 | But phylink does look at it in some places to also determine the SFP link properties sometimes | 13:03:31 |
emily | I think that all of this sucks. | 13:03:42 |
K900 | It definitely does yes | 13:03:49 |
emily | how much would it cost to convince some SFP+ manufacturer on AliExpress to make me a custom module configured exactly how I want. | 13:03:58 |
emily | all they have to do is flip a few bits. | 13:04:08 |
emily | I wonder if I can write to the EEPROM or something. | 13:04:26 |
K900 | You usually can yes | 13:05:07 |
K900 | As in they usually don't bother write protecting it | 13:05:16 |
emily | "run a command", or "opening up the damn thing and attaching wires"? | 13:05:57 |
emily | https://www.hitoha.moe/read-sfp-i2c-via-ch341a-programmer/ apparently "buy an off-the-shelf programmer and hook it up to the external interface" level of easy | 13:10:07 |
emily | that's not so bad. | 13:10:10 |
emily | so wait, is the idea of the Realtek "rollball" thing that you still use the MAC that's on the transceiver but the kernel gets to talk to it directly? | 13:13:17 |
emily | which is different from a 2500BASE-X thing where you don't even use the transceiver's MAC and your SoC's MAC just talks to the PHY directly? | 13:13:32 |
K900 | You can directly poke the i2c bus from Linux | 13:31:47 |
emily | okay cool | 13:32:10 |
emily | and I guess it can't brick the thing since I can always just restore? | 13:32:15 |
K900 | Yes | 13:47:38 |
emily | that seems promising then. | 13:49:12 |
magic_rb | @emilazy:matrix.org once you figure this out ill actually be curious too, wanna get a openwrt switch so ill need smth i can put in it and 2.5 is a good speed for most things | 14:08:16 |
K900 | OK great | 14:50:47 |
K900 | I found more cursed knowledge | 14:50:52 |
K900 | Turns out the Realtek kernel will spin up the SFP link in whatever way you have it configured | 14:51:29 |
K900 | And if it doesn't get a link set up in a short enough time, it'll just try every other one | 14:51:44 |
K900 | Until it finds one that works. | 14:51:49 |