[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-backports
Subject:    [PATCH 06/13] backports: handle new get_eee and set_eee pointers in struct ethtool_ops
From:       Stefan Assmann <sassmann () kpanic ! de>
Date:       2014-05-16 11:21:17
Message-ID: 1400239284-2916-7-git-send-email-sassmann () kpanic ! de
[Download RAW message or body]

In kernel 3.6 struct ethtool_ops received 2 new function pointers get_eee
and set_eee. Address this by putting ifdef around the code.

commit 80f12eccce775dc6bb93dba9b52529740f929237
Author: Yuval Mintz <yuvalmin@broadcom.com>
Date:   Wed Jun 6 17:13:06 2012 +0000

    Added kernel support in EEE Ethtool commands

git describe --contains 80f12eccce775dc6bb93dba9b52529740f929237
v3.6-rc1~125^2~587

Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
---
 .../network/0036-ethtool_eee/INFO                  | 12 +++++++++
 .../network/0036-ethtool_eee/igb_ethtool_eee.patch | 31 ++++++++++++++++++++++
 2 files changed, 43 insertions(+)
 create mode 100644 patches/collateral-evolutions/network/0036-ethtool_eee/INFO
 create mode 100644 patches/collateral-evolutions/network/0036-ethtool_eee/igb_ethtool_eee.patch


diff --git a/patches/collateral-evolutions/network/0036-ethtool_eee/INFO \
b/patches/collateral-evolutions/network/0036-ethtool_eee/INFO new file mode 100644
index 0000000..32650f7
--- /dev/null
+++ b/patches/collateral-evolutions/network/0036-ethtool_eee/INFO
@@ -0,0 +1,12 @@
+In kernel 3.6 struct ethtool_ops received 2 new function pointers get_eee
+and set_eee. Address this by putting ifdef around the code.
+
+
+commit 80f12eccce775dc6bb93dba9b52529740f929237
+Author: Yuval Mintz <yuvalmin@broadcom.com>
+Date:   Wed Jun 6 17:13:06 2012 +0000
+
+    Added kernel support in EEE Ethtool commands
+
+git describe --contains 80f12eccce775dc6bb93dba9b52529740f929237
+v3.6-rc1~125^2~587
diff --git a/patches/collateral-evolutions/network/0036-ethtool_eee/igb_ethtool_eee.patch \
b/patches/collateral-evolutions/network/0036-ethtool_eee/igb_ethtool_eee.patch new \
file mode 100644 index 0000000..dcc5b2b
--- /dev/null
+++ b/patches/collateral-evolutions/network/0036-ethtool_eee/igb_ethtool_eee.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 333a2b0..7c8b9bf 100644
+--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
++++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
+@@ -2589,6 +2589,7 @@ static int igb_set_rxnfc(struct net_device *dev, struct \
ethtool_rxnfc *cmd) + 	return ret;
+ }
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
+ static int igb_get_eee(struct net_device *netdev, struct ethtool_eee *edata)
+ {
+ 	struct igb_adapter *adapter = netdev_priv(netdev);
+@@ -2730,6 +2731,7 @@ static int igb_set_eee(struct net_device *netdev,
+ 
+ 	return 0;
+ }
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0) */
+ 
+ static int igb_get_module_info(struct net_device *netdev,
+ 			       struct ethtool_modinfo *modinfo)
+@@ -3020,8 +3022,10 @@ static const struct ethtool_ops igb_ethtool_ops = {
+ 	.get_ts_info		= igb_get_ts_info,
+ 	.get_rxnfc		= igb_get_rxnfc,
+ 	.set_rxnfc		= igb_set_rxnfc,
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
+ 	.get_eee		= igb_get_eee,
+ 	.set_eee		= igb_set_eee,
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0) */
+ 	.get_module_info	= igb_get_module_info,
+ 	.get_module_eeprom	= igb_get_module_eeprom,
+ 	.get_rxfh_indir_size	= igb_get_rxfh_indir_size,
-- 
1.9.0

--
To unsubscribe from this list: send the line "unsubscribe backports" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic