[packages/ixgbe] - fix building with linux 4.7 and compatiility with linux 4.6 - rel 2

baggins baggins at pld-linux.org
Mon Aug 1 21:00:12 CEST 2016


commit db3c5c24ef4a6252cd1f5b9a57650bf16cde3be7
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Mon Aug 1 20:59:41 2016 +0200

    - fix building with linux 4.7 and compatiility with linux 4.6
    - rel 2

 ixgbe.spec      |  4 +++-
 linux-4.6.patch | 14 ++++++++++++++
 2 files changed, 17 insertions(+), 1 deletion(-)
---
diff --git a/ixgbe.spec b/ixgbe.spec
index 50cbb90..097b907 100644
--- a/ixgbe.spec
+++ b/ixgbe.spec
@@ -4,7 +4,7 @@
 # nothing to be placed to debuginfo package
 %define		_enable_debug_packages	0
 
-%define		rel	1
+%define		rel	2
 %define		pname	ixgbe
 Summary:	Intel(R) 10 Gigabit driver for Linux
 Summary(pl.UTF-8):	Sterownik do karty Intel(R) 10 Gigabit
@@ -15,6 +15,7 @@ License:	GPL v2
 Group:		Base/Kernel
 Source0:	http://downloads.sourceforge.net/e1000/%{pname}-%{version}.tar.gz
 # Source0-md5:	e11e83c96afe846b5ee72c309a58e11f
+Patch0:		linux-4.6.patch
 URL:		http://sourceforge.net/projects/e1000/
 %{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}
 BuildRequires:	rpmbuild(macros) >= 1.701
@@ -77,6 +78,7 @@ EOF\
 
 %prep
 %setup -q -n %{pname}-%{version}
+%patch0 -p1
 
 cp src/Makefile src/Makefile.%{name}
 cat > src/Makefile <<'EOF'
diff --git a/linux-4.6.patch b/linux-4.6.patch
new file mode 100644
index 0000000..2f2bc10
--- /dev/null
+++ b/linux-4.6.patch
@@ -0,0 +1,14 @@
+--- ixgbe-4.4.6/src/ixgbe_main.c.orig	2016-06-02 00:50:01.000000000 +0200
++++ ixgbe-4.4.6/src/ixgbe_main.c	2016-08-01 20:57:46.424973720 +0200
+@@ -1656,7 +1656,11 @@
+ 	/* Even if we own the page, we are not allowed to use atomic_set()
+ 	 * This would break get_page_unless_zero() users.
+ 	 */
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,6,0))
+ 	atomic_inc(&page->_count);
++#else
++	page_ref_inc(page);
++#endif
+ 
+ 	return true;
+ }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ixgbe.git/commitdiff/db3c5c24ef4a6252cd1f5b9a57650bf16cde3be7



More information about the pld-cvs-commit mailing list