]> www.infradead.org Git - users/jedix/linux-maple.git/commit
usb: musb: host: rely on port_mode to call musb_start()
authorFelipe Balbi <balbi@ti.com>
Tue, 2 Jun 2015 18:03:36 +0000 (13:03 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Aug 2015 16:29:06 +0000 (09:29 -0700)
commit13d5f386c4978fd3ab9bbe92013ede0c21bbaed1
treea7e6508b0d8afe6f9009d9130b112ffcf0b34a21
parent1fd1fe35f15436869e182c1fb075d9f837dcf0c2
usb: musb: host: rely on port_mode to call musb_start()

commit be9d39881fc4fa39a64b6eed6bab5d9ee5125344 upstream.

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>
Tested-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/musb/musb_virthub.c