]> err.no Git - linux-2.6/blobdiff - drivers/net/3c59x.c
[PATCH] skge: whietspace cleanup
[linux-2.6] / drivers / net / 3c59x.c
index 43e2ac532f82e51bd4070dcd9fd59de16531fd61..80ec9aa575bb5df228428afb5d84ae42c3407c35 100644 (file)
@@ -1581,7 +1581,8 @@ vortex_up(struct net_device *dev)
 
        if (VORTEX_PCI(vp)) {
                pci_set_power_state(VORTEX_PCI(vp), PCI_D0);    /* Go active */
-               pci_restore_state(VORTEX_PCI(vp));
+               if (vp->pm_state_valid)
+                       pci_restore_state(VORTEX_PCI(vp));
                pci_enable_device(VORTEX_PCI(vp));
        }
 
@@ -2201,9 +2202,8 @@ boomerang_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
        if (vortex_debug > 6) {
                printk(KERN_DEBUG "boomerang_start_xmit()\n");
-               if (vortex_debug > 3)
-                       printk(KERN_DEBUG "%s: Trying to send a packet, Tx index %d.\n",
-                                  dev->name, vp->cur_tx);
+               printk(KERN_DEBUG "%s: Trying to send a packet, Tx index %d.\n",
+                          dev->name, vp->cur_tx);
        }
 
        if (vp->cur_tx - vp->dirty_tx >= TX_RING_SIZE) {
@@ -2741,6 +2741,7 @@ vortex_down(struct net_device *dev, int final_down)
                outl(0, ioaddr + DownListPtr);
 
        if (final_down && VORTEX_PCI(vp)) {
+               vp->pm_state_valid = 1;
                pci_save_state(VORTEX_PCI(vp));
                acpi_set_WOL(dev);
        }
@@ -3243,9 +3244,10 @@ static void acpi_set_WOL(struct net_device *dev)
                outw(RxEnable, ioaddr + EL3_CMD);
 
                pci_enable_wake(VORTEX_PCI(vp), 0, 1);
+
+               /* Change the power state to D3; RxEnable doesn't take effect. */
+               pci_set_power_state(VORTEX_PCI(vp), PCI_D3hot);
        }
-       /* Change the power state to D3; RxEnable doesn't take effect. */
-       pci_set_power_state(VORTEX_PCI(vp), PCI_D3hot);
 }