Commit a53a33da authored by Auke Kok's avatar Auke Kok Committed by Jeff Garzik
Browse files

e100: fix napi ifdefs removing needed code



e100: fix napi ifdefs removing needed code

From: Auke Kok <auke-jan.h.kok@intel.com>

The e100 driver is NAPI mode only. We need to netif_poll_disable
during suspend and shutdown. The non-NAPI driver code was removed
and is only avaiable in the out-of-tree e100 kernel driver.
Signed-off-by: default avatarAuke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent ae2c27a7
...@@ -2718,14 +2718,12 @@ static int e100_suspend(struct pci_dev *pdev, pm_message_t state) ...@@ -2718,14 +2718,12 @@ static int e100_suspend(struct pci_dev *pdev, pm_message_t state)
struct net_device *netdev = pci_get_drvdata(pdev); struct net_device *netdev = pci_get_drvdata(pdev);
struct nic *nic = netdev_priv(netdev); struct nic *nic = netdev_priv(netdev);
#ifdef CONFIG_E100_NAPI
if (netif_running(netdev)) if (netif_running(netdev))
netif_poll_disable(nic->netdev); netif_poll_disable(nic->netdev);
#endif
del_timer_sync(&nic->watchdog); del_timer_sync(&nic->watchdog);
netif_carrier_off(nic->netdev); netif_carrier_off(nic->netdev);
netif_device_detach(netdev); netif_device_detach(netdev);
pci_save_state(pdev); pci_save_state(pdev);
if ((nic->flags & wol_magic) | e100_asf(nic)) { if ((nic->flags & wol_magic) | e100_asf(nic)) {
...@@ -2761,16 +2759,13 @@ static int e100_resume(struct pci_dev *pdev) ...@@ -2761,16 +2759,13 @@ static int e100_resume(struct pci_dev *pdev)
} }
#endif /* CONFIG_PM */ #endif /* CONFIG_PM */
static void e100_shutdown(struct pci_dev *pdev) static void e100_shutdown(struct pci_dev *pdev)
{ {
struct net_device *netdev = pci_get_drvdata(pdev); struct net_device *netdev = pci_get_drvdata(pdev);
struct nic *nic = netdev_priv(netdev); struct nic *nic = netdev_priv(netdev);
#ifdef CONFIG_E100_NAPI
if (netif_running(netdev)) if (netif_running(netdev))
netif_poll_disable(nic->netdev); netif_poll_disable(nic->netdev);
#endif
del_timer_sync(&nic->watchdog); del_timer_sync(&nic->watchdog);
netif_carrier_off(nic->netdev); netif_carrier_off(nic->netdev);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment