mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Ladislav Michl <ladis@linux-mips.org>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] usb: gadget: set maxpacket_limit
Date: Fri, 26 Oct 2018 11:50:06 +0200	[thread overview]
Message-ID: <20181026095006.seqw52kddynsm3we@pengutronix.de> (raw)
In-Reply-To: <20181024204147.GA15377@lenoch>

On Wed, Oct 24, 2018 at 10:41:47PM +0200, Ladislav Michl wrote:
> Gadget update to 3.15 imported Linux patch e117e742d310 ("usb:
> gadget: add "maxpacket_limit" field to struct usb_ep"):
> 
>   This patch adds "maxpacket_limit" to struct usb_ep. This field contains
>   maximum value of maxpacket supported by driver, and is set in driver probe.
>   This value should be used by autoconfig() function, because value of field
>   "maxpacket" is set to value from endpoint descriptor when endpoint becomes
>   enabled. So when autoconfig() function will be called again for this endpoint,
>   "maxpacket" value will contain wMaxPacketSize from descriptior instead of
>   maximum packet size for this endpoint.
> 
>   For this reason this patch adds new field "maxpacket_limit" which contains
>   value of maximum packet size (which defines maximum endpoint capabilities).
>   This value is used in ep_matches() function used by autoconfig().
> 
>   Value of "maxpacket_limit" should be set in UDC driver probe function, using
>   usb_ep_set_maxpacket_limit() function, defined in gadget.h. This function
>   set choosen value to both "maxpacket_limit" and "maxpacket" fields.
> 
> However said update didn't bring in all driver changes. Do it now.
> 
> Fixes: 2776d53d7ac8 ("USB: gadget: Update to 3.15")
> Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
> ---
>  Please note, that this patch was created to fix
>    simear4:/ usbgadget -a
>    multi_bind: creating ACM function
>    g_multi usbgadget: acm/23b68c88: can't bind, err -19
>    g_multi udc0: failed to start g_multi: -19
>    usbgadget: No such device
>  on at91_udc (autoconfig() was failing).
>  Thus fsl_udc and pxa27x_udc changes are untested.

Tested on fsl_udc and applied, thanks

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2018-10-26  9:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-24 20:41 Ladislav Michl
2018-10-26  9:50 ` Sascha Hauer [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=20181026095006.seqw52kddynsm3we@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=ladis@linux-mips.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