]> git.baikalelectronics.ru Git - kernel.git/commit
usb: musb: Fix trying to suspend while active for OTG configurations
authorTony Lindgren <tony@atomide.com>
Wed, 17 May 2017 16:23:10 +0000 (11:23 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 May 2017 13:21:17 +0000 (15:21 +0200)
commit1ce46b488afcdcf1235f9f9cd5b55bbd70c64d99
treeec9323a14b129783ca3710396c07717d73b17a2e
parent8fff08abed56cac880ea1f9748c4ab8f2e1a96d6
usb: musb: Fix trying to suspend while active for OTG configurations

Commit 004b5d516319 ("usb: musb: Fix hardirq-safe hardirq-unsafe
lock order error") caused a regression where musb keeps trying to
enable host mode with no cable connected. This seems to be caused
by the fact that now phy is enabled earlier, and we are wrongly
trying to force USB host mode on an OTG port. The errors we are
getting are "trying to suspend as a_idle while active".

For ports configured as OTG, we should not need to do anything
to try to force USB host mode on it's OTG port. Trying to force host
mode in this case just seems to completely confuse the musb state
machine.

Let's fix the issue by making musb_host_setup() attempt to force the
mode only if port_mode is configured for host mode.

Fixes: 004b5d516319 ("usb: musb: Fix hardirq-safe hardirq-unsafe lock order error")
Cc: Johan Hovold <johan@kernel.org>
Cc: stable <stable@vger.kernel.org>
Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reported-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/musb/musb_host.c