Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758448AbbDWWfl (ORCPT ); Thu, 23 Apr 2015 18:35:41 -0400 Received: from mga14.intel.com ([192.55.52.115]:2894 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752236AbbDWWfj (ORCPT ); Thu, 23 Apr 2015 18:35:39 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,635,1422950400"; d="scan'208";a="700036719" Date: Thu, 23 Apr 2015 15:37:48 -0700 From: David Cohen To: Felipe Balbi Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] usb: dwc3: gadget: call gadget driver's ->suspend/->resume Message-ID: <20150423223748.GA19774@psi-dev26.jf.intel.com> References: <1429296116-3062-1-git-send-email-david.a.cohen@linux.intel.com> <20150417194327.GM2823@saruman.tx.rr.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150417194327.GM2823@saruman.tx.rr.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2525 Lines: 80 Hi Felipe, On Fri, Apr 17, 2015 at 02:43:27PM -0500, Felipe Balbi wrote: > On Fri, Apr 17, 2015 at 11:41:56AM -0700, David Cohen wrote: > > From: Felipe Balbi > > missing the required: > > [ Upstream commit bc5ba2e0b829c9397f96df1191c7d2319ebc36d9 ] > > > > > When going into bus suspend/resume we _must_ > > call gadget driver's ->suspend/->resume callbacks > > accordingly. This patch implements that very feature > > which has been missing forever. > > > > Cc: # 3.14 > > Signed-off-by: Felipe Balbi > > Signed-off-by: David Cohen > > --- > > > > Hi, > > > > This patch was introduced on v3.15. > > But the issue it fixes already existed on v3.14 and v3.14 is a long term > > support version. > > Can you show me a log of this breaking anywhere ? Why do you consider > this a bug fix ? What sort of drawbacks did you notice ? We're seeing BC1.2 compliance test failure. I borrowed this info from the bug report :) 1. BC1.2 compliance testing - SDP2.0 ----------------------------------------------- 1. On Connect to active Host (Expected result: 100mA to 500mA): Actual result 100mA to 500mA 2. On Host Suspend (ER: Fall back to 0mA): not falling back to 0mA, remains at 500mA 3. On Connect to Suspended Host (ER: 100mA to 0mA): cable-props shown as 100mA, which means drawing a current of 100mA from Suspended Host 4. On making Host active (ER: 500mA): 500mA > > > I propose to backport it over there as well. > > > > BR, David > > --- > > > > drivers/usb/dwc3/gadget.c | 35 +++++++++++++++++++++++++++++++++++ > > 1 file changed, 35 insertions(+) > > > > diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c > > index 8f6738d46b14..1bb752736c32 100644 > > --- a/drivers/usb/dwc3/gadget.c > > +++ b/drivers/usb/dwc3/gadget.c > > @@ -2012,6 +2012,24 @@ static void dwc3_disconnect_gadget(struct dwc3 *dwc) > > } > > } > > > > +static void dwc3_suspend_gadget(struct dwc3 *dwc) > > +{ > > + if (dwc->gadget_driver && dwc->gadget_driver->disconnect) { > > you also need Dan Carperter's commit which fixes this cut & paste error. > That's commit 73a30bfc0d526db899033165db6f95c427e70505 Thanks. I'll add that to my next try. Br, David -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/