blob: c317a6f5fb7a40bea95f5008f67ef3db0cf5e575 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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;
}
|