backports: handle new get_module_info and get_module_eeprom pointers in struct ethtoo...
authorStefan Assmann <sassmann@kpanic.de>
Fri, 16 May 2014 11:21:19 +0000 (13:21 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 1 Jun 2014 22:16:14 +0000 (00:16 +0200)
In kernel 3.5 struct ethtool_ops received 2 new function pointers
get_module_info and get_module_eeprom. Address this by putting ifdef around
the code.

commit 41c3cb6d20f0252308e9796fa4f3dacb4960de91
Author: Stuart Hodgson <smhodgson@solarflare.com>
Date:   Thu Apr 19 09:44:42 2012 +0100

    ethtool: Extend the ethtool API to obtain plugin module eeprom data

git describe --contains 41c3cb6d20f0252308e9796fa4f3dacb4960de91
v3.5-rc1~109^2~124^2~2

Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
patches/collateral-evolutions/network/0037-ethtool_get_module/INFO [new file with mode: 0644]
patches/collateral-evolutions/network/0037-ethtool_get_module/igb_get_module.patch [new file with mode: 0644]

diff --git a/patches/collateral-evolutions/network/0037-ethtool_get_module/INFO b/patches/collateral-evolutions/network/0037-ethtool_get_module/INFO
new file mode 100644 (file)
index 0000000..d2cc4fe
--- /dev/null
@@ -0,0 +1,14 @@
+In kernel 3.5 struct ethtool_ops received 2 new function pointers
+get_module_info and get_module_eeprom. Address this by putting ifdef around
+the code.
+
+
+commit 41c3cb6d20f0252308e9796fa4f3dacb4960de91
+Author: Stuart Hodgson <smhodgson@solarflare.com>
+Date:   Thu Apr 19 09:44:42 2012 +0100
+
+    ethtool: Extend the ethtool API to obtain plugin module eeprom data
+
+git describe --contains 41c3cb6d20f0252308e9796fa4f3dacb4960de91
+v3.5-rc1~109^2~124^2~2
+
diff --git a/patches/collateral-evolutions/network/0037-ethtool_get_module/igb_get_module.patch b/patches/collateral-evolutions/network/0037-ethtool_get_module/igb_get_module.patch
new file mode 100644 (file)
index 0000000..851fdc8
--- /dev/null
@@ -0,0 +1,31 @@
+diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
+index 75606be..6662b3b 100644
+--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
++++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
+@@ -2735,6 +2735,7 @@ static int igb_set_eee(struct net_device *netdev,
+ }
+ #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0) */
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
+ static int igb_get_module_info(struct net_device *netdev,
+                              struct ethtool_modinfo *modinfo)
+ {
+@@ -2815,6 +2816,7 @@ static int igb_get_module_eeprom(struct net_device *netdev,
+       return 0;
+ }
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) */
+ static int igb_ethtool_begin(struct net_device *netdev)
+ {
+@@ -3030,8 +3032,10 @@ static const struct ethtool_ops igb_ethtool_ops = {
+       .get_eee                = igb_get_eee,
+       .set_eee                = igb_set_eee,
+ #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0) */
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
+       .get_module_info        = igb_get_module_info,
+       .get_module_eeprom      = igb_get_module_eeprom,
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) */
+       .get_rxfh_indir_size    = igb_get_rxfh_indir_size,
+       .get_rxfh_indir         = igb_get_rxfh_indir,
+       .set_rxfh_indir         = igb_set_rxfh_indir,