Messages in this thread | | | From | Felipe Balbi <> | Subject | Re: [PATCH] usb: gadget: epautoconf: claim smallest endpoints first | Date | Thu, 23 Jul 2020 16:14:18 +0300 |
| |
Ruslan Bilovol <ruslan.bilovol@gmail.com> writes:
> UDC hardware may have endpoints with different maxpacket > size. Current endpoint matching code takes first matching > endpoint from the list. > > It's always possible that gadget allocates endpoints for > small transfers (maxpacket size) first, then larger ones. > That works fine if all matching UDC endpoints have same > maxpacket size or are big enough to serve that allocation. > > However, some UDCs have first endpoints in the list with > bigger maxpacket size, whereas last endpoints are much > smaller. In this case endpoint allocation will fail for > the gadget (which allocates smaller endpoints first) on > final endpoint allocations. > > To make endpoint allocation fair, pick up smallest > matching endpoints first, leaving bigger ones for > heavier applications. > > Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
checking file drivers/usb/gadget/epautoconf.c Hunk #1 succeeded at 151 with fuzz 1 (offset 85 lines). Hunk #2 FAILED at 77. 1 out of 2 hunks FAILED -- balbi [unhandled content-type:application/pgp-signature] | |