Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: do not print -ESHUTDOWN message if usb at otg device mode

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>

authored by

Peter Chen and committed by
Greg Kroah-Hartman
7491f133 00914025

+1 -1
+1 -1
drivers/usb/core/driver.c
··· 1337 1337 /* Avoid PM error messages for devices disconnected while suspended 1338 1338 * as we'll display regular disconnect messages just a bit later. 1339 1339 */ 1340 - if (status == -ENODEV) 1340 + if (status == -ENODEV || status == -ESHUTDOWN) 1341 1341 status = 0; 1342 1342 return status; 1343 1343 }