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;

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 :-)

Cheers,
Ben.

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to