lkml.org 
[lkml]   [2013]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC/PATCH 2/2] usb: ffs/dwc3: pad epout buffer size when not aligned to maxpacketsize
>> +		/*
>> + * DWC3 requires buffer size to be aligned to maxpacketsize
>> + * of an out endpoint.
>> + * FIXME: a more generic solution might be necessary.
>> + */
>
> see, gadget drivers shouldn't have to know about DWC3 at all. They need
> to know that current UDC has a quirk where EP OUT transactions need to
> be aligned to wMaxPacketSize, so what I was expecting to see here was:
>
> if (test_bit(USB_GADGET_QUIRK_EP_OUT_ALIGNED_SIZE, &gadget->qirks) &&
> !IS_ALIGNED(len, ep->ep->desc->wMaxPacketSize))
> len = align_length(orig_len, wMaxPacketSize);

That makes sense. I'll send a new version.

Thanks,

David Cohen



\
 
 \ /
  Last update: 2013-10-29 15:41    [W:0.065 / U:1.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site