aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tg3.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2011-02-10 01:53:09 -0500
committerDavid S. Miller <davem@davemloft.net>2011-02-11 14:38:43 -0500
commit43067ed8aecac4410a0a629e504629ebece35206 (patch)
tree07a008217363f2e89d13341a91a19984bb8be309 /drivers/net/tg3.c
parent2866d956fe0ad8fc8d8a7c54104ccc879b49406d (diff)
tg3: Avoid setting power.can_wakeup for devices that cannot wake up
The tg3 driver uses device_init_wakeup() in such a way that the device's power.can_wakeup flag may be set even though the PCI subsystem cleared it before, in which case the device cannot wake up the system from sleep states. Modify the driver to only change the power.can_wakeup flag if the device is not capable of generating wakeup signals. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r--drivers/net/tg3.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index ecb3eb099bf6..6be418591df9 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -12463,9 +12463,11 @@ static void __devinit tg3_get_eeprom_hw_cfg(struct tg3 *tp)
12463 tp->tg3_flags3 |= TG3_FLG3_RGMII_EXT_IBND_TX_EN; 12463 tp->tg3_flags3 |= TG3_FLG3_RGMII_EXT_IBND_TX_EN;
12464 } 12464 }
12465done: 12465done:
12466 device_init_wakeup(&tp->pdev->dev, tp->tg3_flags & TG3_FLAG_WOL_CAP); 12466 if (tp->tg3_flags & TG3_FLAG_WOL_CAP)
12467 device_set_wakeup_enable(&tp->pdev->dev, 12467 device_set_wakeup_enable(&tp->pdev->dev,
12468 tp->tg3_flags & TG3_FLAG_WOL_ENABLE); 12468 tp->tg3_flags & TG3_FLAG_WOL_ENABLE);
12469 else
12470 device_set_wakeup_capable(&tp->pdev->dev, false);
12469} 12471}
12470 12472
12471static int __devinit tg3_issue_otp_command(struct tg3 *tp, u32 cmd) 12473static int __devinit tg3_issue_otp_command(struct tg3 *tp, u32 cmd)