netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* net (tg3): Fix failure to enable WoL by default when possible
@ 2008-12-07 23:46 Rafael J. Wysocki
  2008-12-08 11:50 ` Rafael J. Wysocki
  0 siblings, 1 reply; 7+ messages in thread
From: Rafael J. Wysocki @ 2008-12-07 23:46 UTC (permalink / raw)
  To: Michael Chan; +Cc: netdev, Jeff Garzik, LKML

From: Rafael J. Wysocki <rjw@sisk.pl>
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@sisk.pl>
---
 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_
 		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;
+			device_set_wakeup_enable(&tp->pdev->dev, true);
+		}
 		return;
 	}
 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-12-09 20:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-07 23:46 net (tg3): Fix failure to enable WoL by default when possible Rafael J. Wysocki
2008-12-08 11:50 ` Rafael J. Wysocki
2008-12-08 11:52   ` [PATCH] net (tg3): Fix failure to enable WoL by default when possible (rev. 2) Rafael J. Wysocki
2008-12-08 19:04     ` Matt Carlson
2008-12-09  8:20       ` David Miller
2008-12-09 20:26         ` Rafael J. Wysocki
2008-12-09 20:39           ` Matt Carlson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).