[U-Boot] [PATCH v1] Revert "fastboot: OUT transaction length must be aligned to wMaxPacketSize"
Marek Vasut
marex at denx.de
Tue Apr 5 14:59:02 CEST 2016
On 04/05/2016 02:09 PM, Sam Protsenko wrote:
> On Mon, Apr 4, 2016 at 8:16 PM, Steve Rae <steve.rae at broadcom.com> wrote:
>> That one fails for me too....
>>
>> So I suspect that a conditional is required - something like:
>>
>> diff --git a/drivers/usb/gadget/f_fastboot.c
>> b/drivers/usb/gadget/f_fastboot.c
>> index a54b4ee..41ec211 100644
>> --- a/drivers/usb/gadget/f_fastboot.c
>> +++ b/drivers/usb/gadget/f_fastboot.c
>> @@ -422,17 +422,19 @@ static void cb_getvar(struct usb_ep *ep, struct
>> usb_request *req)
>> static unsigned int rx_bytes_expected(unsigned int maxpacket)
>> {
>> int rx_remain = download_size - download_bytes;
>> - int rem = 0;
>> + int __maybe_unused rem = 0;
>> if (rx_remain < 0)
>> return 0;
>> if (rx_remain > EP_BUFFER_SIZE)
>> return EP_BUFFER_SIZE;
>> +#if XXX_alignment_required
>> if (rx_remain < maxpacket) {
>> rx_remain = maxpacket;
>> } else if (rx_remain % maxpacket != 0) {
>> rem = rx_remain % maxpacket;
>> rx_remain = rx_remain + (maxpacket - rem);
>> }
>> +#endif
>> return rx_remain;
>> }
>>
>> If you submit a PATCH like this, then I will abort the request to "revert"
>> this PATCH....
>> Thanks, Steve
>
> Well, I'm pretty busy doing another work right now, and obviously
> revert shouldn't be merged anyway (as it breaks another platforms).
The revert is not applied.
> But you can go ahead and send v2 of this patch, adding corresponding
> options (perhaps to Kconfig) and testing them via #ifdef, and I will
> verify if it works fine for TI platforms.
>
> Also, it would be good to know why that stuck is happening for you in
> the first place, so we can come up with real solution to this problem
> instead of fixing it with hack.
Right
Best regards,
Marek Vasut
More information about the U-Boot
mailing list