Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753180AbbD0Pxb (ORCPT ); Mon, 27 Apr 2015 11:53:31 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:33371 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752231AbbD0Px3 (ORCPT ); Mon, 27 Apr 2015 11:53:29 -0400 Date: Mon, 27 Apr 2015 10:51:58 -0500 From: Felipe Balbi To: David Cohen CC: Felipe Balbi , , , , Subject: Re: [PATCH] usb: dwc3: gadget: call gadget driver's ->suspend/->resume Message-ID: <20150427155158.GG12680@saruman.tx.rr.com> Reply-To: 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> <20150427145558.GA11345@psi-dev26.jf.intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="nEsDIrWrg+hrB7l1" Content-Disposition: inline In-Reply-To: <20150427145558.GA11345@psi-dev26.jf.intel.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: 4846 Lines: 129 --nEsDIrWrg+hrB7l1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 27, 2015 at 07:55:58AM -0700, David Cohen wrote: > On Sat, Apr 25, 2015 at 10:47:42AM -0500, Felipe Balbi wrote: > > Hi, >=20 > Hi Felipe, >=20 > >=20 > > 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. > > > > > > >=20 > > > > > > > Cc: # 3.14 > > > > > > > Signed-off-by: Felipe Balbi > > > > > > > Signed-off-by: David Cohen > > > > > > > --- > > > > > > >=20 > > > > > > > Hi, > > > > > > >=20 > > > > > > > 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. > > > > > >=20 > > > > > > Can you show me a log of this breaking anywhere ? Why do you co= nsider > > > > > > this a bug fix ? What sort of drawbacks did you notice ? > > > > >=20 > > > > > We're seeing BC1.2 compliance test failure. I borrowed this info = =66rom > > > > > the bug report :) > > > > >=20 > > > > > 1. BC1.2 compliance testing - SDP2.0 > > > > > ----------------------------------------------- > > > > > 1. On Connect to active Host (Expected result: 100mA to 500mA): > > > > > Actual result 100mA to 500mA > > > > >=20 > > > > > 2. On Host Suspend (ER: Fall back to 0mA): > > > > > not falling back to 0mA, remains at 500mA > > > > >=20 > > > > > 3. On Connect to Suspended Host (ER: 100mA to 0mA): > > > > > cable-props shown as 100mA, which means drawing a current of 1= 00mA from > > > > > Suspended Host > > > > >=20 > > > > > 4. On making Host active (ER: 500mA): > > > > > 500mA > > > >=20 > > > > But we don't support Battery Charging with dwc3 as of now :-) In fa= ct, > > > > just note that none of the BC registers are even defined in the cur= rent > > > > driver anywhere. Seems like you should cherry-pick these to your ve= ndor > > > > tree, but v3.14 vanilla, because it doesn't support BC1.2, can't be > > > > claimed to be at fault, right ? > > >=20 > > > We could call it a missing feature that could lead to a potential bug= :) > > > By your own comment, he "must" was stressed out: > >=20 > > 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 :-) > >=20 > > > 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. > > > ''' > > >=20 > > > Since v3.14 is a LTS kernel and the changes are safe, it's worth to > > > consider. > >=20 > > definitely worth to consider, but not as something that fixes BC1.2 > > because that's, as said, not supported in any public tree :-) >=20 > 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. >=20 > Would you prefer one of those? hehe, I'll let Greg decide, I'm not against the patch, as I said before, but I'm also not entirely sure it fits within stable rules ;-) cheers --=20 balbi --nEsDIrWrg+hrB7l1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVPlseAAoJEIaOsuA1yqREjq8P/1f1rcpYG8lmes6rnutT9+Ql 08zB/XICfIMhkdmtSjzrEtcZKC1zjfk6bn5tNz8kGLxm06TNsp75oIaQxIOa9trS HMIYW0DW6uPT1TvYndwEDat9ynVKCec4I+PxMpYu9WuP8j9gSTZ1YBOL7b89/1mS ugISI5zoOwH0ZLGt6cr/n7kXeVxdLf+DuV6cKFdoqOqNLb4CqoQQVZlpKh8Pa2GQ dgqnM5Be41cPAmOSkdiJnfHNz9AQHN9c8ndhoXRtoaNJtB465C0RU+SeF27QRViC uEZ+DdZT1xL1J8nibPhgYWbM7639Ck37RrMcWas4tq7s6xzRhhmUlun9gwUp+EuM yszeJJrbFZf46RNJrx4Xmfrq4CJ3u/GGyQHdUNqebSPNLPMs2HPNAkT+BngGOYza Y+Yvu5DwCM4Elwu+l+/4cM32+p0spMYUE5lHyxwo+tmW9nB5ZWgHZmru77KdrH2t VmGP3AJ7eswToH+4N6cfNJbO+l++vfMOgFvACGo1OoEisAuWNJ2WeJa0Kk3c0bsN xPO4XKBt9H2v5y2KfL14OmQRGsOAHTgj0oWBt5Srti3RcMzgsfV6JQdIYf56vwn5 2QNvfEXNuBAvxho2gJJ0cPqMHGu7hg6gYP9KlnBudQnrcoDsSQvA+mdJ9wFxU8rf pC83damClA5rRa5qy1LD =WSvU -----END PGP SIGNATURE----- --nEsDIrWrg+hrB7l1-- -- 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/