mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Schenk, Gavin" <G.Schenk@eckelmann.de>
To: "s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	"barebox@lists.infradead.org" <barebox@lists.infradead.org>
Cc: "u.kleine-koenig@pengutronix.de" <u.kleine-koenig@pengutronix.de>
Subject: Re: [PATCH] usb: gadget: fastboot: fix downoading files of wMaxPacketSize bytes
Date: Mon, 1 Oct 2018 08:29:18 +0000	[thread overview]
Message-ID: <1c08cd25d72b7f5843b313071a6f040244f0df40.camel@eckelmann.de> (raw)
In-Reply-To: <20181001081716.26017-1-s.hauer@pengutronix.de>

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@pengutronix.de>
Reported-by: Gavin Schenk <g.schenk@eckelmann.de>

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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2018-10-01  8:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-01  8:17 Sascha Hauer
2018-10-01  8:29 ` Schenk, Gavin [this message]
2018-10-01  8:37   ` Uwe Kleine-König
2018-10-01  8:34 ` Uwe Kleine-König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1c08cd25d72b7f5843b313071a6f040244f0df40.camel@eckelmann.de \
    --to=g.schenk@eckelmann.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox