What to do about Realtek RTL8125 RTL8126 RTL8127 drivers
-
@olivierlambert Realtek has released three related ethernet PCI chips: RTL8125 (2.5G), RTL8126 (5G), RTL8127 (10G).
Realtek started with a single driver that supported the 8125 and 8126 as they are closely related. The current XCP driver is based on that single set of code. Now they have split the code into three different drivers.
The problem is they have released new versions of the RTL8125 that require new driver code to work. This already caused problem in the mainline upstream Linux and required updates to the kernel driver (early 2025) and at least one XCP user has hit this problem on a desktop board. Since XCP is using the vendor driver, the question is what to do next:
- Do nothing and let people use other ethernets
- Make a new alt-driver for only the 8125 chip (no 8126 support), leave the old 8125 driver alone (maybe for 8.2?)
- Use the new Realtek 8125 code and add new drivers for the 8126 and 8127 (maybe for 8.3?)
- ???
The path forward could be different for XCP 8.3 vs. 8.2.1 ...
-
@Andrew I bought a RTL8126 5G card (because of the price) for my home lab that doesn't appear to be working with 8.3 like you said. It is trying to use the r8125 driver.
[08:53 tw-xcp-ng-02 ~]# ethtool -i eth2 driver: r8125 version: 9.012.04-NAPI-PTP-RSS firmware-version: expansion-rom-version: bus-info: 0000:02:00.0 supports-statistics: yes supports-test: no supports-eeprom-access: no supports-register-dump: yes supports-priv-flags: no
I removed the r8125 driver and manually installed the r8126 driver which I downloaded from here. I can see the interface using the driver, and it shows the 5G capabilities of the driver, however I cannot get this to negotiate the speed (see below). I have tried this with a 2.5G switch and a 10G switch. The 10G switch can negotiate down to 5G so that shouldn't be an issue. On both switches it shows its connection as just fast ethernet. If I manually set the port on the switch to 5G I will not even get a link light.
Would you happen to have any suggestions or ideas to get the card working?
[09:49 tw-xcp-ng-02 ~]# ethtool -i eth2 driver: r8126 version: 10.015.00-NAPI firmware-version: expansion-rom-version: bus-info: 0000:02:00.0 supports-statistics: yes supports-test: no supports-eeprom-access: no supports-register-dump: yes supports-priv-flags: no [09:46 tw-xcp-ng-02 ~]# ethtool eth2 Settings for eth2: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full 2500baseX/Full 2500baseT/Full 5000baseT/Full Supported pause frame use: Symmetric Receive-only Supports auto-negotiation: Yes Supported FEC modes: Not reported Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Half 1000baseT/Full 2500baseX/Full 2500baseT/Full 5000baseT/Full Advertised pause frame use: No Advertised auto-negotiation: Yes Advertised FEC modes: Not reported Speed: Unknown! Duplex: Unknown! (255) Port: Twisted Pair PHYAD: 0 Transceiver: internal Auto-negotiation: on MDI-X: on Supports Wake-on: pumbg Wake-on: d Current message level: 0x00000033 (51) drv probe ifdown ifup Link detected: no
[09:52 tw-xcp-ng-02 ~]# lspci | grep Ethernet 00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (17) I219-LM (rev 11) 02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. Device 8126 (rev 01) 03:00.0 Ethernet controller: Intel Corporation Ethernet Controller I225-V (rev 03)