|
@@ -1440,6 +1440,10 @@ static int e1000_close(struct net_device *netdev)
|
|
|
{
|
|
|
struct e1000_adapter *adapter = netdev_priv(netdev);
|
|
|
struct e1000_hw *hw = &adapter->hw;
|
|
|
+ int count = E1000_CHECK_RESET_COUNT;
|
|
|
+
|
|
|
+ while (test_bit(__E1000_RESETTING, &adapter->flags) && count--)
|
|
|
+ usleep_range(10000, 20000);
|
|
|
|
|
|
WARN_ON(test_bit(__E1000_RESETTING, &adapter->flags));
|
|
|
e1000_down(adapter);
|
|
@@ -4963,6 +4967,11 @@ static int __e1000_shutdown(struct pci_dev *pdev, bool *enable_wake)
|
|
|
netif_device_detach(netdev);
|
|
|
|
|
|
if (netif_running(netdev)) {
|
|
|
+ int count = E1000_CHECK_RESET_COUNT;
|
|
|
+
|
|
|
+ while (test_bit(__E1000_RESETTING, &adapter->flags) && count--)
|
|
|
+ usleep_range(10000, 20000);
|
|
|
+
|
|
|
WARN_ON(test_bit(__E1000_RESETTING, &adapter->flags));
|
|
|
e1000_down(adapter);
|
|
|
}
|