aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000e/netdev.c
diff options
context:
space:
mode:
authorBruce Allan <bruce.w.allan@intel.com>2010-05-10 14:59:31 +0000
committerDavid S. Miller <davem@davemloft.net>2010-05-12 23:31:09 -0700
commit11b08be830078c1cc4af484d0f85c3a010319c97 (patch)
treebf0cd95d65cdeb4c9fbc61d6a7cce0032fcad691 /drivers/net/e1000e/netdev.c
parente1000e: use static params to save stack space (part 2) (diff)
downloadlinux-dev-11b08be830078c1cc4af484d0f85c3a010319c97.tar.xz
linux-dev-11b08be830078c1cc4af484d0f85c3a010319c97.zip
e1000e: bad state after running ethtool diagnostics with AMT enabled
When running ethtool online diagnostics with no open interface, there is a short period of time where the driver relinquishes control of the adapter during which time AMT (manageability firmware) can put the adapter into an unknown state resulting in such things as link test failure, hardware hang, reporting an incorrect link speed, etc. Resetting the adapter during an open() resolves this by putting the adapter into a quiescent state. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/e1000e/netdev.c')
-rw-r--r--drivers/net/e1000e/netdev.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index c5f65a29865a..ab79bec082f0 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -3444,6 +3444,15 @@ static int e1000_open(struct net_device *netdev)
if (err)
goto err_setup_rx;
+ /*
+ * If AMT is enabled, let the firmware know that the network
+ * interface is now open and reset the part to a known state.
+ */
+ if (adapter->flags & FLAG_HAS_AMT) {
+ e1000_get_hw_control(adapter);
+ e1000e_reset(adapter);
+ }
+
e1000e_power_up_phy(adapter);
adapter->mng_vlan_id = E1000_MNG_VLAN_NONE;
@@ -3452,13 +3461,6 @@ static int e1000_open(struct net_device *netdev)
e1000_update_mng_vlan(adapter);
/*
- * If AMT is enabled, let the firmware know that the network
- * interface is now open
- */
- if (adapter->flags & FLAG_HAS_AMT)
- e1000_get_hw_control(adapter);
-
- /*
* before we allocate an interrupt, we must be ready to handle it.
* Setting DEBUG_SHIRQ in the kernel makes it fire an interrupt
* as soon as we call pci_request_irq, so we have to setup our