LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Chen Peter-B29397 <B29397@freescale.com>
Cc: Li Yang-R58472 <r58472@freescale.com>,
	Enrico Scholz <enrico.scholz@sigma-chemnitz.de>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"balbi@ti.com" <balbi@ti.com>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH] usb: gadget: fsl_udc_core: do not immediatly prime STATUS for IN xfer
Date: Thu, 6 Sep 2012 16:17:10 +0300	[thread overview]
Message-ID: <20120906131708.GJ29202@arwen.pp.htv.fi> (raw)
In-Reply-To: <F281D0F91ED19E4D8E63A7504E8A649803C67DA2@039-SN2MPN1-023.039d.mgd.msft.net>

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

On Wed, Sep 05, 2012 at 02:10:39AM +0000, Chen Peter-B29397 wrote:
>  
> > 
> > Because the fsl_udc_core driver shares one 'status_req' object for the
> > complete ep0 control transfer, it is not possible to prime the final
> > STATUS phase immediately after the IN transaction.  E.g. ch9getstatus()
> > executed:
> > 
> > | req = udc->status_req;
> > | ...
> > | list_add_tail(&req->queue, &ep->queue);
> > | if (ep0_prime_status(udc, EP_DIR_OUT))
> > |       ....
> > |       struct fsl_req *req = udc->status_req;
> > |       list_add_tail(&req->queue, &ep->queue);
> > 
> > which corrupts the ep->queue list by inserting 'status_req' twice.  This
> > causes a kernel oops e.g. when 'lsusb -v' is executed on the host.
> > 
> > Patch delays the final 'ep0_prime_status(udc, EP_DIR_OUT))' by moving it
> > into the ep0 completion handler.
> > 
> Enrico, thanks for pointing this problem.
> 
> As "prime STATUS phase immediately after the IN transaction" is followed
> USB 2.0 spec, to fix this problem, it is better to add data_req for ep0.
> In fact, it is already at FSL i.mx internal code, just still not mainlined.

so, do I get an Acked-by to this patch ? Does it need to go on v3.6-rc
or can it wait until v3.7 merge window ?

-- 
balbi

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

  reply	other threads:[~2012-09-06 13:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-04 16:58 [PATCH] usb: gadget: fsl_udc_core: do not immediatly prime STATUS for IN xfer Enrico Scholz
2012-09-05  2:10 ` Chen Peter-B29397
2012-09-06 13:17   ` Felipe Balbi [this message]
2012-09-06 14:27     ` Enrico Scholz
2012-09-06 14:27       ` Felipe Balbi
2012-09-10 16:22         ` Felipe Balbi
2012-09-12 11:17         ` Li Yang-R58472

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=20120906131708.GJ29202@arwen.pp.htv.fi \
    --to=balbi@ti.com \
    --cc=B29397@freescale.com \
    --cc=enrico.scholz@sigma-chemnitz.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=r58472@freescale.com \
    /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