[packages/r8168] - fix building with linux 4.7
baggins
baggins at pld-linux.org
Mon Aug 1 21:36:17 CEST 2016
commit 3084e9e5cecac81091785d36466c5c8314f3e680
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Mon Aug 1 21:35:27 2016 +0200
- fix building with linux 4.7
linux-4.7.patch | 34 ++++++++++++++++++++++++++++++++++
r8168.spec | 2 ++
2 files changed, 36 insertions(+)
---
diff --git a/r8168.spec b/r8168.spec
index 3b2a2b7..876d74e 100644
--- a/r8168.spec
+++ b/r8168.spec
@@ -20,6 +20,7 @@ URL: http://www.realtek.com.tw/
Source0: %{pname}-%{version}.tar.bz2
# Source0-md5: 2c583809d1ebf26ed7f5e775c83e68e0
Patch0: linux-4.5.patch
+Patch1: linux-4.7.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)
@@ -72,6 +73,7 @@ Express Gigabit Ethernet.\
%prep
%setup -q -n %{pname}-%{version}
%patch0 -p1
+%patch1 -p1
%build
%{expand:%build_kernel_packages}
diff --git a/linux-4.7.patch b/linux-4.7.patch
new file mode 100644
index 0000000..6ef62d0
--- /dev/null
+++ b/linux-4.7.patch
@@ -0,0 +1,34 @@
+--- r8168-8.042.00/src/r8168_n.c.orig 2016-08-01 21:20:42.000000000 +0200
++++ r8168-8.042.00/src/r8168_n.c 2016-08-01 21:32:49.488072441 +0200
+@@ -22800,7 +22800,9 @@
+ dev->hw_features &= ~NETIF_F_IPV6_CSUM;
+ netif_set_gso_max_size(dev, LSO_32K);
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,7,0)
+ dev->gso_min_segs = NIC_MIN_PHYS_BUF_COUNT;
++#endif
+ dev->gso_max_segs = NIC_MAX_PHYS_BUF_COUNT_LSO_64K;
+ #endif
+ } else {
+@@ -22808,7 +22810,9 @@
+ dev->features |= NETIF_F_IPV6_CSUM | NETIF_F_TSO6;
+ netif_set_gso_max_size(dev, LSO_64K);
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,7,0)
+ dev->gso_min_segs = NIC_MIN_PHYS_BUF_COUNT;
++#endif
+ dev->gso_max_segs = NIC_MAX_PHYS_BUF_COUNT_LSO2;
+ #endif
+ }
+@@ -24970,7 +24974,11 @@
+ wmb();
+ txd->opts1 = cpu_to_le32(opts1);
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,7,0)
+ dev->trans_start = jiffies;
++#else
++ netif_trans_update(dev);
++#endif
+
+ tp->cur_tx += frags + 1;
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/r8168.git/commitdiff/3084e9e5cecac81091785d36466c5c8314f3e680
More information about the pld-cvs-commit
mailing list