diff options
author | Felipe Balbi <balbi@ti.com> | 2015-06-02 13:03:36 -0500 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2015-08-04 14:22:35 -0400 |
commit | 689488fc565537d2e2de46ee78e59903768b1385 (patch) | |
tree | 67b54ec597abc0c8b6ffe89e85e734d835e7b2c6 /drivers | |
parent | ece29f5be76e3db17bafbb32250290e9c70d38e7 (diff) |
usb: musb: host: rely on port_mode to call musb_start()
[ Upstream commit be9d39881fc4fa39a64b6eed6bab5d9ee5125344 ]
Currently, we're calling musb_start() twice for DRD ports
in some situations. This has been observed to cause enumeration
issues after suspend/resume cycles with AM335x.
In order to fix the problem, we just have to fix the check
on musb_has_gadget() so that it only returns true if
current mode is Host and ignore the fact that we have or
not a gadget driver loaded.
Fixes: ae44df2e21b5 (usb: musb: call musb_start() only once in OTG mode)
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: <stable@vger.kernel.org> # v3.11+
Tested-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/musb/musb_virthub.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/usb/musb/musb_virthub.c b/drivers/usb/musb/musb_virthub.c index 0241a3a0d63e..1e9bde4fe785 100644 --- a/drivers/usb/musb/musb_virthub.c +++ b/drivers/usb/musb/musb_virthub.c @@ -273,9 +273,7 @@ static int musb_has_gadget(struct musb *musb) #ifdef CONFIG_USB_MUSB_HOST return 1; #else - if (musb->port_mode == MUSB_PORT_MODE_HOST) - return 1; - return musb->g.dev.driver != NULL; + return musb->port_mode == MUSB_PORT_MODE_HOST; #endif } |