Skip to content

Commit

Permalink
USB: do not print -ESHUTDOWN message if usb at otg device mode
Browse files Browse the repository at this point in the history
At otg device mode, the otg host resume should do no-op during
system resume, otherwise, the otg device will be treated as a
host for enumeration.

So, the otg host driver returns -ESHUTDOWN if it detects the
current usb mode is device mode. The host driver has to return
-ESHUTDOWN, otherwise, the usb_hc_died will be called.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Peter Chen authored and Greg Kroah-Hartman committed Oct 22, 2010
1 parent 0091402 commit 7491f13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/core/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -1337,7 +1337,7 @@ int usb_resume(struct device *dev, pm_message_t msg)
/* Avoid PM error messages for devices disconnected while suspended
* as we'll display regular disconnect messages just a bit later.
*/
if (status == -ENODEV)
if (status == -ENODEV || status == -ESHUTDOWN)
status = 0;
return status;
}
Expand Down

0 comments on commit 7491f13

Please sign in to comment.