Re: [PATCH] usb: gadget: fastboot: fix downoading files of wMaxPacketSize bytes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Sascha,

On Mon, Oct 01, 2018 at 10:17:16AM +0200, Sascha Hauer wrote:
> File transfers with sizes of exact multiples of wMaxPacketSize up to
> EP_BUFFER_SIZE do not work. For a typical scenario that would be files
> of 512, 1024 ... 3584 bytes.
> 
> This happens because we unconditionally put EP_BUFFER_SIZE into the
> initial request length. For non wMaxPacketSize aligned legths this
> works well because the transfer is completed with a short packet.
> For wMaxPacketSize aligned lengths there is no short packet though,
> so the transfer never completes. Instead we have to put the file
> size into the initial request length.
> 
> Some controllers like the DWC3 do not work when the request length is
> not aligned to wMaxPacketSize, so we align up to wMaxPacketSize like
> done in U-Boot.
> 
> Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>

I tried transfering files of sizes between 1 and 4100 bytes and with
this patch this actually works fine.

Tested-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>

Thanks
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux