Skip to content

Commit

Permalink
[sky2] Fix sky2 network driver suspend/resume
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Linus Torvalds committed Jun 12, 2006
1 parent 0e838b7 commit d374c1c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/sky2.c
Original file line number Diff line number Diff line change
Expand Up @@ -2183,6 +2183,9 @@ static int sky2_poll(struct net_device *dev0, int *budget)
int work_done = 0;
u32 status = sky2_read32(hw, B0_Y2_SP_EISR);

if (!~status)
return 0;

if (status & Y2_IS_HW_ERR)
sky2_hw_intr(hw);

Expand Down Expand Up @@ -3438,6 +3441,7 @@ static int sky2_suspend(struct pci_dev *pdev, pm_message_t state)
}
}

pci_save_state(pdev);
return sky2_set_power_state(hw, pci_choose_state(pdev, state));
}

Expand Down

0 comments on commit d374c1c

Please sign in to comment.