[3.19.y-ckt stable] Patch "usb: musb: host: rely on port_mode to call musb_start()" has been added to staging queue

Kamal Mostafa kamal at canonical.com
Wed Aug 5 21:47:41 UTC 2015


This is a note to let you know that I have just added a patch titled

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

to the linux-3.19.y-queue branch of the 3.19.y-ckt extended stable tree 
which can be found at:

    http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.19.y-queue

This patch is scheduled to be released in version 3.19.8-ckt5.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.19.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

------

>From b5e0c255668c1be411597cb8082fde9248deb5eb Mon Sep 17 00:00:00 2001
From: Felipe Balbi <balbi at ti.com>
Date: Tue, 2 Jun 2015 13:03:36 -0500
Subject: 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 at linutronix.de>
Tested-by: Sekhar Nori <nsekhar at ti.com>
Signed-off-by: Felipe Balbi <balbi at ti.com>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
 drivers/usb/musb/musb_virthub.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/usb/musb/musb_virthub.c b/drivers/usb/musb/musb_virthub.c
index a9c47315..d91dac9 100644
--- a/drivers/usb/musb/musb_virthub.c
+++ b/drivers/usb/musb/musb_virthub.c
@@ -274,9 +274,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
 }

--
1.9.1





More information about the kernel-team mailing list