Commit 3c8fad1829cc33e903500b41d989fa50ab196378
Committed by
Linus Torvalds
1 parent
1922163c8d
Exists in
master
and in
7 other branches
[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: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing 1 changed file with 6 additions and 3 deletions Side-by-side Diff
drivers/net/3c59x.c
... | ... | @@ -1581,7 +1581,8 @@ |
1581 | 1581 | |
1582 | 1582 | if (VORTEX_PCI(vp)) { |
1583 | 1583 | pci_set_power_state(VORTEX_PCI(vp), PCI_D0); /* Go active */ |
1584 | - pci_restore_state(VORTEX_PCI(vp)); | |
1584 | + if (vp->pm_state_valid) | |
1585 | + pci_restore_state(VORTEX_PCI(vp)); | |
1585 | 1586 | pci_enable_device(VORTEX_PCI(vp)); |
1586 | 1587 | } |
1587 | 1588 | |
... | ... | @@ -2741,6 +2742,7 @@ |
2741 | 2742 | outl(0, ioaddr + DownListPtr); |
2742 | 2743 | |
2743 | 2744 | if (final_down && VORTEX_PCI(vp)) { |
2745 | + vp->pm_state_valid = 1; | |
2744 | 2746 | pci_save_state(VORTEX_PCI(vp)); |
2745 | 2747 | acpi_set_WOL(dev); |
2746 | 2748 | } |
2747 | 2749 | |
... | ... | @@ -3243,9 +3245,10 @@ |
3243 | 3245 | outw(RxEnable, ioaddr + EL3_CMD); |
3244 | 3246 | |
3245 | 3247 | pci_enable_wake(VORTEX_PCI(vp), 0, 1); |
3248 | + | |
3249 | + /* Change the power state to D3; RxEnable doesn't take effect. */ | |
3250 | + pci_set_power_state(VORTEX_PCI(vp), PCI_D3hot); | |
3246 | 3251 | } |
3247 | - /* Change the power state to D3; RxEnable doesn't take effect. */ | |
3248 | - pci_set_power_state(VORTEX_PCI(vp), PCI_D3hot); | |
3249 | 3252 | } |
3250 | 3253 | |
3251 | 3254 |