Skip to content

Commit

Permalink
e100: account for closed interface when shutting down
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Auke Kok authored and Auke Kok committed Oct 24, 2006
1 parent ff1e55b commit 824545e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions drivers/net/e100.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 824545e

Please sign in to comment.