[PATCH] USB: don't change HC power state for a FREEZE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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@xxxxxxxxxxxxxxxxxxx>
CC: David Brownell <david-b@xxxxxxxxxxx>


Index: usb-2.6/drivers/usb/core/hcd-pci.c
--- usb-2.6.orig/drivers/usb/core/hcd-pci.c
+++ usb-2.6/drivers/usb/core/hcd-pci.c
@@ -250,6 +250,12 @@ int usb_hcd_pci_suspend (struct pci_dev 
 			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;

This email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
To unsubscribe, use the last form field at:

[Home]     [Video for Linux]     [Photo]     [Yosemite Forum]     [Yosemite Photos]    [Video Projectors]     [PDAs]     [Hacking TiVo]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Devices]     [Big List of Linux Books]     [Free Dating]

  Powered by Linux