diff options
author | Auke Kok <auke\-jan.h.kok@intel.com> | 2006-09-27 15:54:02 -0400 |
---|---|---|
committer | Auke Kok <juke-jan.h.kok@intel.com> | 2006-09-27 15:54:02 -0400 |
commit | 1314bbf3a3d911218fc153e14873e2e384d08084 (patch) | |
tree | 4b2517261087f6d1374fe84272dcf20cd184f701 /drivers/net/e1000/e1000_ethtool.c | |
parent | 4f5f2317fbb3655edae21de3ada0f1692523eeef (diff) |
e1000: driver state fixes (race fix)
We were plagued by our interrupt handler posting a watchdog event which
could occur when our adapter was going down in case a late packet arrived
just before e1000_down() finished. This caused the watchdog timer to start
after the NIC was down and keep rescheduling it every N seconds. Once
the driver unloaded it would panic.
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Diffstat (limited to 'drivers/net/e1000/e1000_ethtool.c')
-rw-r--r-- | drivers/net/e1000/e1000_ethtool.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c index 5edf8a099ceb..2cc949a34451 100644 --- a/drivers/net/e1000/e1000_ethtool.c +++ b/drivers/net/e1000/e1000_ethtool.c | |||
@@ -1624,7 +1624,7 @@ e1000_diag_test(struct net_device *netdev, | |||
1624 | struct e1000_adapter *adapter = netdev_priv(netdev); | 1624 | struct e1000_adapter *adapter = netdev_priv(netdev); |
1625 | boolean_t if_running = netif_running(netdev); | 1625 | boolean_t if_running = netif_running(netdev); |
1626 | 1626 | ||
1627 | set_bit(__E1000_DRIVER_TESTING, &adapter->flags); | 1627 | set_bit(__E1000_TESTING, &adapter->flags); |
1628 | if (eth_test->flags == ETH_TEST_FL_OFFLINE) { | 1628 | if (eth_test->flags == ETH_TEST_FL_OFFLINE) { |
1629 | /* Offline tests */ | 1629 | /* Offline tests */ |
1630 | 1630 | ||
@@ -1669,7 +1669,7 @@ e1000_diag_test(struct net_device *netdev, | |||
1669 | adapter->hw.autoneg = autoneg; | 1669 | adapter->hw.autoneg = autoneg; |
1670 | 1670 | ||
1671 | e1000_reset(adapter); | 1671 | e1000_reset(adapter); |
1672 | clear_bit(__E1000_DRIVER_TESTING, &adapter->flags); | 1672 | clear_bit(__E1000_TESTING, &adapter->flags); |
1673 | if (if_running) | 1673 | if (if_running) |
1674 | dev_open(netdev); | 1674 | dev_open(netdev); |
1675 | } else { | 1675 | } else { |
@@ -1684,7 +1684,7 @@ e1000_diag_test(struct net_device *netdev, | |||
1684 | data[2] = 0; | 1684 | data[2] = 0; |
1685 | data[3] = 0; | 1685 | data[3] = 0; |
1686 | 1686 | ||
1687 | clear_bit(__E1000_DRIVER_TESTING, &adapter->flags); | 1687 | clear_bit(__E1000_TESTING, &adapter->flags); |
1688 | } | 1688 | } |
1689 | msleep_interruptible(4 * 1000); | 1689 | msleep_interruptible(4 * 1000); |
1690 | } | 1690 | } |