aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e100.c
diff options
context:
space:
mode:
authorAuke Kok <auke-jan.h.kok@intel.com>2006-10-24 17:49:44 -0400
committerAuke Kok <juke-jan.h.kok@intel.com>2006-10-24 17:49:44 -0400
commit824545e7031541f83245d254caca012bf6bdc6cd (patch)
tree0ea26d29b7417793ac2fc100ec7989c1bc2434a6 /drivers/net/e100.c
parentff1e55b078676d3c449ace6b99d95c0e22c905d6 (diff)
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.c10
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)
2719 struct net_device *netdev = pci_get_drvdata(pdev); 2719 struct net_device *netdev = pci_get_drvdata(pdev);
2720 struct nic *nic = netdev_priv(netdev); 2720 struct nic *nic = netdev_priv(netdev);
2721 2721
2722 netif_poll_disable(nic->netdev); 2722#ifdef CONFIG_E100_NAPI
2723 if (netif_running(netdev))
2724 netif_poll_disable(nic->netdev);
2725#endif
2723 del_timer_sync(&nic->watchdog); 2726 del_timer_sync(&nic->watchdog);
2724 netif_carrier_off(nic->netdev); 2727 netif_carrier_off(nic->netdev);
2725 2728
@@ -2763,7 +2766,10 @@ static void e100_shutdown(struct pci_dev *pdev)
2763 struct net_device *netdev = pci_get_drvdata(pdev); 2766 struct net_device *netdev = pci_get_drvdata(pdev);
2764 struct nic *nic = netdev_priv(netdev); 2767 struct nic *nic = netdev_priv(netdev);
2765 2768
2766 netif_poll_disable(nic->netdev); 2769#ifdef CONFIG_E100_NAPI
2770 if (netif_running(netdev))
2771 netif_poll_disable(nic->netdev);
2772#endif
2767 del_timer_sync(&nic->watchdog); 2773 del_timer_sync(&nic->watchdog);
2768 netif_carrier_off(nic->netdev); 2774 netif_carrier_off(nic->netdev);
2769 2775