From 2e39cca3af21085e2d877dae825d541f4e1794fc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Mon, 30 Mar 2015 20:14:02 +0200 Subject: [PATCH] - up to 3.23.2.1 - fix building with linux 3.19 --- ixgbe.spec | 8 ++++--- linux-3.19.patch | 57 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 3 deletions(-) create mode 100644 linux-3.19.patch diff --git a/ixgbe.spec b/ixgbe.spec index ffab903..d8cb7ae 100644 --- a/ixgbe.spec +++ b/ixgbe.spec @@ -4,17 +4,18 @@ # nothing to be placed to debuginfo package %define _enable_debug_packages 0 -%define rel 2 +%define rel 1 %define pname ixgbe Summary: Intel(R) 10 Gigabit driver for Linux Summary(pl.UTF-8): Sterownik do karty Intel(R) 10 Gigabit Name: %{pname}%{_alt_kernel} -Version: 3.23.2 +Version: 3.23.2.1 Release: %{rel}@%{_kernel_ver_str} License: GPL v2 Group: Base/Kernel Source0: http://downloads.sourceforge.net/e1000/%{pname}-%{version}.tar.gz -# Source0-md5: bf70143cd1060698050745b212a1523e +# Source0-md5: bcec8bd3eb3abfa97d4fe00f272acd69 +Patch0: linux-3.19.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-3.19.patch b/linux-3.19.patch new file mode 100644 index 0000000..7e62b15 --- /dev/null +++ b/linux-3.19.patch @@ -0,0 +1,57 @@ +--- ixgbe-3.23.2.1/src/ixgbe_main.c.orig 2015-03-30 20:07:50.662015699 +0200 ++++ ixgbe-3.23.2.1/src/ixgbe_main.c 2015-03-30 20:12:33.988694214 +0200 +@@ -8874,10 +8874,17 @@ + + #ifdef HAVE_FDB_OPS + #ifdef USE_CONST_DEV_UC_CHAR ++#ifdef USE_NDO_DFLT_FDB_VID ++static int ixgbe_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[], ++ struct net_device *dev, ++ const unsigned char *addr, ++ u16 flags, u16 vid) ++#else + static int ixgbe_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[], + struct net_device *dev, + const unsigned char *addr, + u16 flags) ++#endif + #else + static int ixgbe_ndo_fdb_add(struct ndmsg *ndm, + struct net_device *dev, +@@ -8892,7 +8899,11 @@ + } + + #ifdef USE_CONST_DEV_UC_CHAR ++#ifdef USE_NDO_DFLT_FDB_VID ++ return ndo_dflt_fdb_add(ndm, tb, dev, addr, flags, vid); ++#else + return ndo_dflt_fdb_add(ndm, tb, dev, addr, flags); ++#endif + #else + return ndo_dflt_fdb_add(ndm, dev, addr, flags); + #endif +@@ -8955,7 +8966,11 @@ + + mode = adapter->bridge_mode; + ++#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) ) ++ return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode, 0, 0); ++#else + return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode); ++#endif + } + #endif /* HAVE_BRIDGE_ATTRIBS */ + #endif /* HAVE_FDB_OPS */ +--- ixgbe-3.23.2.1/src/kcompat.h~ 2015-02-18 23:06:34.000000000 +0100 ++++ ixgbe-3.23.2.1/src/kcompat.h 2015-03-30 20:07:25.142014632 +0200 +@@ -3935,6 +3935,10 @@ + #define USE_CONST_DEV_UC_CHAR + #endif /* >= 3.7.0 */ + ++#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) ) ++#define USE_NDO_DFLT_FDB_VID ++#endif ++ + /*****************************************************************************/ + #if ( LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0) ) + #ifndef pci_sriov_set_totalvfs -- 2.44.0