Applied ethtool patch from Jun Yuan. stable-1.5
authorFlorian Pose <fp@igh-essen.com>
Mon, 23 Jul 2012 12:23:42 +0200
branchstable-1.5
changeset 2397 8b9be05873c1
parent 2386 6742f8751872
child 2399 5726bd931ecb
Applied ethtool patch from Jun Yuan.
devices/e1000e/ethtool-2.6.33-ethercat.c
--- a/devices/e1000e/ethtool-2.6.33-ethercat.c	Fri Jul 13 13:16:18 2012 +0200
+++ b/devices/e1000e/ethtool-2.6.33-ethercat.c	Mon Jul 23 12:23:42 2012 +0200
@@ -378,6 +378,9 @@
 {
 	struct e1000_adapter *adapter = netdev_priv(netdev);
 
+	if (adapter->ecdev)
+		return -EBUSY;
+
 	if (data)
 		adapter->flags |= FLAG_RX_CSUM_ENABLED;
 	else
@@ -397,10 +400,6 @@
 
 static int e1000_set_tx_csum(struct net_device *netdev, u32 data)
 {
-	struct e1000_adapter *adapter = netdev_priv(netdev);
-	if (adapter->ecdev)
-		return -EBUSY;
-
 	if (data)
 		netdev->features |= NETIF_F_HW_CSUM;
 	else
@@ -1945,6 +1944,10 @@
 static int e1000_nway_reset(struct net_device *netdev)
 {
 	struct e1000_adapter *adapter = netdev_priv(netdev);
+
+	if (adapter->ecdev)
+		return -EBUSY;
+
 	if (netif_running(netdev))
 		e1000e_reinit_locked(adapter);
 	return 0;