linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: r.baldyga@hackerion.com (Robert Baldyga)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 01/46] usb: gadget: encapsulate endpoint claiming mechanism
Date: Thu, 20 Aug 2015 18:28:14 +0200	[thread overview]
Message-ID: <55D6001E.3000504@hackerion.com> (raw)
In-Reply-To: <20150820153553.GD1639@saruman.tx.rr.com>

Hi Felipe,

On 08/20/2015 05:35 PM, Felipe Balbi wrote:
[...]
> just letting you know that this regresses all gadget drivers making them
> try to disable previously disabled endpoints and enable previously
> enabled endpoints.
>
> I have a possible fix (see below) but then it shows a problem on the
> host side when using with g_zero (see further below):
>
> commit 3b8932100aacb6cfbffe288ca93025d8b8430c00
> Author: Felipe Balbi <balbi@ti.com>
> Date:   Wed Aug 19 18:05:27 2015 -0500
>
>      usb: gadget: fix ep->claimed lifetime
>
>      In order to fix a regression introduced by commit
>      cc476b42a39d ("usb: gadget: encapsulate endpoint
>      claiming mechanism") we have to introduce a simple
>      helper to check if a particular is enabled or not.
>
>      After that, we need to move ep->claimed lifetime to
>      usb_ep_enable() and usb_ep_disable() since those
>      are the only functions which actually enable and
>      disable endpoints.
>
>      A follow-up patch will come to drop all driver_data
>      checks from function drivers, since those are, now,
>      pointless.
>
>      Fixes: cc476b42a39d ("usb: gadget: encapsulate endpoint
>      	claiming mechanism")
>      Cc: Robert Baldyga <r.baldyga@samsung.com>
>      Signed-off-by: Felipe Balbi <balbi@ti.com>
>
> diff --git a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c
> index 978435a51038..ad45070cd76f 100644
> --- a/drivers/usb/gadget/epautoconf.c
> +++ b/drivers/usb/gadget/epautoconf.c
> @@ -126,7 +126,6 @@ found_ep:
>   	ep->address = desc->bEndpointAddress;
>   	ep->desc = NULL;
>   	ep->comp_desc = NULL;
> -	ep->claimed = true;

Removing this line causes autoconfig can return the same endpoint many 
times. This probably causes problems with g_zero.

I will try to fix it ASAP.

Thanks,
Robert

  reply	other threads:[~2015-08-20 16:28 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-31 14:00 [PATCH v5 00/46] usb: gadget: rework ep matching and claiming mechanism Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 01/46] usb: gadget: encapsulate endpoint " Robert Baldyga
2015-08-20 15:35   ` Felipe Balbi
2015-08-20 16:28     ` Robert Baldyga [this message]
2015-08-20 16:48       ` Felipe Balbi
2015-08-20 17:16         ` Robert Baldyga
2015-08-20 17:44           ` Felipe Balbi
2015-08-20 20:07             ` John Youn
2015-07-31 14:00 ` [PATCH v5 02/46] usb: gadget: add endpoint capabilities flags Robert Baldyga
2015-07-31 15:51   ` David Laight
2015-07-31 15:58     ` Felipe Balbi
2015-07-31 14:00 ` [PATCH v5 03/46] usb: gadget: add endpoint capabilities helper macros Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 04/46] staging: emxx_udc: add ep capabilities support Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 05/46] usb: chipidea: udc: " Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 06/46] usb: dwc2: gadget: " Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 07/46] usb: dwc3: " Robert Baldyga
2015-08-04 16:09   ` Felipe Balbi
2015-07-31 14:00 ` [PATCH v5 08/46] usb: gadget: amd5536udc: " Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 09/46] usb: gadget: at91_udc: " Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 10/46] usb: gadget: bcm63xx_udc: " Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 11/46] usb: gadget: bdc: " Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 12/46] usb: gadget: dummy-hcd: " Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 13/46] usb: gadget: fotg210-udc: " Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 14/46] usb: gadget: fsl_qe_udc: " Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 15/46] usb: gadget: fsl_udc_core: " Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 16/46] usb: gadget: fusb300_udc: " Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 17/46] usb: gadget: goku_udc: " Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 18/46] usb: gadget: gr_udc: " Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 19/46] usb: gadget: lpc32xx_udc: " Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 20/46] usb: gadget: m66592-udc: " Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 21/46] usb: gadget: mv_u3d_core: " Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 22/46] usb: gadget: mv_udc_core: " Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 23/46] usb: gadget: net2272: " Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 24/46] usb: gadget: net2280: " Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 25/46] usb: gadget: omap_udc: " Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 26/46] usb: gadget: pch_udc: " Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 27/46] usb: gadget: pxa25x_udc: " Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 28/46] usb: gadget: pxa27x_udc: " Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 29/46] usb: gadget: r8a66597-udc: " Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 30/46] usb: gadget: s3c-hsudc: " Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 31/46] usb: gadget: s3c2410_udc: " Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 32/46] usb: gadget: udc-xilinx: " Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 33/46] usb: isp1760: udc: " Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 34/46] usb: musb: gadget: " Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 35/46] usb: renesas: " Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 36/46] usb: gadget: atmel_usba_udc: " Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 37/46] usb: gadget: epautoconf: add endpoint capabilities flags verification Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 38/46] usb: gadget: epautoconf: remove pxa quirk from ep_matches() Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 39/46] usb: gadget: epautoconf: remove ep and desc configuration " Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 40/46] usb: gadget: epautoconf: rework ep_matches() function Robert Baldyga
2015-08-04 18:30   ` Felipe Balbi
2015-07-31 14:00 ` [PATCH v5 41/46] usb: gadget: add 'ep_match' callback to usb_gadget_ops Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 42/46] usb: gadget: move ep_matches() from epautoconf to udc-core Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 43/46] usb: gadget: move find_ep() from epautoconf to gadget.h Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 44/46] usb: gadget: net2280: add net2280_match_ep() function Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 45/46] usb: gadget: goku_udc: add goku_match_ep() function Robert Baldyga
2015-07-31 14:00 ` [PATCH v5 46/46] usb: musb: gadget: add musb_match_ep() function Robert Baldyga
2015-08-04 17:29 ` [PATCH v5 00/46] usb: gadget: rework ep matching and claiming mechanism Felipe Balbi

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=55D6001E.3000504@hackerion.com \
    --to=r.baldyga@hackerion.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).