diff options
author | Auke Kok <auke-jan.h.kok@intel.com> | 2006-10-24 14:49:44 -0700 |
---|---|---|
committer | Auke Kok <juke-jan.h.kok@intel.com> | 2006-10-24 14:49:44 -0700 |
commit | 824545e7031541f83245d254caca012bf6bdc6cd (patch) | |
tree | 0ea26d29b7417793ac2fc100ec7989c1bc2434a6 /drivers/net/e100.c | |
parent | ff1e55b078676d3c449ace6b99d95c0e22c905d6 (diff) | |
download | lwn-824545e7031541f83245d254caca012bf6bdc6cd.tar.gz lwn-824545e7031541f83245d254caca012bf6bdc6cd.zip |
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>
Diffstat (limited to 'drivers/net/e100.c')
-rw-r--r-- | drivers/net/e100.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/e100.c b/drivers/net/e100.c index a3a08a5dd185..19ab3441269c 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c @@ -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); |