Package Details: r8125-dkms 9.014.01-1

Git Clone URL: https://aur.archlinux.org/r8125-dkms.git (read-only, click to copy)
Package Base: r8125-dkms
Description: Kernel module for RTL8125
Upstream URL: https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software
Licenses: GPL2
Conflicts: r8125
Submitter: ptb
Maintainer: aravance
Last Packager: aravance
Votes: 16
Popularity: 0.91
First Submitted: 2020-11-21 14:53 (UTC)
Last Updated: 2024-11-08 20:45 (UTC)

Dependencies (3)

Required by (0)

Sources (2)

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 Next › Last »

boogiepop commented on 2023-08-31 20:30 (UTC)

@aravance.

I need this driver for radxa rock5b SBC. It is using an older vendor kenel based on linux 5.10. For linux < 5.12 the module needs below patch. Could you please apply?

https://raw.githubusercontent.com/radxa-pkg/r8125-dkms/debian/sid/debian/patches/linux5.12.patch

xiuxiu10201 commented on 2023-04-13 03:18 (UTC) (edited on 2023-04-13 03:19 (UTC) by xiuxiu10201)

Throughput monitoring issue

https://github.com/awesometic/realtek-r8125-dkms/issues/33

Ran into the same problem.

stratusfear commented on 2023-01-20 04:43 (UTC)

To match the original functionality from <6.1, the patch should probably change the function from netif_napi_add to netif_napi_add_weight rather than remove the weight parameter. The api was changed in 6.1 to generalize the netif_napi_add function (by removing the weight parameter) and the netif_napi_add_weight function was added in its place for calls where a weight is required/desired.

diff --git 1/6.1.patch 2/6.1.patch
new file mode 100644
index 0000000..da9f9ea
--- /dev/null
+++ 2/6.1.patch
@@ -0,0 +1,15 @@
+diff -Naur r8125-9.011.00-a/src/r8125.h r8125-9.011.00-b/src/r8125.h
+--- r8125-9.011.00-a/src/r8125.h
++++ r8125-9.011.00-b/src/r8125.h
+@@ -676,7 +676,11 @@
+ typedef struct napi_struct *napi_ptr;
+ typedef int napi_budget;
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6,1,0)
+ #define RTL_NAPI_CONFIG(ndev, priv, function, weight)   netif_napi_add(ndev, &priv->napi, function, weight)
++#else
++#define RTL_NAPI_CONFIG(ndev, priv, function, weight)   netif_napi_add_weight(ndev, &priv->napi, function, weight)
++#endif
+ #define RTL_NAPI_QUOTA(budget, ndev)            min(budget, budget)
+ #define RTL_GET_PRIV(stuct_ptr, priv_struct)        container_of(stuct_ptr, priv_struct, stuct_ptr)
+ #define RTL_GET_NETDEV(priv_ptr)            struct net_device *dev = priv_ptr->dev;

atk commented on 2023-01-17 18:30 (UTC) (edited on 2023-01-17 18:30 (UTC) by atk)

With modifications I got bundi78's patch working. The area that caused me some grief was:

+diff -Naur r8125-9.011.00-a/src/r8125.h r8125-9.011.00-b/src/r8125.h
+--- r8125-9.011.00-a/src/r8125.h
++++ r8125-9.011.00-b/src/r8125.h

Are the -a and -b suffixes meant to be included? Removing them (and then skipping the sha256 check) meant I could build and install this. Thanks for doing posting it!

bundi78 commented on 2023-01-17 17:57 (UTC)

Hi, the following patch is working:

diff --git i/PKGBUILD w/PKGBUILD
index 2638681..2408b1e 100644
--- i/PKGBUILD
+++ w/PKGBUILD
@@ -3,22 +3,27 @@
 # Contributor: Shen-Ta Hsieh <ibmibmibm(at)gmail(dot)com>

 _pkgname=r8125
 pkgname=${_pkgname}-dkms
 pkgver=9.011.00
-pkgrel=1
+pkgrel=2
 url="https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software"
 pkgdesc="Kernel module for RTL8125"
 license=('GPL2')
 arch=('any')
 depends=('dkms')
 conflicts=("${_pkgname}")
 optdepends=('linux-headers: Build the module for Arch kernel'
             'linux-lts-headers: Build the module for LTS Arch kernel')
