logo       
Google Custom Search
    AddThis Social Bookmark Button

[PATCH 16/21] orinoco_pci: disable device and free IRQ when suspending: msg#00015

Subject: [PATCH 16/21] orinoco_pci: disable device and free IRQ when suspending
From: Pavel Roskin <proski-mXXj517/zsQ@xxxxxxxxxxxxxxxx>

Signed-off-by: Pavel Roskin <proski-mXXj517/zsQ@xxxxxxxxxxxxxxxx>
---

 drivers/net/wireless/orinoco_pci.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/orinoco_pci.c 
b/drivers/net/wireless/orinoco_pci.c
index 5362c21..e57e92b 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 pc
        
        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,7 +322,16 @@ static int orinoco_pci_resume(struct pci
        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) {



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642


<Prev in Thread] Current Thread [Next in Thread>