]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[ACPI] S3 Suspend to RAM: fix driver suspend/resume methods
authorDavid Shaohua Li <shaohua.li@intel.com>
Fri, 18 Mar 2005 21:43:54 +0000 (16:43 -0500)
committerLen Brown <len.brown@intel.com>
Tue, 12 Jul 2005 03:23:46 +0000 (23:23 -0400)
Drivers should do this:

.suspend()
pci_disable_device()

.resume()
pci_enable_device()

http://bugzilla.kernel.org/show_bug.cgi?id=3469

Signed-off-by: David Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/net/b44.c
drivers/net/ne2k-pci.c
drivers/pcmcia/yenta_socket.c
drivers/usb/core/hcd-pci.c

index 3fe8ba992c38b32b8fd5b55e8f503e6231afbfaf..38844d003e4415e03cec56fa08bb1686586ef79f 100644 (file)
@@ -1927,6 +1927,7 @@ static int b44_suspend(struct pci_dev *pdev, pm_message_t state)
        b44_free_rings(bp);
 
        spin_unlock_irq(&bp->lock);
+       pci_disable_device(pdev);
        return 0;
 }
 
@@ -1936,6 +1937,8 @@ static int b44_resume(struct pci_dev *pdev)
        struct b44 *bp = netdev_priv(dev);
 
        pci_restore_state(pdev);
+       pci_enable_device(pdev);
+       pci_set_master(pdev);
 
        if (!netif_running(dev))
                return 0;
index a1a6c08e7dcf2bd5b9616a84b2e418e4c7179810..f1c01ac2910239206fc892516057ef4bf85bb0c3 100644 (file)
@@ -660,6 +660,7 @@ static int ne2k_pci_suspend (struct pci_dev *pdev, pm_message_t state)
 
        netif_device_detach(dev);
        pci_save_state(pdev);
+       pci_disable_device(pdev);
        pci_set_power_state(pdev, pci_choose_state(pdev, state));
 
        return 0;
@@ -671,6 +672,8 @@ static int ne2k_pci_resume (struct pci_dev *pdev)
 
        pci_set_power_state(pdev, 0);
        pci_restore_state(pdev);
+       pci_enable_device(pdev);
+       pci_set_master(pdev);
        NS8390_init(dev, 1);
        netif_device_attach(dev);
 
index 6404d97a12ebc12b91285ca14db53d3940df4c2f..caf7159a54be7bff7a8ac1b9a9d16825e13968f5 100644 (file)
@@ -1032,6 +1032,7 @@ static int yenta_dev_suspend (struct pci_dev *dev, pm_message_t state)
                pci_save_state(dev);
                pci_read_config_dword(dev, 16*4, &socket->saved_state[0]);
                pci_read_config_dword(dev, 17*4, &socket->saved_state[1]);
+               pci_disable_device(dev);
 
                /*
                 * Some laptops (IBM T22) do not like us putting the Cardbus
@@ -1055,6 +1056,8 @@ static int yenta_dev_resume (struct pci_dev *dev)
                pci_restore_state(dev);
                pci_write_config_dword(dev, 16*4, socket->saved_state[0]);
                pci_write_config_dword(dev, 17*4, socket->saved_state[1]);
+               pci_enable_device(dev);
+               pci_set_master(dev);
 
                if (socket->type && socket->type->restore_state)
                        socket->type->restore_state(socket);
index 71b4a8d663189d3dce1edf3153990146b71350ee..fc056062c9602f8dac0c4c39e52d2a01c64ba9bc 100644 (file)
@@ -380,6 +380,7 @@ int usb_hcd_pci_resume (struct pci_dev *dev)
                usb_hc_died (hcd);
        }
 
+       pci_enable_device(dev);
        return retval;
 }
 EXPORT_SYMBOL (usb_hcd_pci_resume);