-source=("http://rtitwww.realtek.com/rtdrivers/cn/nic1/${_pkgname}-${pkgver}.tar.bz2" 'dkms.conf')
+source=("http://rtitwww.realtek.com/rtdrivers/cn/nic1/${_pkgname}-${pkgver}.tar.bz2" 'dkms.conf' '6.1.patch')
 sha256sums=('01fbdb249b7ba2984df93a4bd11aecddd1ed904c6be10fc5d776e94b3110b2bf'
-            'ad4c67e0c74661d19b74872f98254184d4b04e32e4c57b338a84fbcefa4c721f')
+            'ad4c67e0c74661d19b74872f98254184d4b04e32e4c57b338a84fbcefa4c721f'
+            '093bee6237012ec1d24fdaaf385a1b17f485e44a2150f8eb2e84e2211e5bfd00')
+
+prepare() {
+  patch -p0 < 6.1.patch
+}

 package() {
   dir_name="${_pkgname}-${pkgver}"
   install -d "${pkgdir}"/usr/src/${dir_name}/
   install -Dm644 dkms.conf "${dir_name}"/src/* "${pkgdir}/usr/src/${dir_name}/"
diff --git 1/6.1.patch 2/6.1.patch
new file mode 100644
index 0000000..da9f9ea
--- /dev/null
+++ 2/6.1.patch
@@ -0,0 +1,15 @@
+diff -Naur r8125-9.011.00-a/src/r8125.h r8125-9.011.00-b/src/r8125.h
+--- r8125-9.011.00-a/src/r8125.h
++++ r8125-9.011.00-b/src/r8125.h
+@@ -676,7 +676,11 @@
+ typedef struct napi_struct *napi_ptr;
+ typedef int napi_budget;
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6,1,0)
+ #define RTL_NAPI_CONFIG(ndev, priv, function, weight)   netif_napi_add(ndev, &priv->napi, function, weight)
++#else
++#define RTL_NAPI_CONFIG(ndev, priv, function, weight)   netif_napi_add(ndev, &priv->napi, function)
++#endif
+ #define RTL_NAPI_QUOTA(budget, ndev)            min(budget, budget)
+ #define RTL_GET_PRIV(stuct_ptr, priv_struct)        container_of(stuct_ptr, priv_struct, stuct_ptr)
+ #define RTL_GET_NETDEV(priv_ptr)            struct net_device *dev = priv_ptr->dev;

AlmaMater commented on 2023-01-14 08:55 (UTC) (edited on 2023-01-14 09:02 (UTC) by AlmaMater)

Greetings, there are issues for linux (6.1.5.arch2-1) and linux-zen (6.1.5.zen2-1) kernels

==> dkms install --no-depmod r8125/9.009.02 -k 6.1.5-arch2-1
Error! Bad return status for module build on kernel: 6.1.5-arch2-1 (x86_64)
Consult /var/lib/dkms/r8125/9.009.02/build/make.log for more information.
==> WARNING: `dkms install --no-depmod r8125/9.009.02 -k 6.1.5-arch2-1' exited 10
==> dkms install --no-depmod r8125/9.009.02 -k 6.1.5-zen2-1-zen
Error! Bad return status for module build on kernel: 6.1.5-zen2-1-zen (x86_64)
Consult /var/lib/dkms/r8125/9.009.02/build/make.log for more information.
==> WARNING: `dkms install --no-depmod r8125/9.009.02 -k 6.1.5-zen2-1-zen' exited 10

make.log

DKMS make.log for r8125-9.011.00 for kernel 6.1.5-arch2-1 (x86_64)
Sat 14 Jan 09:54:09 CET 2023
make: Entering directory '/usr/lib/modules/6.1.5-arch2-1/build'
  CC [M]  /var/lib/dkms/r8125/9.011.00/build/r8125_n.o
  CC [M]  /var/lib/dkms/r8125/9.011.00/build/rtl_eeprom.o
  CC [M]  /var/lib/dkms/r8125/9.011.00/build/rtltool.o
In file included from /var/lib/dkms/r8125/9.011.00/build/r8125_n.c:83:
/var/lib/dkms/r8125/9.011.00/build/r8125_n.c: In function ‘rtl8125_init_napi’:
/var/lib/dkms/r8125/9.011.00/build/r8125.h:679:57: error: too many arguments to function ‘netif_napi_add’
  679 | #define RTL_NAPI_CONFIG(ndev, priv, function, weight)   netif_napi_add(ndev, &priv->napi, function, weight)
      |                                                         ^~~~~~~~~~~~~~
/var/lib/dkms/r8125/9.011.00/build/r8125_n.c:13776:17: note: in expansion of macro ‘RTL_NAPI_CONFIG’
13776 |                 RTL_NAPI_CONFIG(tp->dev, r8125napi, poll, R8125_NAPI_WEIGHT);
      |                 ^~~~~~~~~~~~~~~
In file included from /var/lib/dkms/r8125/9.011.00/build/r8125_n.c:42:
./include/linux/netdevice.h:2569:1: note: declared here
 2569 | netif_napi_add(struct net_device *dev, struct napi_struct *napi,
      | ^~~~~~~~~~~~~~
make[1]: *** [scripts/Makefile.build:250: /var/lib/dkms/r8125/9.011.00/build/r8125_n.o] Error 1
make: *** [Makefile:1992: /var/lib/dkms/r8125/9.011.00/build] Error 2
make: Leaving directory '/usr/lib/modules/6.1.5-arch2-1/build'

It does works for linux-lts 5.15.87

ysblokje commented on 2022-07-21 20:29 (UTC)

the r8125 actually works fine without this specific driver. In my case package r8168 was blacklisting r8169 which supports the r8125.

Kraoc commented on 2022-07-16 13:52 (UTC) (edited on 2022-07-16 13:58 (UTC) by Kraoc)

Last version: 9.009.02

I git/clone source repo, then update PKGBUILD:


# Maintainer: Bernd Amend <bernd.amend(at)gmail(dot)com>
# Contributor: Alex Avance <aravance(at)gmail(dot)com>
# Contributor: Shen-Ta Hsieh <ibmibmibm(at)gmail(dot)com>

_pkgname=r8125
pkgname=${_pkgname}-dkms
#pkgver=9.009.00
pkgver=9.009.02
pkgrel=1
url="https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software"
pkgdesc="Kernel module for RTL8125"
license=('GPL2')
arch=('any')
depends=('dkms')
conflicts=("${_pkgname}")
optdepends=('linux-headers: Build the module for Arch kernel'
            'linux-lts-headers: Build the module for LTS Arch kernel')
source=("http://rtitwww.realtek.com/rtdrivers/cn/nic1/${_pkgname}-${pkgver}.tar.bz2" 'dkms.conf')
#sha256sums=('1f73d1b84372b82efa091eca5075b34ff622bf7f4385dc16359d1be828f54b14'
#            'ad4c67e0c74661d19b74872f98254184d4b04e32e4c57b338a84fbcefa4c721f')
sha256sums=('5e4ba4ca0d0ee21df47e2e3c9fe941119b9407dd083f9c169023c4177b9db80e'
            'ad4c67e0c74661d19b74872f98254184d4b04e32e4c57b338a84fbcefa4c721f')

package() {
  dir_name="${_pkgname}-${pkgver}"
  install -d "${pkgdir}"/usr/src/${dir_name}/
  install -Dm644 dkms.conf "${dir_name}"/src/* "${pkgdir}/usr/src/${dir_name}/"

  sed -e "s/@_PKGNAME@/${_pkgname}/g" \
      -e "s/@PKGVER@/${pkgver}/g" \
      -i "${pkgdir}/usr/src/${dir_name}/dkms.conf"

Then...

makepkg --syncdeps -f && makepkg --install

See you on next reboot :)

swortmj491 commented on 2022-07-05 00:34 (UTC)

Thank you for providing the patch!

ysblokje commented on 2022-07-03 08:57 (UTC)

I hope that ptb gets around to fixing this package. In the meantime I created an aur package simply called r8125 wich is basically the same as the r8168 package in community just for the r8125 device.