]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.31/patches.fixes/tg3-fix-default-wol.patch
Add a patch to fix Intel E100 wake-on-lan problems.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.fixes / tg3-fix-default-wol.patch
CommitLineData
2cb7cef9
BS
1From: Rafael J. Wysocki <rjw@suse.de>
2Subject: net (tg3): Fix failure to enable WoL by default when possible
3References: bnc#447371
4
5tg3 is supposed to enable WoL by default on adapters which support
6that, but it fails to do so unless the adapter's
7/sys/devices/.../power/wakeup file contains 'enabled' during the
8initialization of the adapter. Fix that by making tg3 update the
9device's 'should_wakeup' bit automatically whenever WoL should be
10enabled by default.
11
12Signed-off-by: Rafael J. Wysocki <rjw@suse.de>
13---
14 drivers/net/tg3.c | 10 ++++++----
15 1 file changed, 6 insertions(+), 4 deletions(-)
16
17Index: linux-2.6.27/drivers/net/tg3.c
18===================================================================
19--- linux-2.6.27.orig/drivers/net/tg3.c
20+++ linux-2.6.27/drivers/net/tg3.c
21@@ -11340,9 +11340,10 @@ static void __devinit tg3_get_eeprom_hw_
22 if (val & VCPU_CFGSHDW_ASPM_DBNC)
23 tp->tg3_flags |= TG3_FLAG_ASPM_WORKAROUND;
24 if ((val & VCPU_CFGSHDW_WOL_ENABLE) &&
25- (val & VCPU_CFGSHDW_WOL_MAGPKT) &&
26- device_may_wakeup(&tp->pdev->dev))
27+ (val & VCPU_CFGSHDW_WOL_MAGPKT)) {
28 tp->tg3_flags |= TG3_FLAG_WOL_ENABLE;
29+ device_set_wakeup_enable(&tp->pdev->dev, true);
30+ }
31 return;
32 }
33
34@@ -11472,9 +11473,10 @@ static void __devinit tg3_get_eeprom_hw_
35 tp->tg3_flags &= ~TG3_FLAG_WOL_CAP;
36
37 if ((tp->tg3_flags & TG3_FLAG_WOL_CAP) &&
38- (nic_cfg & NIC_SRAM_DATA_CFG_WOL_ENABLE) &&
39- device_may_wakeup(&tp->pdev->dev))
40+ (nic_cfg & NIC_SRAM_DATA_CFG_WOL_ENABLE)) {
41 tp->tg3_flags |= TG3_FLAG_WOL_ENABLE;
42+ device_set_wakeup_enable(&tp->pdev->dev, true);
43+ }
44
45 if (cfg2 & (1 << 17))
46 tp->tg3_flags2 |= TG3_FLG2_CAPACITIVE_COUPLING;