On Wed, 26 Nov 2014, Amit Virdi wrote: > Dear Sebastian, > > On 11/25/2014 10:52 PM, Sebastian Andrzej Siewior wrote: > > The max packet size within the FS descriptor has to be highest possible > > value and _not_ the one that is (or will be) used on FS. > > The current code sets wMaxPacketSize of FS interrupt endpoint descriptor > as 64, which is in accordance with the usb 2.0 specification, section 5.7.3 > > The maximum allowable interrupt data payload size is 64 bytes > or less for full-speed. High-speed endpoints are allowed > maximum data payload sizes up to 1024 bytes. The real problem is that we are assuming endpoints can be allocated in a single way that will work correctly for all possible connection speeds. (I suspect it was done this way out of laziness and a desire to minimize the code size.) This assumption is obviously incorrect when the hardware has an interrupt endpoint that supports packet sizes of 64 but no larger. The right way to fix the problem is to avoid allocating endpoints until after the connection speed is known. Then we can call usb_ep_autoconfig() with the appropriate set of descriptors, and nothing will need to be fixed up. However, I don't know if this approach is compatible with the composite framework in its current form. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html