diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-12 15:53:27 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-12 15:53:27 -0400 |
commit | d374c1c1281d6188a0d0676172b1c0e3de35c6e7 (patch) | |
tree | aeae46b8a329faa0ad7e51b8a1900c1d937f9836 /drivers/net/sky2.c | |
parent | 0e838b72d54ed189033939258a961f2a0cd59647 (diff) |
[sky2] Fix sky2 network driver suspend/resume
This fixes two independent problems: it would not save the PCI state on
suspend (and thus try to resume a nonexistent state on resume), and
while shut off, if an interrupt happened on the same shared irq, the irq
handler would react very badly to the interrupt status being an invalid
all-ones state.
Acked-by: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r-- | drivers/net/sky2.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 959109609d85..6b87c7a5c906 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -2183,6 +2183,9 @@ static int sky2_poll(struct net_device *dev0, int *budget) | |||
2183 | int work_done = 0; | 2183 | int work_done = 0; |
2184 | u32 status = sky2_read32(hw, B0_Y2_SP_EISR); | 2184 | u32 status = sky2_read32(hw, B0_Y2_SP_EISR); |
2185 | 2185 | ||
2186 | if (!~status) | ||
2187 | return 0; | ||
2188 | |||
2186 | if (status & Y2_IS_HW_ERR) | 2189 | if (status & Y2_IS_HW_ERR) |
2187 | sky2_hw_intr(hw); | 2190 | sky2_hw_intr(hw); |
2188 | 2191 | ||
@@ -3438,6 +3441,7 @@ static int sky2_suspend(struct pci_dev *pdev, pm_message_t state) | |||
3438 | } | 3441 | } |
3439 | } | 3442 | } |
3440 | 3443 | ||
3444 | pci_save_state(pdev); | ||
3441 | return sky2_set_power_state(hw, pci_choose_state(pdev, state)); | 3445 | return sky2_set_power_state(hw, pci_choose_state(pdev, state)); |
3442 | } | 3446 | } |
3443 | 3447 | ||