Skip to contentSkip to conversation

patch "usb: musb: host: rely on port_mode to call musb_start()" added to usb-linus

PATCH [email protected] 1 participant 1 message Jul 7, 2015

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

usb: musb: host: rely on port_mode to call musb_start()

to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-linus branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.

If you have any questions about this process, please let me know.

Quoted 1 line

From be9d39881fc4fa39a64b6eed6bab5d9ee5125344 Mon Sep 17 00:00:00 2001

From: Felipe Balbi <[email protected]>
Date: Tue, 2 Jun 2015 13:03:36 -0500
Subject: usb: musb: host: rely on port_mode to call musb_start()

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 <[email protected]>
Cc <[email protected]> # v3.11+
---
 drivers/usb/musb/musb_virthub.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/usb/musb/musb_virthub.c +1 -3
index 30842bc195f5..92d5f718659b 100644
@@ -275,9 +275,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
 }
 
Signature · 1 line
2.4.5