Re: [PATCH] usb: gadget: set maxpacket_limit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
> ---
>  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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux