From: Stefan Assmann Date: Fri, 16 May 2014 11:21:19 +0000 (+0200) Subject: backports: handle new get_module_info and get_module_eeprom pointers in struct ethtoo... X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=54584122b3279700f5ef2ba4f260a84273215947;p=openwrt%2Fstaging%2Fblogic.git backports: handle new get_module_info and get_module_eeprom pointers in struct ethtool_ops 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 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 Signed-off-by: Hauke Mehrtens --- 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 index 000000000000..d2cc4fe70f88 --- /dev/null +++ b/patches/collateral-evolutions/network/0037-ethtool_get_module/INFO @@ -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 +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 index 000000000000..851fdc87f2b7 --- /dev/null +++ b/patches/collateral-evolutions/network/0037-ethtool_get_module/igb_get_module.patch @@ -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,