summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@freescale.com>2012-03-23 15:20:09 +0800
committerEric Nelson <eric.nelson@boundarydevices.com>2012-08-28 09:44:46 -0700
commited40a69dadd854214761b79323c2cb0a576cc8af (patch)
tree94a4222bbd1efb6a2c65dc28990e9185c32fd8ed
parent33eb256bbe681fd076caa8e406c81e6e61110bb0 (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>
-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;
}