View Issue Details

IDProjectCategoryView StatusLast Update
0001512channel: elrepo/el9kmod-r8125public2025-02-28 10:54
Reporterleblancs Assigned Totqhoang  
PrioritynormalSeverityblockReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSRocky Linux el9OS Version5.14.0-503.26
Summary0001512: Realtek RTL8125 2.5GbE Controller not supported
DescriptionHi, I was asked from toracat user to report a bug regarding my reported issue on Rocky Linux forum.
I copied here the information I provided. Thanks!
--------------
I bought an ASUS TUF Gaming Motherboard (X870-PLUS WIFI) in January and I am trying to setup Rocky Linux on it.
Sadly, I have an issue with the Network Adapter on the Motherboard. It seems it is not supported by default. So I am trying to get the driver software and build it.
Today, I even tried installing Linux Mint and Ubuntu and they have the same support issue with it.

The OS detect the network adapter and tries to run the driver.
dmesg contains:
[ 0.853518] r8169 0000:06:00.0: error -ENODEV: unknown chip XID 688, contact r8169 maintainers (see MAINTAINERS file)

lspci -nnk | grep -A3 -i “8125”
06:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller [10ec:8125] (rev 0c)
DeviceName: Realtek RTL8125D LAN
Subsystem: ASUSTeK Computer Inc. Device [1043:88e1]
Kernel modules: r8169

RealTek RTL8125 rev0c seems to be somehow problematic according to what I find on the net so far.

This is a fresh installation of Rocky Linux, and I also updated all to latest as of today

uname -r
5.14.0-503.26.1.el9_5.x86_64

I downloaded the package r8125-9.014.01.tar from the RealTek web site
autorun.sh returns the following:

sudo ./autorun.sh

Check old driver and unload it.
rmmod r8169
Build the module and install
/home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c: In function ‘rtl8125_proc_open’:
/home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c:2903:50: error: implicit declaration of function ‘PDE_DATA’; did you mean ‘NODE_DATA’? [-Werror=implicit-function-declaration]
2903 | int (*show)(struct seq_file *, void ) = PDE_DATA(inode);
| ^~~~~~~~
| NODE_DATA
/home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c:2903:50: warning: initialization of ‘int ()(struct seq_file *, void )’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
/home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c: At top level:
/home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c:7767:31: error: initialization of ‘void ()(struct net_device *, struct ethtool_ringparam *, struct kernel_ethtool_ringparam *, struct netlink_ext_ack )’ from incompatible pointer type ‘void ()(struct net_device *, struct ethtool_ringparam )’ [-Werror=incompatible-pointer-types]
7767 | .get_ringparam = rtl8125_get_ringparam,
| ^~~~~~~~~~~~~~~~~~~~~
/home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c:7767:31: note: (near initialization for ‘rtl8125_ethtool_ops.get_ringparam’)
/home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c:7768:31: error: initialization of ‘int ()(struct net_device *, struct ethtool_ringparam *, struct kernel_ethtool_ringparam *, struct netlink_ext_ack )’ from incompatible pointer type ‘int ()(struct net_device *, struct ethtool_ringparam )’ [-Werror=incompatible-pointer-types]
7768 | .set_ringparam = rtl8125_set_ringparam,
| ^~~~~~~~~~~~~~~~~~~~~
/home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c:7768:31: note: (near initialization for ‘rtl8125_ethtool_ops.set_ringparam’)
/home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c:7828:20: error: initialization of ‘int ()(struct net_device *, struct ethtool_keee )’ from incompatible pointer type ‘int ()(struct net_device *, struct ethtool_eee )’ [-Werror=incompatible-pointer-types]
7828 | .get_eee = rtl_ethtool_get_eee,
| ^~~~~~~~~~~~~~~~~~~
/home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c:7828:20: note: (near initialization for ‘rtl8125_ethtool_ops.get_eee’)
/home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c:7829:20: error: initialization of ‘int ()(struct net_device *, struct ethtool_keee )’ from incompatible pointer type ‘int ()(struct net_device *, struct ethtool_eee *)’ [-Werror=incompatible-pointer-types]
7829 | .set_eee = rtl_ethtool_set_eee,
| ^~~~~~~~~~~~~~~~~~~
/home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c:7829:20: note: (near initialization for ‘rtl8125_ethtool_ops.set_eee’)
In file included from /home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c:87:
/home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c: In function ‘rtl8125_init_napi’:
/home/patsim/SIMON/r8125-9.014.01.tar/src/r8125.h:880:57: error: too many arguments to function ‘netif_napi_add’
880 | #define RTL_NAPI_CONFIG(ndev, priv, function, weight) netif_napi_add(ndev, &priv->napi, function, weight)
| ^~~~~~~~~~~~~~
/home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c:17215:17: note: in expansion of macro ‘RTL_NAPI_CONFIG’
17215 | RTL_NAPI_CONFIG(tp->dev, r8125napi, poll, R8125_NAPI_WEIGHT);
| ^~~~~~~~~~~~~~~
In file included from /home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c:42:
./include/linux/netdevice.h:2694:1: note: declared here
2694 | netif_napi_add(struct net_device *dev, struct napi_struct *napi,
| ^~~~~~~~~~~~~~
/home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c: In function ‘rtl8125_init_one’:
/home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.c:17357:17: error: implicit declaration of function ‘netif_set_gso_max_size’; did you mean ‘netif_set_tso_max_size’? [-Werror=implicit-function-declaration]
17357 | netif_set_gso_max_size(dev, LSO_64K);
| ^~~~~~~~~~~~~~~~~~~~~~
| netif_set_tso_max_size
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:249: /home/patsim/SIMON/r8125-9.014.01.tar/src/r8125_n.o] Error 1
make[2]: *** [Makefile:1944: /home/patsim/SIMON/r8125-9.014.01.tar/src] Error 2
make[1]: *** [Makefile:193: modules] Error 2
make: *** [Makefile:41: modules] Error 2

Any help with this will be very appreciated.
Steps To ReproduceInstall latest Rocky Linux OS over the ASUS TUF Gaming Motherboard (X870-PLUS WIFI) .
Try to build the downloaded r8125-9.014.01.tar driver.
https://www.realtek.com/Download/List?cate_id=584
Tagsdriver

Relationships

related to 0001513 closedtqhoang r8125 for EL9 x86_64 

Activities

leblancs

2025-02-23 23:16

reporter   ~0010318

There is a new version of the driver on the Realtek download site (9.015, dated from Feb 21st), but same issue.
https://www.realtek.com/Download/ToDownload?type=direct&downloadid=3763

pperry

2025-02-24 05:01

administrator   ~0010319

Last edited: 2025-02-24 05:05

@tqhoang

This is the upstream commit that adds support for the XID 688 (0x688) variant to the kernel r8169 driver:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/net/ethernet/realtek/r8169_main.c?h=v6.14-rc4&id=f75d1fbe7809bc5ed134204b920fd9e2fc5db1df

There is also a later commit adding support for a further 0x689 variant (not needed here, but only a matter of time):

https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=a14a429069bb1a18eb9fe63d68fcaa77dffe0e23

One would hope the OEM r8125 also contains support for these latest revisions, depending if you choose to go the kernel or OEM driver route for this.

tqhoang

2025-02-24 08:41

manager   ~0010321

@pperry

Thanks for the detective work on that. I already finished patching OEM driver of both r8125 and r8126 yesterday though. I figure at some point Red Hat will add support for the newer rtl8125 & rtl8126 chips, so ours can still be a viable alternative.

pperry

2025-02-24 10:00

administrator   ~0010323

Yes, now support has been added to the upstream kernel, I'm sure it will (eventually) get backporting into the RHEL kernel.
This, of course, is where elrepo excels, being able to backport support quickly for new hardware and not having to wait 6-12 months for our friends at Red Hat.

tqhoang

2025-02-24 10:19

manager   ~0010324

Last edited: 2025-02-24 11:57

@leblancs

We have the following packages syncing to our testing repo:
kmod-r8125-9.015.00-1.el9_5.elrepo.x86_64.rpm
kmod-r8126-10.015.00-1.el9_5.elrepo.x86_64.rpm

To install:
sudo dnf install --enablerepo elrepo-testing kmod-r8125

If by chance you also have any cards with the RTL8126 chip, could you please test the kmod-r8126 too?


UPDATE: This is currently missing a blacklist config file to disable the in-kernel r8169 driver. Please let us know if it's working without it.

leblancs

2025-02-24 19:19

reporter   ~0010327

Thanks guys, super-fast feedback. I am impressed!

Trying to test (r8125)
sudo dnf install --enablerepo elrepo-testing kmod-r8125
Error: Unknown repo: 'elrepo-testing'

Is the elrepo-testing name contains a typo? Or I need to do more manipulations?

As for rtl8126, I do not have it on my motherboard or a card. I do have the wifi device chipset (mt7925)

As soon as I resolve the testing repo, I will give you feedback on the fix and if I have to blacklist the r8169 driver.

toracat

2025-02-24 19:28

administrator   ~0010328

Please set up the elrepo repository by following the instructions on https://elrepo.org/ .

leblancs

2025-02-24 19:44

reporter   ~0010329

Ok, done, thanks.
r8125 RPM installed.
I rebooted the PC, my eno1 is now available and IP present with access to web.

Great job guys!

Now, do I expect this change will become official in the future releases of RockyLinux?
Will the change support future RockyLinux Kernel updates?

Also, @toracat, regarding my initial support request from the Rocky Linux Help & Support forum, should I update info with current conversation?
(sorry, I have kind of new as active user on this forum and support request process)

Best regards!

toracat

2025-02-24 19:52

administrator   ~0010330

> Also, @toracat, regarding my initial support request from the Rocky Linux Help &
> Support forum, should I update info with current conversation?

Yes, please do. That would help others with the same or a similar problem.

tqhoang

2025-02-24 22:12

manager   ~0010332

> Now, do I expect this change will become official in the future releases of RockyLinux?
Will the change support future RockyLinux Kernel updates?

It is very likely that Red Hat will parch the in-kernel r8169 driver to support the newer chips. My guess is that it might not happen until EL 9.6 though.

As for kernel compatibility, this driver *should*!be compatible with all EL9.5 updates but sometimes the kABI is broken and we need to rebuild the driver against the errata kernel.

I’m going to mark this as resolved and close the issue. If you have any future problems, please open another ticket.

tqhoang

2025-02-28 10:54

manager   ~0010339

FYI the r8125 and r8126 drivers have been moved to the main elrepo repository.

Issue History

Date Modified Username Field Change
2025-02-23 23:10 leblancs New Issue
2025-02-23 23:10 leblancs Status new => assigned
2025-02-23 23:10 leblancs Assigned To => toracat
2025-02-23 23:10 leblancs Tag Attached: driver
2025-02-23 23:16 leblancs Note Added: 0010318
2025-02-23 23:35 tqhoang Assigned To toracat => tqhoang
2025-02-23 23:40 tqhoang Status assigned => acknowledged
2025-02-23 23:40 tqhoang Category ecryptfs-utils => kmod-r8125
2025-02-24 05:01 pperry Note Added: 0010319
2025-02-24 05:04 pperry Note Edited: 0010319
2025-02-24 05:05 pperry Note Edited: 0010319
2025-02-24 05:06 pperry Relationship added related to 0001513
2025-02-24 08:41 tqhoang Note Added: 0010321
2025-02-24 10:00 pperry Note Added: 0010323
2025-02-24 10:19 tqhoang Note Added: 0010324
2025-02-24 10:20 tqhoang Status acknowledged => feedback
2025-02-24 11:57 tqhoang Note Edited: 0010324
2025-02-24 19:19 leblancs Note Added: 0010327
2025-02-24 19:19 leblancs Status feedback => assigned
2025-02-24 19:28 toracat Note Added: 0010328
2025-02-24 19:44 leblancs Note Added: 0010329
2025-02-24 19:52 toracat Note Added: 0010330
2025-02-24 22:12 tqhoang Note Added: 0010332
2025-02-24 22:12 tqhoang Status assigned => closed
2025-02-24 22:12 tqhoang Resolution open => fixed
2025-02-28 10:54 tqhoang Note Added: 0010339