summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2019-12-22 21:00:19 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-14 22:05:48 +0300
commitf71f56ad53546fed4b22b783d7aecdf7dee4c71d (patch)
treef3e594261787f5bb29d09944fec52d28b9436875
parent1adecb749b826d4956a2691b470d806715619f90 (diff)
downloadlinux-f71f56ad53546fed4b22b783d7aecdf7dee4c71d.tar.xz
phy: cpcap-usb: Fix flakey host idling and enumerating of devices
commit 049226b9fd7442149dcbcf55f15408f5973cceda upstream. We must let the USB host idle things properly before we switch to debug UART mode. Otherwise the USB host may never idle after disconnecting devices, and that causes the next enumeration to be flakey. Cc: Jacopo Mondi <jacopo@jmondi.org> Cc: Marcel Partap <mpartap@gmx.net> Cc: Merlijn Wajer <merlijn@wizzup.org> Cc: Michael Scott <hashcode0f@gmail.com> Cc: NeKit <nekit1000@gmail.com> Cc: Pavel Machek <pavel@ucw.cz> Cc: Sebastian Reichel <sre@kernel.org> Acked-by: Pavel Machek <pavel@ucw.cz> Fixes: 6d6ce40f63af ("phy: cpcap-usb: Add CPCAP PMIC USB support") Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/phy/motorola/phy-cpcap-usb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/phy/motorola/phy-cpcap-usb.c b/drivers/phy/motorola/phy-cpcap-usb.c
index 6beaf8e0449c..4ba3634009af 100644
--- a/drivers/phy/motorola/phy-cpcap-usb.c
+++ b/drivers/phy/motorola/phy-cpcap-usb.c
@@ -281,13 +281,13 @@ static void cpcap_usb_detect(struct work_struct *work)
return;
}
+ cpcap_usb_try_musb_mailbox(ddata, MUSB_VBUS_OFF);
+
/* Default to debug UART mode */
error = cpcap_usb_set_uart_mode(ddata);
if (error)
goto out_err;
- cpcap_usb_try_musb_mailbox(ddata, MUSB_VBUS_OFF);
-
dev_dbg(ddata->dev, "set UART mode\n");
return;