net (tg3): Fix failure to enable WoL by default when possible

From: Rafael J. Wysocki
Date: Sun Dec 07 2008 - 18:48:07 EST

From: Rafael J. Wysocki <rjw@xxxxxxx>
Subject: net (tg3): Fix failure to enable WoL by default when possible

tg3 is supposed to enable WoL by default on adapters which support
that, but it fails to do so unless the adapter's
/sys/devices/.../power/wakeup file contains 'enabled' during the
initialization of the adapter. Fix that by making tg3 update the
device's 'should_wakeup' bit automatically whenever WoL should be
enabled by default.

Signed-off-by: Rafael J. Wysocki <rjw@xxxxxxx>
drivers/net/tg3.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Index: linux-2.6/drivers/net/tg3.c
--- linux-2.6.orig/drivers/net/tg3.c
+++ linux-2.6/drivers/net/tg3.c
@@ -11296,9 +11296,10 @@ static void __devinit tg3_get_eeprom_hw_
tp->tg3_flags |= TG3_FLAG_ASPM_WORKAROUND;
- device_may_wakeup(&tp->pdev->dev))
tp->tg3_flags |= TG3_FLAG_WOL_ENABLE;
+ device_set_wakeup_enable(&tp->pdev->dev, true);
+ }

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at