diff options
author | daniel.ritz@gmx.ch <daniel.ritz@gmx.ch> | 2005-05-05 16:36:40 -0700 |
---|---|---|
committer | <chrisw@vas.sous-sol.org> | 2005-05-26 21:20:01 -0700 |
commit | 973ed0feb6c29b170e4e57f25198403b1fee2dfb (patch) | |
tree | c6189121a65ebdb673897084009a395e6612d28c | |
parent | 27d050adf5cea402a3da5ca7564a23bf87ce7bef (diff) | |
download | linux-stable-973ed0feb6c29b170e4e57f25198403b1fee2dfb.tar.gz linux-stable-973ed0feb6c29b170e4e57f25198403b1fee2dfb.tar.bz2 linux-stable-973ed0feb6c29b170e4e57f25198403b1fee2dfb.zip |
[PATCH] 3c59x: only put the device into D3 when we're actually using WOL
During a warm boot the device is in D3 and has troubles coming out of it.
Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@osdl.org>
-rw-r--r-- | drivers/net/3c59x.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c index b22ed5781143..4078ce33ebd7 100644 --- a/drivers/net/3c59x.c +++ b/drivers/net/3c59x.c @@ -1581,7 +1581,8 @@ vortex_up(struct net_device *dev) if (VORTEX_PCI(vp)) { pci_set_power_state(VORTEX_PCI(vp), PCI_D0); /* Go active */ - pci_restore_state(VORTEX_PCI(vp)); + if (vp->pm_state_valid) + pci_restore_state(VORTEX_PCI(vp)); pci_enable_device(VORTEX_PCI(vp)); } @@ -2741,6 +2742,7 @@ vortex_down(struct net_device *dev, int final_down) outl(0, ioaddr + DownListPtr); if (final_down && VORTEX_PCI(vp)) { + vp->pm_state_valid = 1; pci_save_state(VORTEX_PCI(vp)); acpi_set_WOL(dev); } @@ -3243,9 +3245,10 @@ static void acpi_set_WOL(struct net_device *dev) outw(RxEnable, ioaddr + EL3_CMD); pci_enable_wake(VORTEX_PCI(vp), 0, 1); + + /* Change the power state to D3; RxEnable doesn't take effect. */ + pci_set_power_state(VORTEX_PCI(vp), PCI_D3hot); } - /* Change the power state to D3; RxEnable doesn't take effect. */ - pci_set_power_state(VORTEX_PCI(vp), PCI_D3hot); } |