|
@@ -3968,6 +3968,10 @@ static int e1000_close(struct net_device *netdev)
|
|
|
{
|
|
|
struct e1000_adapter *adapter = netdev_priv(netdev);
|
|
|
struct pci_dev *pdev = adapter->pdev;
|
|
|
+ int count = E1000_CHECK_RESET_COUNT;
|
|
|
+
|
|
|
+ while (test_bit(__E1000_RESETTING, &adapter->state) && count--)
|
|
|
+ usleep_range(10000, 20000);
|
|
|
|
|
|
WARN_ON(test_bit(__E1000_RESETTING, &adapter->state));
|
|
|
|
|
@@ -5472,6 +5476,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->state) && count--)
|
|
|
+ usleep_range(10000, 20000);
|
|
|
+
|
|
|
WARN_ON(test_bit(__E1000_RESETTING, &adapter->state));
|
|
|
e1000e_down(adapter);
|
|
|
e1000_free_irq(adapter);
|