hi, On Mon, Aug 29, 2011 at 02:49:03PM +0200, Sebastian Andrzej Siewior wrote: > >On Mon, Aug 29, 2011 at 01:48:14PM +0200, Sebastian Andrzej Siewior wrote: > >> >A better approach might be to introduce a "quirks" field on struct > >> >usb_gadget, as have gadget drivers check for that. Something like: > >> > > >> > if (gadget->quirks & GADGET_NEEDS_ALIGNED_OUT) > >> > req->length = gadget->ep0->maxpacket; > >> > else > >> > req->length = len; > >> > >> This is bad because you have to ensure the buffer is large enough. For > >> ep0 the composite framework allocated bMaxPacketSize0 anyway right? > > > >composite has a 1k buffer. The buffer has to be big enough for a big > >load of descriptors. > > If so, why not unconditionally queue maxpacket size then? The host does > not see a difference. What if we have controllers which need request to be passed with correct size ? I mean, what if there's some DMA engine where if you don't start a transfer with correct size, it will never finish ? Until we know this won't cause problems for anyone else, I rather keep this workaround on dwc3 driver, since this is purely a dwc3 limitation. -- balbi
Attachment:
signature.asc
Description: Digital signature