summaryrefslogtreecommitdiff
path: root/drivers/usb/core
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@freescale.com>2012-03-23 15:20:09 +0800
committerJason Liu <r64343@freescale.com>2012-07-20 13:24:35 +0800
commit042dde648d0619b6baca55b5e7821030b5829488 (patch)
tree785c9846d09d9d53de7c0e3e695b39a873b44f9e /drivers/usb/core
parent144878cab616850e3edb9e8c89fec5d70461532d (diff)
ENGR00177756 usb-host: quit system suspend after usb remote wakeup occurs
If the usb remote wakeup occurs before bus(roothub) suspend, it can stop the system suspend process, the patch adds handle error message process for roothub. If the remote wakeup occurs after bus(roothub) suspend, then the suspend will go on suspending, and usb phy will fail to respond wakeup signal. This patch is suggested by: Alan Stern <stern@rowland.harvard.edu> see: http://www.spinics.net/lists/linux-usb/msg58774.html Signed-off-by: Peter Chen <peter.chen@freescale.com>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r--drivers/usb/core/driver.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
index 75b4bc03e2e1..f147c620d0cb 100644
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -1198,8 +1198,13 @@ static int usb_suspend_both(struct usb_device *udev, pm_message_t msg)
if (status == 0) {
status = usb_suspend_device(udev, msg);
- /* Again, ignore errors during system sleep transitions */
- if (!(msg.event & PM_EVENT_AUTO))
+ /*
+ * Ignore errors from non-root-hub devices during
+ * system sleep transitions. For the most part,
+ * these devices should go to low power anyway when
+ * the entire bus is suspended.
+ */
+ if (udev->parent && !(msg.event & PM_EVENT_AUTO))
status = 0;
}