]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
tg3: WOL fixes
authorMatt Carlson <mcarlson@broadcom.com>
Mon, 22 Dec 2008 04:18:56 +0000 (20:18 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Dec 2008 04:18:56 +0000 (20:18 -0800)
The first hunk of this patch inverts a flag that was accidentally
toggled as part of commit 0a459aac9d151c2e36ec65723b9b845b24c5cbc3
("tg3: Allow WOL for phylib controlled Broadcom phys").

The second hunk of the patch removes the call to
device_may_wakeup() in the 5906 config detection path.  At the
point of the call, the driver shouldn't be querying for WOL
capability.  It should be detecting and setting it.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tg3.c

index 06bd2f4eee6c03805c9cda9d9007c49717577838..bacbfc582704bd34da21ef1f5a9cd2ef08db6ea8 100644 (file)
@@ -2237,7 +2237,7 @@ static int tg3_set_power_state(struct tg3 *tp, pci_power_t state)
                        }
                }
        } else {
-               do_low_power = false;
+               do_low_power = true;
 
                if (tp->link_config.phy_is_low_power == 0) {
                        tp->link_config.phy_is_low_power = 1;
@@ -11544,8 +11544,7 @@ static void __devinit tg3_get_eeprom_hw_cfg(struct tg3 *tp)
                if (val & VCPU_CFGSHDW_ASPM_DBNC)
                        tp->tg3_flags |= TG3_FLAG_ASPM_WORKAROUND;
                if ((val & VCPU_CFGSHDW_WOL_ENABLE) &&
-                   (val & VCPU_CFGSHDW_WOL_MAGPKT) &&
-                   device_may_wakeup(&tp->pdev->dev))
+                   (val & VCPU_CFGSHDW_WOL_MAGPKT))
                        tp->tg3_flags |= TG3_FLAG_WOL_ENABLE;
                goto done;
        }