]> git.pld-linux.org Git - packages/r8168.git/commitdiff
- fix building with kernel 4.9.256 auto/th/r8168-8.048.02-2
authorJan Rękorajski <baggins@pld-linux.org>
Sat, 6 Feb 2021 20:20:17 +0000 (21:20 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Sat, 6 Feb 2021 20:20:17 +0000 (21:20 +0100)
- rel 2

kernel-4.9.256.patch [new file with mode: 0644]
r8168.spec

diff --git a/kernel-4.9.256.patch b/kernel-4.9.256.patch
new file mode 100644 (file)
index 0000000..3c8feb5
--- /dev/null
@@ -0,0 +1,41 @@
+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);
index 2d0e5fe33fdc08b5422844a9fc0e938f1cebd1e9..b0a433c2c1750208f119a0b9ef2a8f967a3c4e0c 100644 (file)
@@ -4,7 +4,7 @@
 # nothing to be placed to debuginfo package
 %define                _enable_debug_packages  0
 
 # nothing to be placed to debuginfo package
 %define                _enable_debug_packages  0
 
-%define                rel     1
+%define                rel     2
 %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
 %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
@@ -20,6 +20,7 @@ URL:          http://www.realtek.com.tw/
 Source0:       %{pname}-%{version}.tar.bz2
 # Source0-md5: 45370f7630da1ff6e3a9996e445a94af
 Patch0:                kernel-5.6.patch
 Source0:       %{pname}-%{version}.tar.bz2
 # Source0-md5: 45370f7630da1ff6e3a9996e445a94af
 Patch0:                kernel-5.6.patch
+Patch1:                kernel-4.9.256.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)
 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)
@@ -72,6 +73,7 @@ Express Gigabit Ethernet.\
 %prep
 %setup -q -n %{pname}-%{version}
 %patch0 -p1
 %prep
 %setup -q -n %{pname}-%{version}
 %patch0 -p1
+%patch1 -p1
 
 %build
 %{expand:%build_kernel_packages}
 
 %build
 %{expand:%build_kernel_packages}
This page took 0.16183 seconds and 4 git commands to generate.