]> err.no Git - linux-2.6/blobdiff - drivers/net/e100.c
[PATCH] chelsio: use kzalloc
[linux-2.6] / drivers / net / e100.c
index a3a08a5dd1853bdf0516f0f5745dbbcdf26f068b..3a8df479cbdad660351a676b54912074fb597062 100644 (file)
@@ -1215,7 +1215,7 @@ static void e100_setup_ucode(struct nic *nic, struct cb *cb, struct sk_buff *skb
 *  the literal in the instruction before the code is loaded, the
 *  driver can change the algorithm.
 *
-*  INTDELAY - This loads the dead-man timer with its inital value.
+*  INTDELAY - This loads the dead-man timer with its initial value.
 *    When this timer expires the interrupt is asserted, and the
 *    timer is reset each time a new packet is received.  (see
 *    BUNDLEMAX below to set the limit on number of chained packets)
@@ -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);