forked from luck/tmp_suning_uos_patched
e100: account for closed interface when shutting down
Account for the interface being closed before disabling polling on a device, to fix shutdown on some systems that explcitly close the netdevice before calling shutdown. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
This commit is contained in:
parent
ff1e55b078
commit
824545e703
|
@ -2719,7 +2719,10 @@ static int e100_suspend(struct pci_dev *pdev, pm_message_t state)
|
|||
struct net_device *netdev = pci_get_drvdata(pdev);
|
||||
struct nic *nic = netdev_priv(netdev);
|
||||
|
||||
netif_poll_disable(nic->netdev);
|
||||
#ifdef CONFIG_E100_NAPI
|
||||
if (netif_running(netdev))
|
||||
netif_poll_disable(nic->netdev);
|
||||
#endif
|
||||
del_timer_sync(&nic->watchdog);
|
||||
netif_carrier_off(nic->netdev);
|
||||
|
||||
|
@ -2763,7 +2766,10 @@ static void e100_shutdown(struct pci_dev *pdev)
|
|||
struct net_device *netdev = pci_get_drvdata(pdev);
|
||||
struct nic *nic = netdev_priv(netdev);
|
||||
|
||||
netif_poll_disable(nic->netdev);
|
||||
#ifdef CONFIG_E100_NAPI
|
||||
if (netif_running(netdev))
|
||||
netif_poll_disable(nic->netdev);
|
||||
#endif
|
||||
del_timer_sync(&nic->watchdog);
|
||||
netif_carrier_off(nic->netdev);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user