public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: David Cohen <david.a.cohen@linux.intel.com>
Cc: Felipe Balbi <balbi@ti.com>, <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
Date: Mon, 27 Apr 2015 10:51:58 -0500	[thread overview]
Message-ID: <20150427155158.GG12680@saruman.tx.rr.com> (raw)
In-Reply-To: <20150427145558.GA11345@psi-dev26.jf.intel.com>

[-- Attachment #1: Type: text/plain, Size: 3530 bytes --]

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,
> 
> 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: <stable@vger.kernel.org> # 3.14
> > > > > > > Signed-off-by: Felipe Balbi <balbi@ti.com>
> > > > > > > Signed-off-by: David Cohen <david.a.cohen@linux.intel.com>
> > > > > > > ---
> > > > > > > 
> > > > > > > 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?

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

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      reply	other threads:[~2015-04-27 15:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-17 18:41 [PATCH] usb: dwc3: gadget: call gadget driver's ->suspend/->resume David Cohen
2015-04-17 19:42 ` Greg KH
2015-04-23 22:39   ` David Cohen
2015-04-17 19:43 ` Felipe Balbi
2015-04-17 19:45   ` Felipe Balbi
2015-04-23 22:37   ` David Cohen
2015-04-24 19:48     ` Felipe Balbi
2015-04-24 20:56       ` David Cohen
2015-04-25 15:47         ` Felipe Balbi
2015-04-27 14:55           ` David Cohen
2015-04-27 15:51             ` Felipe Balbi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150427155158.GG12680@saruman.tx.rr.com \
    --to=balbi@ti.com \
    --cc=david.a.cohen@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox