Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964888AbbD0Oxu (ORCPT ); Mon, 27 Apr 2015 10:53:50 -0400 Received: from mga09.intel.com ([134.134.136.24]:59173 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932764AbbD0Oxs (ORCPT ); Mon, 27 Apr 2015 10:53:48 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,657,1422950400"; d="scan'208";a="719898176" Date: Mon, 27 Apr 2015 07:55:58 -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: <20150427145558.GA11345@psi-dev26.jf.intel.com> References: <1429296116-3062-1-git-send-email-david.a.cohen@linux.intel.com> <20150417194327.GM2823@saruman.tx.rr.com> <20150423223748.GA19774@psi-dev26.jf.intel.com> <20150424194827.GB22447@saruman.tx.rr.com> <20150424205625.GA10838@psi-dev26.jf.intel.com> <20150425154742.GA28985@saruman.tx.rr.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150425154742.GA28985@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: 3332 Lines: 88 On Sat, Apr 25, 2015 at 10:47:42AM -0500, Felipe Balbi wrote: > Hi, Hi Felipe, > > On Fri, Apr 24, 2015 at 01:56:25PM -0700, David Cohen wrote: > > > > > > 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 > > > > > > But we don't support Battery Charging with dwc3 as of now :-) In fact, > > > just note that none of the BC registers are even defined in the current > > > driver anywhere. Seems like you should cherry-pick these to your vendor > > > tree, but v3.14 vanilla, because it doesn't support BC1.2, can't be > > > claimed to be at fault, right ? > > > > We could call it a missing feature that could lead to a potential bug :) > > By your own comment, he "must" was stressed out: > > sure it was because they really must be called :-) However, the only > actual problem that arises from not calling them is with something > that's not supported :-) > > > 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. > > ''' > > > > Since v3.14 is a LTS kernel and the changes are safe, it's worth to > > consider. > > definitely worth to consider, but not as something that fixes BC1.2 > because that's, as said, not supported in any public tree :-) Thanks for the reply. The gadget having this issue is really out-of-tree (android gadget). I could do 2 next steps: 1) I could drop android gadget and try to reproduce this issue using legacy g_ffs, which supports adbd as well. 2) I could propose this change directly on google's android 3.14 tree instead. Would you prefer one of those? Thanks, 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/