Commit 53232803 authored by Michal Schmidt's avatar Michal Schmidt Committed by Jeff Garzik

airo: fix resume

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: default avatarMichal Schmidt <xschmi00@stud.feec.vutbr.cz>
parent d5919586
...@@ -5504,12 +5504,13 @@ static int airo_pci_resume(struct pci_dev *pdev) ...@@ -5504,12 +5504,13 @@ static int airo_pci_resume(struct pci_dev *pdev)
struct net_device *dev = pci_get_drvdata(pdev); struct net_device *dev = pci_get_drvdata(pdev);
struct airo_info *ai = dev->priv; struct airo_info *ai = dev->priv;
Resp rsp; 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_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); reset_card(dev, 0);
mpi_init_descriptors(ai); mpi_init_descriptors(ai);
setup_card(ai, dev->dev_addr, 0); setup_card(ai, dev->dev_addr, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment