|
@@ -876,7 +876,7 @@ out:
|
|
|
efx_schedule_reset(efx, RESET_TYPE_DISABLE);
|
|
|
} else {
|
|
|
efx_start_all(efx);
|
|
|
- netif_device_attach(efx->net_dev);
|
|
|
+ efx_device_attach_if_not_resetting(efx);
|
|
|
}
|
|
|
return rc;
|
|
|
|
|
@@ -2182,6 +2182,8 @@ int efx_net_open(struct net_device *net_dev)
|
|
|
efx_link_status_changed(efx);
|
|
|
|
|
|
efx_start_all(efx);
|
|
|
+ if (efx->state == STATE_DISABLED || efx->reset_pending)
|
|
|
+ netif_device_detach(efx->net_dev);
|
|
|
efx_selftest_async_start(efx);
|
|
|
return 0;
|
|
|
}
|
|
@@ -2248,7 +2250,7 @@ static int efx_change_mtu(struct net_device *net_dev, int new_mtu)
|
|
|
mutex_unlock(&efx->mac_lock);
|
|
|
|
|
|
efx_start_all(efx);
|
|
|
- netif_device_attach(efx->net_dev);
|
|
|
+ efx_device_attach_if_not_resetting(efx);
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
@@ -2744,7 +2746,7 @@ out:
|
|
|
efx->state = STATE_DISABLED;
|
|
|
} else {
|
|
|
netif_dbg(efx, drv, efx->net_dev, "reset complete\n");
|
|
|
- netif_device_attach(efx->net_dev);
|
|
|
+ efx_device_attach_if_not_resetting(efx);
|
|
|
}
|
|
|
return rc;
|
|
|
}
|
|
@@ -3417,7 +3419,7 @@ static int efx_pm_thaw(struct device *dev)
|
|
|
|
|
|
efx_start_all(efx);
|
|
|
|
|
|
- netif_device_attach(efx->net_dev);
|
|
|
+ efx_device_attach_if_not_resetting(efx);
|
|
|
|
|
|
efx->state = STATE_READY;
|
|
|
|