[PATCH] orinoco_pci: disable device and free IRQ when suspending
Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
37a6c6117d
commit
d62274b374
1 changed files with 11 additions and 0 deletions
|
@ -304,7 +304,9 @@ static int orinoco_pci_suspend(struct pci_dev *pdev, pm_message_t state)
|
||||||
|
|
||||||
orinoco_unlock(priv, &flags);
|
orinoco_unlock(priv, &flags);
|
||||||
|
|
||||||
|
free_irq(pdev->irq, dev);
|
||||||
pci_save_state(pdev);
|
pci_save_state(pdev);
|
||||||
|
pci_disable_device(pdev);
|
||||||
pci_set_power_state(pdev, PCI_D3hot);
|
pci_set_power_state(pdev, PCI_D3hot);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -320,8 +322,17 @@ static int orinoco_pci_resume(struct pci_dev *pdev)
|
||||||
printk(KERN_DEBUG "%s: Orinoco-PCI waking up\n", dev->name);
|
printk(KERN_DEBUG "%s: Orinoco-PCI waking up\n", dev->name);
|
||||||
|
|
||||||
pci_set_power_state(pdev, 0);
|
pci_set_power_state(pdev, 0);
|
||||||
|
pci_enable_device(pdev);
|
||||||
pci_restore_state(pdev);
|
pci_restore_state(pdev);
|
||||||
|
|
||||||
|
err = request_irq(pdev->irq, orinoco_interrupt, SA_SHIRQ,
|
||||||
|
dev->name, dev);
|
||||||
|
if (err) {
|
||||||
|
printk(KERN_ERR "%s: Cannot re-allocate IRQ\n", dev->name);
|
||||||
|
pci_disable_device(pdev);
|
||||||
|
return -EBUSY;
|
||||||
|
}
|
||||||
|
|
||||||
err = orinoco_reinit_firmware(dev);
|
err = orinoco_reinit_firmware(dev);
|
||||||
if (err) {
|
if (err) {
|
||||||
printk(KERN_ERR "%s: Error %d re-initializing firmware on orinoco_pci_resume()\n",
|
printk(KERN_ERR "%s: Error %d re-initializing firmware on orinoco_pci_resume()\n",
|
||||||
|
|
Loading…
Reference in a new issue