XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    What to do about Realtek RTL8125 RTL8126 RTL8127 drivers

    Scheduled Pinned Locked Moved XCP-ng
    3 Posts 2 Posters 199 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Online
      Andrew Top contributor
      last edited by

      @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:

      1. Do nothing and let people use other ethernets
      2. Make a new alt-driver for only the 8125 chip (no 8126 support), leave the old 8125 driver alone (maybe for 8.2?)
      3. Use the new Realtek 8125 code and add new drivers for the 8126 and 8127 (maybe for 8.3?)
      4. ???

      The path forward could be different for XCP 8.3 vs. 8.2.1 ...

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        snowstruk @Andrew
        last edited by olivierlambert

        @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)
        A 1 Reply Last reply Reply Quote 0
        • A Online
          Andrew Top contributor @snowstruk
          last edited by

          @snowstruk The stock XCP 8.3 r8125 driver works for my 8125 and 8126 devices. I have not tried it a 5G, so it's possible the 8126 is not working at 5G (I don't see it advertised) with the current driver.

          I have run the current dedicated realtek 8125 driver and it works but I have not tried the 8126 driver. I don't know how many people are using the 8126 chipset (I guess not many).

          If your device is not working at >1G then it sees to be a hardware incompatibility issue. You could try loading the new 8126 firmware to see if that helps.

          Here's the output about my test 8126 card (attached to a 2.5G switch):

          # lspci -v -s 04:00.0
          04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8126 5GbE Controller (rev 01)
                  Subsystem: Realtek Semiconductor Co., Ltd. Device 0123
                  Flags: bus master, fast devsel, latency 0, IRQ 18
                  I/O ports at 3000 [size=256]
                  Memory at e0d00000 (64-bit, non-prefetchable) [size=64K]
                  Memory at e0d10000 (64-bit, non-prefetchable) [size=16K]
                  Expansion ROM at e0d20000 [disabled] [size=64K]
                  Capabilities: [40] Power Management version 3
                  Capabilities: [50] MSI: Enable- Count=1/1 Maskable+ 64bit+
                  Capabilities: [70] Express Endpoint, MSI 01
                  Capabilities: [b0] MSI-X: Enable+ Count=32 Masked-
                  Capabilities: [d0] Vital Product Data
                  Capabilities: [100] Advanced Error Reporting
                  Capabilities: [148] Virtual Channel
                  Capabilities: [170] Device Serial Number 01-00-00-00-b4-b3-c9-88
                  Capabilities: [180] #19
                  Capabilities: [190] Transaction Processing Hints
                  Capabilities: [21c] Latency Tolerance Reporting
                  Capabilities: [224] L1 PM Substates
                  Capabilities: [234] Vendor Specific Information: ID=0002 Rev=4 Len=100 <?>
                  Kernel driver in use: r8125
                  Kernel modules: r8125
          
          # ethtool -i eth1
          driver: r8125
          version: 9.012.04-NAPI-PTP-RSS
          firmware-version: rtl8126a-2_0.0.2 02/01/24
          expansion-rom-version:
          bus-info: 0000:04:00.0
          supports-statistics: yes
          supports-test: no
          supports-eeprom-access: no
          supports-register-dump: yes
          supports-priv-flags: no
          
          # ethtool eth1
          Settings for eth1:
                  Supported ports: [ TP ]
                  Supported link modes:   10baseT/Half 10baseT/Full
                                          100baseT/Half 100baseT/Full
                                          1000baseT/Full
                                          2500baseX/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/Full
                                          2500baseX/Full
                  Advertised pause frame use: Symmetric Receive-only
                  Advertised auto-negotiation: Yes
                  Advertised FEC modes: Not reported
                  Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                                       100baseT/Half 100baseT/Full
                                                       1000baseT/Full
                                                       2500baseX/Full
                  Link partner advertised pause frame use: Symmetric Receive-only
                  Link partner advertised auto-negotiation: Yes
                  Link partner advertised FEC modes: Not reported
                  Speed: 2500Mb/s
                  Duplex: Full
                  Port: Twisted Pair
                  PHYAD: 0
                  Transceiver: internal
                  Auto-negotiation: on
                  MDI-X: Unknown
                  Supports Wake-on: pumbg
                  Wake-on: g
                  Current message level: 0x00000033 (51)
                                         drv probe ifdown ifup
                  Link detected: yes
          
          1 Reply Last reply Reply Quote 0
          • First post
            Last post