From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Barebox List <barebox@lists.infradead.org>, G.Schenk@eckelmann.de
Subject: Re: [PATCH] usb: gadget: fastboot: fix downoading files of wMaxPacketSize bytes
Date: Mon, 1 Oct 2018 10:34:00 +0200 [thread overview]
Message-ID: <20181001083400.nwaosiref5bloxjw@pengutronix.de> (raw)
In-Reply-To: <20181001081716.26017-1-s.hauer@pengutronix.de>
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@pengutronix.de>
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@pengutronix.de>
Thanks
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2018-10-01 8:34 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
2018-10-01 8:37 ` Uwe Kleine-König
2018-10-01 8:34 ` Uwe Kleine-König [this message]
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=20181001083400.nwaosiref5bloxjw@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=G.Schenk@eckelmann.de \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@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