USB: Fix suspend-resume of PCI USB controllers
authorRafael J. Wysocki <[email protected]>
Tue, 20 Jan 2009 00:26:56 +0000 (01:26 +0100)
committerGreg Kroah-Hartman <[email protected]>
Wed, 28 Jan 2009 00:15:32 +0000 (16:15 -0800)
commita15d95a003fae154121733f049dd25e9c13dbef3
tree240642794b6ceb19f733cf93709cf5b223b146e9
parentbcca06efea883bdf3803a0bb0ffa60f26730387d
USB: Fix suspend-resume of PCI USB controllers

Commit a0d4922da2e4ccb0973095d8d29f36f6b1b5f703
(USB: fix up suspend and resume for PCI host controllers) attempted
to fix the suspend-resume of PCI USB controllers, but unfortunately
it did that incorrectly and interrupts are left enabled by the USB
controllers' ->suspend_late() callback as a result.  This leads to
serious problems during suspend which are very difficult to debug.

Fix the issue by removing the ->suspend_late() callback of PCI
USB controllers and moving the code from there to the ->suspend()
callback executed with interrupts enabled.  Additionally, make
the ->resume() callback of PCI USB controllers execute
pci_enable_wake(dev, PCI_D0, false) to disable wake-up from the
full power state (PCI_D0).

Signed-off-by: Rafael J. Wysocki <[email protected]>
Tested-by: Andrey Borzenkov <[email protected]>
Tested-by: "Jeff Chua" <[email protected]>
Cc: Alan Stern <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Christian Borntraeger <[email protected]>
Cc: "Zdenek Kabelac" <[email protected]>
Cc: Ingo Molnar <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
drivers/usb/core/hcd-pci.c
drivers/usb/core/hcd.h
drivers/usb/host/ehci-pci.c
drivers/usb/host/ohci-pci.c
drivers/usb/host/uhci-hcd.c