]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/3c59x.c
sysfs: create optimal relative symlink targets
[linux-2.6-omap-h63xx.git] / drivers / net / 3c59x.c
index 8d3893da06f539da701c45b29cb158f2705543d5..6f8e7d4cf74dbdd224fdbd4d7d1b5924c206ade0 100644 (file)
@@ -1491,7 +1491,7 @@ vortex_up(struct net_device *dev)
        struct vortex_private *vp = netdev_priv(dev);
        void __iomem *ioaddr = vp->ioaddr;
        unsigned int config;
-       int i, mii_reg1, mii_reg5, err;
+       int i, mii_reg1, mii_reg5, err = 0;
 
        if (VORTEX_PCI(vp)) {
                pci_set_power_state(VORTEX_PCI(vp), PCI_D0);    /* Go active */
@@ -3118,7 +3118,13 @@ static void acpi_set_WOL(struct net_device *dev)
                iowrite16(SetRxFilter|RxStation|RxMulticast|RxBroadcast, ioaddr + EL3_CMD);
                iowrite16(RxEnable, ioaddr + EL3_CMD);
 
-               pci_enable_wake(VORTEX_PCI(vp), 0, 1);
+               if (pci_enable_wake(VORTEX_PCI(vp), PCI_D3hot, 1)) {
+                       printk(KERN_INFO "%s: WOL not supported.\n",
+                                       pci_name(VORTEX_PCI(vp)));
+
+                       vp->enable_wol = 0;
+                       return;
+               }
 
                /* Change the power state to D3; RxEnable doesn't take effect. */
                pci_set_power_state(VORTEX_PCI(vp), PCI_D3hot);