Skip to contentSkip to conversation

phy: cpcap-usb: Fix flakey host idling and enumerating of devices

PATCH Superseded Tony Lindgren 1 participant 1 message Aug 30, 2019

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 phy: cpcap-usb: Fix flakey host idling and enumerating of devices

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. This happens as the USB PHY mode gets disabled too early.

Cc Jacopo Mondi <[email protected]>
Cc Marcel Partap <[email protected]>
Cc Merlijn Wajer <[email protected]>
Cc Michael Scott <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Sebastian Reichel <[email protected]>
Fixes 6d6ce40f63af ("phy: cpcap-usb: Add CPCAP PMIC USB support")
---
 drivers/phy/motorola/phy-cpcap-usb.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/phy/motorola/phy-cpcap-usb.c +3 -3
@@ -274,12 +274,12 @@ static void cpcap_usb_detect(struct work_struct *work)
 		return;
 	}
 
-	/* Default to debug UART mode */
-	error = cpcap_usb_set_uart_mode(ddata);
+	error = musb_mailbox(MUSB_VBUS_OFF);
 	if (error)
 		goto out_err;
 
-	error = musb_mailbox(MUSB_VBUS_OFF);
+	/* Default to debug UART mode */
+	error = cpcap_usb_set_uart_mode(ddata);
 	if (error)
 		goto out_err;
 
Signature · 1 line
2.23.0