Package Details: r8125-dkms 9.013.02-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.63
First Submitted: 2020-11-21 14:53 (UTC)
Last Updated: 2024-04-07 19:01 (UTC)

Dependencies (3)

Required by (0)

Sources (2)

Latest Comments

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

shanedav4 commented on 2022-04-03 23:57 (UTC)

Thank You jeker. Your patch worked perfectly and I was able to compile the code from Realtek's page without a problem.

jeker commented on 2022-04-02 09:18 (UTC)

This patch fixes the build errors for Linux 5.17:

--- r8125-9.008.00/src/r8125_n.c        2022-02-24 16:45:51.000000000 +0100
+++ r8125-9.008.00-linux5.17/src/r8125_n.c      2022-04-02 11:12:08.754829003 +0200
@@ -1750,7 +1750,7 @@
 static int rtl8125_proc_open(struct inode *inode, struct file *file)
 {
         struct net_device *dev = proc_get_parent_data(inode);
-        int (*show)(struct seq_file *, void *) = PDE_DATA(inode);
+        int (*show)(struct seq_file *, void *) = pde_data(inode);

         return single_open(file, show, dev);
 }
@@ -5234,8 +5234,15 @@
 }

 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,15,0)
 static void rtl8125_get_ringparam(struct net_device *dev,
                                   struct ethtool_ringparam *ring)
+#else
+static void rtl8125_get_ringparam(struct net_device *dev,
+                                  struct ethtool_ringparam *ring,
+                                  struct kernel_ethtool_ringparam *kernel_ring,
+                                  struct netlink_ext_ack *extack)
+#endif
 {
         struct rtl8125_private *tp = netdev_priv(dev);

@@ -5245,8 +5252,15 @@
         ring->tx_pending = tp->tx_ring[0].num_tx_desc;
 }

+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,15,0)
 static int rtl8125_set_ringparam(struct net_device *dev,
                                  struct ethtool_ringparam *ring)
+#else
+static int rtl8125_set_ringparam(struct net_device *dev,
+                                  struct ethtool_ringparam *ring,
+                                  struct kernel_ethtool_ringparam *kernel_ring,
+                                  struct netlink_ext_ack *extack)
+#endif
 {
         struct rtl8125_private *tp = netdev_priv(dev);
         u32 new_rx_count, new_tx_count;
@@ -10889,6 +10903,7 @@
         struct rtl8125_private *tp = netdev_priv(dev);
         int i;
         u8 mac_addr[MAC_ADDR_LEN];
+        u8 addr[ETH_ALEN];

         for (i = 0; i < MAC_ADDR_LEN; i++)
                 mac_addr[i] = RTL_R8(tp, MAC0 + i);
@@ -10916,9 +10931,10 @@
         rtl8125_rar_set(tp, mac_addr);

         for (i = 0; i < MAC_ADDR_LEN; i++) {
-                dev->dev_addr[i] = RTL_R8(tp, MAC0 + i);
+                addr[i] = RTL_R8(tp, MAC0 + i);
                 tp->org_mac_addr[i] = dev->dev_addr[i]; /* keep the original MAC address */
         }
+        eth_hw_addr_set(dev, addr);
 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,13)
         memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
 #endif

It's lazily cobbled together from similar patches for r8168 and r8125.

darose commented on 2022-04-01 18:23 (UTC)

I switched over to the r8169 module on 3/30 and haven't run into any issues so far.

ptb commented on 2022-04-01 18:18 (UTC)

Sadly I don't have time to have a look at this in the next two weeks. At the moment I'm testing if the r8169 driver is finally working with my network adapter. So far 2.5GbE is working fine without random interruptions, which it did not with the 5.16 kernel. Did anyone notice issues with the r8169 driver and a r8125 network adapter?

shanedav4 commented on 2022-04-01 11:34 (UTC)

Just another person here with no programming experience saying help. The r8125-dkms works fine with Kernel 5.16 but 5.17 totally hoses it. I try this and I also tried downloading the code from Realtek and that didn't work either with 5.17. When you get a chance could you look into this? Maybe we just need to wait for Realtek to update their code for 5.17. Thank You so much for working to provide this for us. I'll unblacklist r8169 for now.

mathes.s commented on 2022-03-30 12:18 (UTC)

I could fix the not working network for me by removing this package and re-enabling the r8169 module. Then the system used the build module directly from the kernel.

So thanks for your efforts in the past to build this package, but I think I no longer need it.

mathes.s commented on 2022-03-30 08:24 (UTC)

Hi, I am also getting build errors. This comes out of the "var/lib/dkms/r8125/9.008.00/build/make.log"



