Hi, > 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 s/legths/length > 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> Reported-by: Gavin Schenk <g.schenk@xxxxxxxxxxxx> Thank you for this patch! Regards Gavin Schenk -- Eckelmann AG Vorstand: Dipl.-Ing. Peter Frankenbach (Sprecher) Dipl.-Wi.-Ing. Philipp Eckelmann Dr.-Ing. Marco Münchhof Dr.-Ing. Frank Uhlemann Vorsitzender des Aufsichtsrats: Hubertus G. Krossa Stv. Vorsitzender des Aufsichtsrats: Dr.-Ing. Gerd Eckelmann Sitz der Gesellschaft: Berliner Str. 161, 65205 Wiesbaden, Amtsgericht Wiesbaden HRB 12636 http://www.eckelmann.de _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox