diff options
Diffstat (limited to 'usb/usb-do-not-print-eshutdown-message-if-usb-at-otg-device-mode.patch')
| -rw-r--r-- | usb/usb-do-not-print-eshutdown-message-if-usb-at-otg-device-mode.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/usb/usb-do-not-print-eshutdown-message-if-usb-at-otg-device-mode.patch b/usb/usb-do-not-print-eshutdown-message-if-usb-at-otg-device-mode.patch new file mode 100644 index 00000000000000..c317a6f5fb7a40 --- /dev/null +++ b/usb/usb-do-not-print-eshutdown-message-if-usb-at-otg-device-mode.patch @@ -0,0 +1,36 @@ +From linux-usb-owner@vger.kernel.org Wed Oct 6 13:37:13 2010 +From: Peter Chen <peter.chen@freescale.com> +To: linux-usb@vger.kernel.org +CC: Peter Chen <peter.chen@freescale.com> +Subject: USB: do not print -ESHUTDOWN message if usb at otg device mode +Date: Mon, 27 Sep 2010 16:43:25 +0800 +Message-ID: <1285577005-24081-1-git-send-email-peter.chen@freescale.com> + +From: Peter Chen <peter.chen@freescale.com> + +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> + +--- + drivers/usb/core/driver.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/core/driver.c ++++ b/drivers/usb/core/driver.c +@@ -1337,7 +1337,7 @@ int usb_resume(struct device *dev, pm_me + /* 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; + } |