DKMS make.log for r8125-9.008.00 for kernel 5.17.1-arch1-1 (x86_64)
Mi 30. Mär 10:20:05 CEST 2022
make: Verzeichnis „/usr/lib/modules/5.17.1-arch1-1/build“ wird betreten
  CC [M]  /var/lib/dkms/r8125/9.008.00/build/r8125_n.o
  CC [M]  /var/lib/dkms/r8125/9.008.00/build/rtl_eeprom.o
  CC [M]  /var/lib/dkms/r8125/9.008.00/build/rtltool.o
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c: In Funktion »rtl8125_proc_open«:
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c:1753:50: Fehler: Implizite Deklaration der Funktion »PDE_DATA«; meinten Sie »NODE_DATA«? [-Werror=implicit-function-declaration]
 1753 |         int (*show)(struct seq_file *, void *) = PDE_DATA(inode);
      |                                                  ^~~~~~~~
      |                                                  NODE_DATA
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c:1753:50: Warnung: Initialisierung von »int (*)(struct seq_file *, void *)« von »int« wandelt eine Zahl in einen Zeiger um, ohne explizite Typkonvertierung [-Wint-conversion]
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c: Auf höchster Ebene:
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c:5778:31: Fehler: Initialisierung von »void (*)(struct net_device *, struct ethtool_ringparam *, struct kernel_ethtool_ringparam *, struct netlink_ext_ack *)« von inkompatiblem Zeigertyp »void (*)(struct net_device *, struct ethtool_ringparam *)« [-Werror=incompatible-pointer-types]
 5778 |         .get_ringparam      = rtl8125_get_ringparam,
      |                               ^~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c:5778:31: Anmerkung: (nahe der Initialisierung für »rtl8125_ethtool_ops.get_ringparam«)
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c:5779:31: Fehler: Initialisierung von »int (*)(struct net_device *, struct ethtool_ringparam *, struct kernel_ethtool_ringparam *, struct netlink_ext_ack *)« von inkompatiblem Zeigertyp »int (*)(struct net_device *, struct ethtool_ringparam *)« [-Werror=incompatible-pointer-types]
 5779 |         .set_ringparam      = rtl8125_set_ringparam,
      |                               ^~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c:5779:31: Anmerkung: (nahe der Initialisierung für »rtl8125_ethtool_ops.set_ringparam«)
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c: In Funktion »rtl8125_get_mac_address«:
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c:10919:34: Fehler: Zuweisung der schreibgeschützten Speicherstelle »*(dev->dev_addr + (sizetype)i)«
10919 |                 dev->dev_addr[i] = RTL_R8(tp, MAC0 + i);
      |                                  ^
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c: In Funktion »rtl8125_set_mac_address«:
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c:10947:19: Warnung: Übergabe des Arguments 1 von »memcpy« entfernt Kennzeichner »const« von Zeiger-Ziel-Typ [-Wdiscarded-qualifiers]
10947 |         memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
      |                ~~~^~~~~~~~~~
In Datei, eingebunden von ./include/linux/string.h:253,
                 von ./include/linux/bitmap.h:11,
                 von ./include/linux/cpumask.h:12,
                 von ./arch/x86/include/asm/cpumask.h:5,
                 von ./arch/x86/include/asm/msr.h:11,
                 von ./arch/x86/include/asm/processor.h:22,
                 von ./arch/x86/include/asm/timex.h:5,
                 von ./include/linux/timex.h:65,
                 von ./include/linux/time32.h:13,
                 von ./include/linux/time.h:60,
                 von ./include/linux/stat.h:19,
                 von ./include/linux/module.h:13,
                 von /var/lib/dkms/r8125/9.008.00/build/r8125_n.c:39:
./include/linux/fortify-string.h:212:37: Anmerkung: »void *« erwartet, aber Argument hat Typ »const unsigned char *«
  212 | __FORTIFY_INLINE void *memcpy(void *p, const void *q, __kernel_size_t size)
      |                               ~~~~~~^
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c:10949:32: Warnung: Übergabe des Arguments 2 von »rtl8125_rar_set« entfernt Kennzeichner »const« von Zeiger-Ziel-Typ [-Wdiscarded-qualifiers]
10949 |         rtl8125_rar_set(tp, dev->dev_addr);
      |                             ~~~^~~~~~~~~~
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c:352:66: Anmerkung: »uint8_t *« {alias »unsigned char *«} erwartet, aber Argument hat Typ »const unsigned char *«
  352 | static void rtl8125_rar_set(struct rtl8125_private *tp, uint8_t *addr);
      |                                                         ~~~~~~~~~^~~~
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c: In Funktion »rtl8125_resume«:
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c:15582:32: Warnung: Übergabe des Arguments 2 von »rtl8125_rar_set« entfernt Kennzeichner »const« von Zeiger-Ziel-Typ [-Wdiscarded-qualifiers]
15582 |         rtl8125_rar_set(tp, dev->dev_addr);
      |                             ~~~^~~~~~~~~~
/var/lib/dkms/r8125/9.008.00/build/r8125_n.c:10962:26: Anmerkung: »uint8_t *« {alias »unsigned char *«} erwartet, aber Argument hat Typ »const unsigned char *«
10962 |                 uint8_t *addr)
      |                 ~~~~~~~~~^~~~
cc1: Einige Warnungen werden als Fehler behandelt
make[1]: *** [scripts/Makefile.build:288: /var/lib/dkms/r8125/9.008.00/build/r8125_n.o] Fehler 1
make: *** [Makefile:1831: /var/lib/dkms/r8125/9.008.00/build] Fehler 2
make: Verzeichnis „/usr/lib/modules/5.17.1-arch1-1/build“ wird verlassen


darose commented on 2022-03-29 21:57 (UTC)

I'm getting build errors on kernel 5.17.1

ptb commented on 2021-11-14 15:16 (UTC) (edited on 2021-11-14 15:16 (UTC) by ptb)

@fierce_brake My link is currently full duplex 2,5 GBit/s. I would assume your cable is damaged 100 MBit/s requires 4 wires and >1000 GBit/s requires 8 wires in your Ethernet cable.

fierce_brake commented on 2021-11-14 14:47 (UTC)

Greetings everyone!

anyone unable to go 1000 full duplex ?

in my case the NIC will only connect at 100 full duplex. If i try to force it to 1000 full duplex it will simply fail to connect to the router.