From patchwork Wed Apr 2 19:31:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 27656 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f71.google.com (mail-yh0-f71.google.com [209.85.213.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EDA7F20341 for ; Wed, 2 Apr 2014 19:33:56 +0000 (UTC) Received: by mail-yh0-f71.google.com with SMTP id a41sf1758594yho.2 for ; Wed, 02 Apr 2014 12:33:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:date:from:to:cc:subject:message-id :reply-to:references:mime-version:content-type:content-disposition :in-reply-to:user-agent:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=Otgf+vB56OjLOIXC1k1jl1Me+2BwCOAZuFjKCuIkja0=; b=MKBq1A/aVDcOGCy3CecUBdZDTUPx18SHRAqGB9zWj10jN8Gaj9y+9VaZmmvpZPneCn IQ6XeU9qV91u5hh2/NAQ/O9EcCeBLYeho9hJFuoI21xrAVDRl66vNgoN9jq5fY0CqtJa n8hseIkRtePXOpoviCTcf83o1wuKWB08KJuDhvXoV5y3G5G1oT9+pdALp+QUBfHmysD1 bR2s2NCEk/Bse5BaIk1fFycJRfXJfvB5OK865uRhdBD64SGs+CQ6iWO3zMr1RdBSyQbe nD7NC1/m/XvhAtIbanotP2VLf4PFL2lOfx1rH9pd6y5SpoRYZVonolDvDtcqp1TPEkfP 4mEQ== X-Gm-Message-State: ALoCoQl+9cIn9CTBwtQ9T5pzQncjv+GWJ8AEGVLlVR7c9mzIec65Z8vp71tJ/56sC12b4G559SpU X-Received: by 10.236.159.99 with SMTP id r63mr1156985yhk.7.1396467236695; Wed, 02 Apr 2014 12:33:56 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.27.138 with SMTP id 10ls419809qgx.52.gmail; Wed, 02 Apr 2014 12:33:56 -0700 (PDT) X-Received: by 10.52.130.225 with SMTP id oh1mr2761392vdb.8.1396467236558; Wed, 02 Apr 2014 12:33:56 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id p2si794668vcx.93.2014.04.02.12.33.56 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 02 Apr 2014 12:33:56 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.169; Received: by mail-vc0-f169.google.com with SMTP id ik5so1004661vcb.14 for ; Wed, 02 Apr 2014 12:33:56 -0700 (PDT) X-Received: by 10.52.119.197 with SMTP id kw5mr2608483vdb.5.1396467236464; Wed, 02 Apr 2014 12:33:56 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.12.8 with SMTP id v8csp349622vcv; Wed, 2 Apr 2014 12:33:53 -0700 (PDT) X-Received: by 10.68.250.3 with SMTP id yy3mr2252321pbc.56.1396467233137; Wed, 02 Apr 2014 12:33:53 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id et3si1810654pbc.334.2014.04.02.12.33.49; Wed, 02 Apr 2014 12:33:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030228AbaDBTdn (ORCPT + 27 others); Wed, 2 Apr 2014 15:33:43 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:51252 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932666AbaDBTdl (ORCPT ); Wed, 2 Apr 2014 15:33:41 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id s32JXd4I009846; Wed, 2 Apr 2014 14:33:39 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s32JXdX9003650; Wed, 2 Apr 2014 14:33:39 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.174.1; Wed, 2 Apr 2014 14:33:38 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s32JXcQs010036; Wed, 2 Apr 2014 14:33:38 -0500 Date: Wed, 2 Apr 2014 14:31:38 -0500 From: Felipe Balbi To: Rabin Vincent CC: Felipe Balbi , Greg Kroah-Hartman , , Subject: Re: [PATCH] usb: musb: turn phy on Message-ID: <20140402193138.GM8504@saruman.home> Reply-To: References: <1396466787-19093-1-git-send-email-rabin@rab.in> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1396466787-19093-1-git-send-email-rabin@rab.in> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: balbi@ti.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Hi, On Wed, Apr 02, 2014 at 09:26:27PM +0200, Rabin Vincent wrote: > 30a70b026b4cde4 ("usb: musb: fix obex in g_nokia.ko causing kernel > panic") broke USB gadget support on Pandaboard because it simply deletes > the call to phy_power_on() and the PHY is therefore never turned on. > > Fix it by actually turning the phy on. > > Cc: stable@vger.kernel.org > Signed-off-by: Rabin Vincent > --- > drivers/usb/musb/musb_gadget.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c > index d4aa779..09d5883 100644 > --- a/drivers/usb/musb/musb_gadget.c > +++ b/drivers/usb/musb/musb_gadget.c > @@ -1850,6 +1850,7 @@ static int musb_gadget_start(struct usb_gadget *g, > } > > pm_runtime_get_sync(musb->controller); > + phy_power_on(musb->phy); > > dev_dbg(musb->controller, "registering driver %s\n", driver->function); > > @@ -1963,6 +1964,7 @@ static int musb_gadget_stop(struct usb_gadget *g, > * that currently misbehaves. > */ > > + phy_power_off(musb->phy); hmmm... not the best place, I have been waiting for -rc1 to be out to send this version: commit e8fbe7b90021960907e885e0b7a9b52d378b0202 Author: Felipe Balbi Date: Fri Mar 28 14:31:47 2014 -0500 usb: musb: fix PHY power on/off commi 30a70b0 (usb: musb: fix obex in g_nokia.ko causing kernel panic) removed phy_power_on() and phy_power_off() calls from runtime PM callbacks but it failed to note that the driver depended on pm_runtime_get_sync() calls to power up the PHY, thus leaving some platforms without any means to have a working PHY. Fix that by enabling the phy during omap2430_musb_init() and killing it in omap2430_musb_exit(). Fixes: 30a70b0 (usb: musb: fix obex in g_nokia.ko causing kernel panic) Cc: # v3.14 Cc: Pali Rohár Cc: Ivaylo Dimitrov Reported-by: Michael Scott Tested-by: Michael Scott Reported-by: Rabin Vincent Signed-off-by: Felipe Balbi and I'm much more inclined to send this one instead since it has been tested by other folks already. I was even going to Cc you, as you can see on that Reported-by tag. cheers diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index d341c14..819a7cd 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@ -416,6 +416,7 @@ static int omap2430_musb_init(struct musb *musb) omap_musb_set_mailbox(glue); phy_init(musb->phy); + phy_power_on(musb->phy); pm_runtime_put_noidle(musb->controller); return 0; @@ -478,6 +479,7 @@ static int omap2430_musb_exit(struct musb *musb) del_timer_sync(&musb_idle_timer); omap2430_low_level_exit(musb); + phy_power_off(musb->phy); phy_exit(musb->phy); return 0;