]> git.pld-linux.org Git - packages/r8168.git/commitdiff
- up to 8.049.02 auto/th/r8168-8.049.02-1
authorJan Rękorajski <baggins@pld-linux.org>
Sat, 2 Apr 2022 21:41:21 +0000 (23:41 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Sat, 2 Apr 2022 21:41:21 +0000 (23:41 +0200)
kernel-4.9.256.patch [deleted file]
kernel-5.17.patch [new file with mode: 0644]
kernel-5.6.patch [deleted file]
r8168.spec

diff --git a/kernel-4.9.256.patch b/kernel-4.9.256.patch
deleted file mode 100644 (file)
index 3c8feb5..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-diff -ur r8168-8.048.02/src/r8168_n.c r8168-8.048.02-256/src/r8168_n.c
---- r8168-8.048.02/src/r8168_n.c       2021-02-06 21:15:28.271768114 +0100
-+++ r8168-8.048.02-256/src/r8168_n.c   2021-02-06 21:15:11.085159309 +0100
-@@ -24389,11 +24389,11 @@
-         tp->advertising = advertising_mode;
-         tp->max_jumbo_frame_size = rtl_chip_info[tp->chipset].jumbo_frame_sz;
--#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)
-         /* MTU range: 60 - hw-specific max */
-         dev->min_mtu = ETH_ZLEN;
-         dev->max_mtu = tp->max_jumbo_frame_size;
--#endif //LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
-+#endif //LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)
-         tp->eee_enabled = eee_enable;
-         tp->eee_adv_t = MDIO_EEE_1000T | MDIO_EEE_100TX;
- }
-@@ -27421,12 +27421,12 @@
-         int ret = 0;
-         unsigned long flags;
--#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0)
-         if (new_mtu < ETH_ZLEN)
-                 return -EINVAL;
-         else if (new_mtu > tp->max_jumbo_frame_size)
-                 new_mtu = tp->max_jumbo_frame_size;
--#endif //LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
-+#endif //LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0)
-         spin_lock_irqsave(&tp->lock, flags);
-         dev->mtu = new_mtu;
-@@ -28798,7 +28798,7 @@
-                 }
- #endif
--#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)
-                 if (RTL_NETIF_RX_COMPLETE(dev, napi, work_done) == FALSE) return RTL_NAPI_RETURN_VALUE;
- #else
-                 RTL_NETIF_RX_COMPLETE(dev, napi, work_done);
diff --git a/kernel-5.17.patch b/kernel-5.17.patch
new file mode 100644 (file)
index 0000000..2c836c3
--- /dev/null
@@ -0,0 +1,45 @@
+--- r8168-8.048.02/src/r8168_n.c~      2022-04-02 22:25:30.000000000 +0200
++++ r8168-8.048.02/src/r8168_n.c       2022-04-02 22:28:28.896501079 +0200
+@@ -1615,7 +1615,11 @@
+ static int rtl8168_proc_open(struct inode *inode, struct file *file)
+ {
+         struct net_device *dev = proc_get_parent_data(inode);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,17,0)
+         int (*show)(struct seq_file *, void *) = PDE_DATA(inode);
++#else
++        int (*show)(struct seq_file *, void *) = pde_data(inode);
++#endif
+         return single_open(file, show, dev);
+ }
+--- r8168-8.049.02/src/r8168_n.c.orig  2022-04-02 23:30:49.000000000 +0200
++++ r8168-8.049.02/src/r8168_n.c       2022-04-02 23:40:02.568626144 +0200
+@@ -24065,6 +24065,9 @@
+         struct rtl8168_private *tp = netdev_priv(dev);
+         int i;
+         u8 mac_addr[MAC_ADDR_LEN];
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)
++        u8 addr[ETH_ALEN] __aligned(4);
++#endif
+         for (i = 0; i < MAC_ADDR_LEN; i++)
+                 mac_addr[i] = RTL_R8(tp, MAC0 + i);
+@@ -24132,10 +24135,18 @@
+         rtl8168_rar_set(tp, mac_addr);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)
++        for (i = 0; i < MAC_ADDR_LEN; 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);
++#else
+         for (i = 0; i < MAC_ADDR_LEN; i++) {
+                 dev->dev_addr[i] = RTL_R8(tp, MAC0 + i);
+                 tp->org_mac_addr[i] = dev->dev_addr[i]; /* keep the original MAC address */
+         }
++#endif
+ #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,13)
+         memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
+ #endif
diff --git a/kernel-5.6.patch b/kernel-5.6.patch
deleted file mode 100644 (file)
index 925148a..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
---- r8168-8.048.02/src/r8168_n.c~      2020-02-12 15:43:44.000000000 +0100
-+++ r8168-8.048.02/src/r8168_n.c       2020-04-04 22:52:03.066746887 +0200
-@@ -1616,12 +1616,21 @@
-         return single_open(file, show, dev);
- }
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
- static const struct file_operations rtl8168_proc_fops = {
-         .open           = rtl8168_proc_open,
-         .read           = seq_read,
-         .llseek         = seq_lseek,
-         .release        = single_release,
- };
-+#else
-+static const struct proc_ops rtl8168_proc_fops = {
-+        .proc_open          = rtl8168_proc_open,
-+        .proc_read          = seq_read,
-+        .proc_lseek         = seq_lseek,
-+        .proc_release       = single_release,
-+};
-+#endif
- #endif
- /*
---- r8168-8.048.02/src/r8168_n.c~      2020-04-04 22:53:42.000000000 +0200
-+++ r8168-8.048.02/src/r8168_n.c       2020-04-04 22:58:05.263418678 +0200
-@@ -456,7 +456,11 @@
- static void rtl8168_hw_start(struct net_device *dev);
- static int rtl8168_close(struct net_device *dev);
- static void rtl8168_set_rx_mode(struct net_device *dev);
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
- static void rtl8168_tx_timeout(struct net_device *dev);
-+#else
-+static void rtl8168_tx_timeout(struct net_device *dev, unsigned int txqueue);
-+#endif
- static struct net_device_stats *rtl8168_get_stats(struct net_device *dev);
- static int rtl8168_rx_interrupt(struct net_device *, struct rtl8168_private *, napi_budget);
- static int rtl8168_change_mtu(struct net_device *dev, int new_mtu);
-@@ -27858,7 +27858,11 @@
- }
- static void
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
- rtl8168_tx_timeout(struct net_device *dev)
-+#else
-+rtl8168_tx_timeout(struct net_device *dev, unsigned int txqueue)
-+#endif
- {
-         struct rtl8168_private *tp = netdev_priv(dev);
-         unsigned long flags;
index b0a433c2c1750208f119a0b9ef2a8f967a3c4e0c..4e5ca247eb39288ec8dac80b001dab648a40e92f 100644 (file)
@@ -4,12 +4,12 @@
 # nothing to be placed to debuginfo package
 %define                _enable_debug_packages  0
 
-%define                rel     2
+%define                rel     1
 %define                pname   r8168
 Summary:       Linux driver for RTL8111/8168B PCI Express Gigabit Ethernet controllers
 Summary(pl.UTF-8):     Linuksowy sterownik dla kart sieciowych RTL8111/8168B PCI Express Gigabit Ethernet
 Name:          %{pname}%{_alt_kernel}
-Version:       8.048.02
+Version:       8.049.02
 Release:       %{rel}%{?_pld_builder:@%{_kernel_ver_str}}
 License:       GPL
 Group:         Base/Kernel
@@ -18,9 +18,8 @@ URL:          http://www.realtek.com.tw/
 # https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software
 # unfortunately this download is not DF-friendly.
 Source0:       %{pname}-%{version}.tar.bz2
-# Source0-md5: 45370f7630da1ff6e3a9996e445a94af
-Patch0:                kernel-5.6.patch
-Patch1:                kernel-4.9.256.patch
+# Source0-md5: 9c2191ca3ff85102bc18a41916eceb8b
+Patch0:                kernel-5.17.patch
 BuildRequires: rpmbuild(macros) >= 1.701
 %{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}
 BuildRoot:     %{tmpdir}/%{pname}-%{version}-root-%(id -u -n)
@@ -73,7 +72,6 @@ Express Gigabit Ethernet.\
 %prep
 %setup -q -n %{pname}-%{version}
 %patch0 -p1
-%patch1 -p1
 
 %build
 %{expand:%build_kernel_packages}
This page took 0.08763 seconds and 4 git commands to generate.