{
struct ixgbevf_adapter *adapter = netdev_priv(netdev);
+ if (!netif_device_present(netdev))
+ return 0;
+
ixgbevf_down(adapter);
ixgbevf_free_irq(adapter);
* match packet buffer alignment. Unfortunately, the
* hardware is not flexible enough to do this dynamically.
*/
+ rtnl_lock();
+
if (netif_running(dev))
ixgbevf_close(dev);
if (netif_running(dev))
ixgbevf_open(dev);
+
+ rtnl_unlock();
}
static void ixgbevf_tx_ctxtdesc(struct ixgbevf_ring *tx_ring,
int retval = 0;
#endif
+ rtnl_lock();
netif_device_detach(netdev);
if (netif_running(netdev)) {
- rtnl_lock();
ixgbevf_down(adapter);
ixgbevf_free_irq(adapter);
ixgbevf_free_all_tx_resources(adapter);
ixgbevf_free_all_rx_resources(adapter);
ixgbevf_clear_interrupt_scheme(adapter);
- rtnl_unlock();
}
+ rtnl_unlock();
#ifdef CONFIG_PM
retval = pci_save_state(pdev);