aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/core/driver.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
index 3b029a0a4787..c2c0ae57e7ff 100644
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -1667,6 +1667,11 @@ int usb_runtime_suspend(struct device *dev)
1667 return -EAGAIN; 1667 return -EAGAIN;
1668 1668
1669 status = usb_suspend_both(udev, PMSG_AUTO_SUSPEND); 1669 status = usb_suspend_both(udev, PMSG_AUTO_SUSPEND);
1670
1671 /* Allow a retry if autosuspend failed temporarily */
1672 if (status == -EAGAIN || status == -EBUSY)
1673 usb_mark_last_busy(udev);
1674
1670 /* The PM core reacts badly unless the return code is 0, 1675 /* The PM core reacts badly unless the return code is 0,
1671 * -EAGAIN, or -EBUSY, so always return -EBUSY on an error. 1676 * -EAGAIN, or -EBUSY, so always return -EBUSY on an error.
1672 */ 1677 */