]> err.no Git - linux-2.6/commitdiff
USB: don't change HC power state for a FREEZE
authorAlan Stern <stern@rowland.harvard.edu>
Mon, 19 Nov 2007 20:57:45 +0000 (15:57 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 1 Feb 2008 22:34:51 +0000 (14:34 -0800)
This patch (as1016) prevents PCI-based host controllers from
undergoing a power-state change during a FREEZE or a PRETHAW.  Such
changes are needed only during a SUSPEND.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/hcd-pci.c

index 3fb9af80cbf4319e133f1434453a38ae538944d2..424674203fd37baa51d2d2c10f495071c68bbc31 100644 (file)
@@ -250,6 +250,12 @@ int usb_hcd_pci_suspend (struct pci_dev *dev, pm_message_t message)
                        pci_disable_device (dev);
                }
 
+               if (message.event == PM_EVENT_FREEZE ||
+                               message.event == PM_EVENT_PRETHAW) {
+                       dev_dbg(hcd->self.controller, "--> no state change\n");
+                       goto done;
+               }
+
                if (!has_pci_pm) {
                        dev_dbg (hcd->self.controller, "--> PCI D0/legacy\n");
                        goto done;