Bug 218432 - Realtek 8126 PCIe 5 G/bps WIRED ethernet adapter
Summary: Realtek 8126 PCIe 5 G/bps WIRED ethernet adapter
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Network (show other bugs)
Hardware: All Linux
: P3 normal
Assignee: drivers_network@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-29 18:16 UTC by JoeS
Modified: 2024-01-31 16:25 UTC (History)
1 user (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description JoeS 2024-01-29 18:16:03 UTC
I recently built a new PC using the Asus z790 Maximus Formula motherboard.

The z790 Formula uses the Realtek 8126 PCIe 5 G/bps WIRED ethernet adapter.

I am using openSUSE Tumbleweed build 20231228 with kernel 6.6.7-1

There does not seem to be a driver for the Realtek 8126.

Here is the device info from "lspci | grep -i net"

    04:00.0 Network controller: Intel Corporation Device 272b (rev 1a)
    05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. Device 8126 (rev 01)

So it is detects the 8126 just fine it just doesn't have a driver for it.

I checked realtek.com and found

https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software

The download link still says 8125 ( and kernel 6.4 ), but I compiled the source and since I have Secure boot enabled, I signed the
resulting module file.

The driver loads successfully and I now have wired networking and it has worked flawlessly for the last 2 months.

I submitted a bug in Tumbleweed requesting support for the Realtek 8126 be added and was informed that the r8169 kernel module
is what is used to support the older Realtek 8125 device.

Since the drivers from Realtek seem to support both the r8125 and my newer r8126, the Tumbleweed support prepared a test
kernel 6.6.7-1 for me where they added the PCI entry for the r8126 and I installed and tested it out.

Although it does now load the r8169 module with their test kernel, the r8126 device still does not work.

The only 2 lines that reference the r8169 in the dmesg log are these 2 lines:

[    3.237151] r8169 0000:05:00.0: enabling device (0000 -> 0003)
[    3.237289] r8169 0000:05:00.0: error -ENODEV: unknown chip XID 649, contact r8169 maintainers (see MAINTAINERS file)

I reported the results of the test to Tumbleweed support and they said that additional tweaks will be needed for the r8169
module to support the r8126 wired network adapter and thatn I should request to you to add support.

The details of the openSUSE bug report on the issue can be found here:

    https://bugzilla.suse.com/show_bug.cgi?id=1217417

Could we please get support added for the r8126 - Realtek 8126 PCIe 5 G/bps WIRED ethernet adapter added to the kernel ?

Please let me know if you need any further details.

Thank you!
Comment 1 Heiner Kallweit 2024-01-30 14:53:47 UTC
As stated via email already:
This is a feature request, not a bug report.
An experimental patch with RTL8126A support has been sent to you, please report back after testing.
Comment 2 JoeS 2024-01-30 16:12:13 UTC
(In reply to Heiner Kallweit from comment #1)
> As stated via email already:
> This is a feature request, not a bug report.
> An experimental patch with RTL8126A support has been sent to you, please
> report back after testing.

Thanks very much for your quick response.

I forward your patch to the openSUSE people I have been working and they prepared a new test kernel 6.7.2 with the patches for for me to test.

I just installed the test kernel provided with the patches but just as you expected it complains about no dedicated PHY driver found.

Here is the dmesg | grep 8169 output with the information you requested

[    3.176753] r8169 0000:05:00.0: enabling device (0000 -> 0003)
[    3.184887] r8169 0000:05:00.0: no dedicated PHY driver found for PHY ID 0x001cc862, maybe realtek.ko needs to be added to initramfs?
[    3.184912] r8169: probe of 0000:05:00.0 failed with error -49          

Thank you for your efforts.

Please let me know if you need any further details.
Comment 3 JoeS 2024-01-31 16:25:35 UTC
Thank You!

I forward your 2nd patch to the openSUSE people I have been working and they prepared a new test kernel 6.7.2 with both patches for for me to test.

I just installed the test kernel provided with both patches.

Here is the dmesg | grep 8169 output using this new test kernel

[    3.630222] r8169 0000:05:00.0: enabling device (0000 -> 0003)
[    3.632148] r8169 0000:05:00.0 eth0: RTL8126A, e8:9c:25:78:c9:bf, XID 649, IRQ 207
[    3.632150] r8169 0000:05:00.0 eth0: jumbo features [frames: 9194 bytes, tx checksumming: ko]
[    3.633218] r8169 0000:05:00.0 enp5s0: renamed from eth0
[    4.212381] r8169 0000:05:00.0: Direct firmware load for rtl_nic/rtl8126a-2.fw failed with error -2
[    4.212384] r8169 0000:05:00.0: Unable to load firmware rtl_nic/rtl8126a-2.fw (-2)
[    4.236119] RTL8251B 5Gbps PHY r8169-0-500:00: attached PHY driver (mii_bus:phy_addr=r8169-0-500:00, irq=MAC)
[    4.349625] r8169 0000:05:00.0 enp5s0: Link is Down
[    7.858055] r8169 0000:05:00.0 enp5s0: Link is Up - 1Gbps/Full - flow control rx/tx

Although dmesg has these 2 error messages, I have network connectivity, ran a quick speed test and am getting the correct speeds.

[    4.212381] r8169 0000:05:00.0: Direct firmware load for rtl_nic/rtl8126a-2.fw failed with error -2
[    4.212384] r8169 0000:05:00.0: Unable to load firmware rtl_nic/rtl8126a-2.fw (-2)

Here is the 'lsmod | grep 8169' results so you can see what is loaded

r8169                 114688  0 
mdio_devres            12288  1 r8169 
libphy                245760  3 r8169,mdio_devres,realtek

I will continue to test and report back if there are any network issues.

Note You need to log in before you can comment on or make changes to this bug.