|
@@ -1667,6 +1667,11 @@ int usb_runtime_suspend(struct device *dev)
|
|
return -EAGAIN;
|
|
return -EAGAIN;
|
|
|
|
|
|
status = usb_suspend_both(udev, PMSG_AUTO_SUSPEND);
|
|
status = usb_suspend_both(udev, PMSG_AUTO_SUSPEND);
|
|
|
|
+
|
|
|
|
+ /* Allow a retry if autosuspend failed temporarily */
|
|
|
|
+ if (status == -EAGAIN || status == -EBUSY)
|
|
|
|
+ usb_mark_last_busy(udev);
|
|
|
|
+
|
|
/* The PM core reacts badly unless the return code is 0,
|
|
/* The PM core reacts badly unless the return code is 0,
|
|
* -EAGAIN, or -EBUSY, so always return -EBUSY on an error.
|
|
* -EAGAIN, or -EBUSY, so always return -EBUSY on an error.
|
|
*/
|
|
*/
|