Skip to content

Commit

Permalink
airo: fix resume
Browse files Browse the repository at this point in the history
Cisco Aironet doesn't resume properly from swsusp, because the resume
method confuses a PM_EVENT_* for a PCI power state. It thinks that it is
resuming from PCI_D1 and doesn't do the necessary initialization of the
card.

Signed-off-by: Michal Schmidt <xschmi00@stud.feec.vutbr.cz>
  • Loading branch information
Michal Schmidt authored and Jeff Garzik committed Oct 4, 2005
1 parent d591958 commit 5323280
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/net/wireless/airo.c
Original file line number Diff line number Diff line change
Expand Up @@ -5504,12 +5504,13 @@ static int airo_pci_resume(struct pci_dev *pdev)
struct net_device *dev = pci_get_drvdata(pdev);
struct airo_info *ai = dev->priv;
Resp rsp;
pci_power_t prev_state = pdev->current_state;

pci_set_power_state(pdev, 0);
pci_set_power_state(pdev, PCI_D0);
pci_restore_state(pdev);
pci_enable_wake(pdev, pci_choose_state(pdev, ai->power), 0);
pci_enable_wake(pdev, PCI_D0, 0);

if (ai->power.event > 1) {
if (prev_state != PCI_D1) {
reset_card(dev, 0);
mpi_init_descriptors(ai);
setup_card(ai, dev->dev_addr, 0);
Expand Down

0 comments on commit 5323280

Please sign in to comment.