From patchwork Thu Aug 6 20:36:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Mostafa X-Patchwork-Id: 504817 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id C86321401F6; Fri, 7 Aug 2015 06:37:57 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1ZNRvE-0006Rb-ID; Thu, 06 Aug 2015 20:37:52 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1ZNRuP-0005vB-Ad for kernel-team@lists.ubuntu.com; Thu, 06 Aug 2015 20:37:01 +0000 Received: from 1.general.kamal.us.vpn ([10.172.68.52] helo=fourier) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1ZNRuO-0006bb-Be; Thu, 06 Aug 2015 20:37:00 +0000 Received: from kamal by fourier with local (Exim 4.82) (envelope-from ) id 1ZNRuM-0004Bv-44; Thu, 06 Aug 2015 13:36:58 -0700 From: Kamal Mostafa To: Felipe Balbi Subject: [3.13.y-ckt stable] Patch "usb: musb: host: rely on port_mode to call musb_start()" has been added to staging queue Date: Thu, 6 Aug 2015 13:36:57 -0700 Message-Id: <1438893417-16081-1-git-send-email-kamal@canonical.com> X-Mailer: git-send-email 1.9.1 X-Extended-Stable: 3.13 Cc: Sebastian Andrzej Siewior , Kamal Mostafa , kernel-team@lists.ubuntu.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com 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.13.y-queue branch of the 3.13.y-ckt extended stable tree which can be found at: http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.13.y-queue This patch is scheduled to be released in version 3.13.11-ckt25. 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.13.y-ckt tree, see https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable Thanks. -Kamal ------ From 871f38f6ac160255a945d9f0859e0923bf890a5f Mon Sep 17 00:00:00 2001 From: Felipe Balbi 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 Tested-by: Sekhar Nori Signed-off-by: Felipe Balbi Signed-off-by: Kamal Mostafa --- drivers/usb/musb/musb_virthub.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 1.9.1 diff --git a/drivers/usb/musb/musb_virthub.c b/drivers/usb/musb/musb_virthub.c index 5448125..94cdd96 100644 --- a/drivers/usb/musb/musb_virthub.c +++ b/drivers/usb/musb/musb_virthub.c @@ -231,9 +231,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 }