Hi, Benjamin Herrenschmidt <[email protected]> writes: > Another one popped to my eyes. > > The following test in usb_gadget_ep_match_desc() > (in udc core.c) > > /* "high bandwidth" works only at high speed */ > if (!gadget_is_dualspeed(gadget) && usb_endpoint_maxp(desc) & (3<<11)) > return 0;
seems like this was left out when I introduced usb_endpoint_maxp_mult()
> If you look at the definition of usb_endpoint_maxp() however:
>
> static inline int usb_endpoint_maxp(const struct usb_endpoint_descriptor *epd)
> {
> return __le16_to_cpu(epd->wMaxPacketSize) & USB_ENDPOINT_MAXP_MASK;
> }
>
> And we have:
>
> #define USB_ENDPOINT_MAXP_MASK 0x07ff
>
> I suspect the test should have been:
>
> /* "high bandwidth" works only at high speed */
> if (!gadget_is_dualspeed(gadget) && usb_endpoint_maxp_mult(desc) > 1)
> return 0;
>
> But I'm not completely certain as I'm not very familiar with USB3, so
> I'll let you guys figure that out :-)
care to send this as a proper patch?
--
balbi
signature.asc
Description: PGP signature
