[packages/igb] - fix building with linux 3.15 - rel 2

baggins baggins at pld-linux.org
Sat Jul 12 11:50:50 CEST 2014


commit 128c718aa1ec923b8f20f7c8586ee76b648ea1c9
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sat Jul 12 11:50:51 2014 +0200

    - fix building with linux 3.15
    - rel 2

 igb.spec         |  5 ++++-
 linux-3.15.patch | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 37 insertions(+), 1 deletion(-)
---
diff --git a/igb.spec b/igb.spec
index 614df30..1f87ed2 100644
--- a/igb.spec
+++ b/igb.spec
@@ -21,7 +21,7 @@ exit 1
 
 %define		_duplicate_files_terminate_build	0
 
-%define		rel	1
+%define		rel	2
 %define		pname	igb
 Summary:	Intel(R) PRO/1000 driver for Linux
 Summary(pl.UTF-8):	Sterownik do karty Intel(R) PRO/1000
@@ -32,6 +32,7 @@ License:	GPL v2
 Group:		Base/Kernel
 Source0:	http://downloads.sourceforge.net/e1000/%{pname}-%{version}.tar.gz
 # Source0-md5:	7d7430f5a7151d39db038f4a75baa3b9
+Patch0:		linux-3.15.patch
 URL:		http://sourceforge.net/projects/e1000/
 %{?with_dist_kernel:BuildRequires:	kernel%{_alt_kernel}-module-build >= 3:2.6.20.2}
 BuildRequires:	rpm-build-macros >= 1.678
@@ -97,6 +98,8 @@ EOF\
 
 %prep
 %setup -q -n %{pname}-%{version}
+%patch0 -p1
+
 cat > src/Makefile <<'EOF'
 obj-m := igb.o
 igb-objs := igb_main.o e1000_82575.o e1000_i210.o e1000_mac.o e1000_nvm.o e1000_phy.o \
diff --git a/linux-3.15.patch b/linux-3.15.patch
new file mode 100644
index 0000000..9ed7f7b
--- /dev/null
+++ b/linux-3.15.patch
@@ -0,0 +1,33 @@
+--- a/src/igb_main.c
++++ b/src/igb_main.c
+@@ -7366,7 +7366,8 @@ static inline void igb_rx_hash(struct igb_ring *ring,
+ 			       struct sk_buff *skb)
+ {
+ 	if (netdev_ring(ring)->features & NETIF_F_RXHASH)
+-		skb->rxhash = le32_to_cpu(rx_desc->wb.lower.hi_dword.rss);
++		skb_set_hash(skb, le32_to_cpu(rx_desc->wb.lower.hi_dword.rss),
++			     PKT_HASH_TYPE_L3);
+ }
+ 
+ #endif
+--- a/src/kcompat.h
++++ b/src/kcompat.h
+@@ -3831,4 +3831,15 @@ static inline struct sk_buff *__kc__vlan_hwaccel_put_tag(struct sk_buff *skb,
+ #define HAVE_ENCAP_TSO_OFFLOAD
+ #endif /* >= 3.10.0 */
+ 
++#if ( LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0) )
++#ifdef NETIF_F_RXHASH
++#define PKT_HASH_TYPE_L3 0
++static inline void
++skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
++{
++	skb->rxhash = hash;
++}
++#endif /* NETIF_F_RXHASH */
++#endif /* < 3.14.0 */
++
+ #endif /* _KCOMPAT_H_ */
+-- 
+1.9.1
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/igb.git/commitdiff/128c718aa1ec923b8f20f7c8586ee76b648ea1c9



More information about the pld-cvs-commit mailing list