aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/orinoco_pci.c
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/net/wireless/orinoco_pci.c
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/net/wireless/orinoco_pci.c')
-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 5362c214fc8e..e57e92bc6ab8 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)
304 304
305 orinoco_unlock(priv, &flags); 305 orinoco_unlock(priv, &flags);
306 306
307 free_irq(pdev->irq, dev);
307 pci_save_state(pdev); 308 pci_save_state(pdev);
309 pci_disable_device(pdev);
308 pci_set_power_state(pdev, PCI_D3hot); 310 pci_set_power_state(pdev, PCI_D3hot);
309 311
310 return 0; 312 return 0;
@@ -320,8 +322,17 @@ static int orinoco_pci_resume(struct pci_dev *pdev)
320 printk(KERN_DEBUG "%s: Orinoco-PCI waking up\n", dev->name); 322 printk(KERN_DEBUG "%s: Orinoco-PCI waking up\n", dev->name);
321 323
322 pci_set_power_state(pdev, 0); 324 pci_set_power_state(pdev, 0);
325 pci_enable_device(pdev);
323 pci_restore_state(pdev); 326 pci_restore_state(pdev);
324 327
328 err = request_irq(pdev->irq, orinoco_interrupt, SA_SHIRQ,
329 dev->name, dev);
330 if (err) {
331 printk(KERN_ERR "%s: Cannot re-allocate IRQ\n", dev->name);
332 pci_disable_device(pdev);
333 return -EBUSY;
334 }
335
325 err = orinoco_reinit_firmware(dev); 336 err = orinoco_reinit_firmware(dev);
326 if (err) { 337 if (err) {
327 printk(KERN_ERR "%s: Error %d re-initializing firmware on orinoco_pci_resume()\n", 338 printk(KERN_ERR "%s: Error %d re-initializing firmware on orinoco_pci_resume()\n",