diff options
author | Peter Chen <peter.chen@freescale.com> | 2012-03-23 15:20:09 +0800 |
---|---|---|
committer | Peter Chen <peter.chen@freescale.com> | 2012-03-28 10:10:29 +0800 |
commit | eb9675f8c9d5a41abb26aff054b8c13de160e31d (patch) | |
tree | d068a109ca4d7ed95f454d204ffa9d66935b30ab /drivers/usb | |
parent | f9ed110cf220fd3e0d38fa383c3dbc558f24454f (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')
-rw-r--r-- | drivers/usb/core/driver.c | 9 |
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; } |