aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPavel Roskin <proski@gnu.org>2006-04-07 04:10:51 -0400
committerJohn W. Linville <linville@tuxdriver.com>2006-04-24 16:15:52 -0400
commitd62274b374ce41dd3a90820b124d28fec292a5b7 (patch)
treed8b7973d10c1e4013608301d678029ddb97aac81 /drivers
parent37a6c6117db3f10e1923c14dffa089b10600c4b8 (diff)
[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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/orinoco_pci.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/wireless/orinoco_pci.c b/drivers/net/wireless/orinoco_pci.c
index 5362c214fc8..e57e92bc6ab 100644
--- a/drivers/net/wireless/orinoco_pci.c
+++ b/drivers/net/wireless/orinoco_pci.c
@@ -304,7 +304,9 @@ static int orinoco_pci_suspend(struct pci_dev *pdev, pm_message_t state)
orinoco_unlock(priv, &flags);
+ free_irq(pdev->irq, dev);
pci_save_state(pdev);
+ pci_disable_device(pdev);
pci_set_power_state(pdev, PCI_D3hot);
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);
pci_set_power_state(pdev, 0);
+ pci_enable_device(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);
if (err) {
printk(KERN_ERR "%s: Error %d re-initializing firmware on orinoco_pci_resume()\n",