From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Sat, 12 Sep 2015 08:51:31 -0400 Subject: [U-Boot] [U-Boot,06/10] dfu: mmc: buffer file reads too In-Reply-To: <1441425831-3441-6-git-send-email-swarren@wwwdotorg.org> References: <1441425831-3441-6-git-send-email-swarren@wwwdotorg.org> Message-ID: <20150912125131.GD26226@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, Sep 04, 2015 at 10:03:47PM -0600, Stephen Warren wrote: > From: Stephen Warren > > When writing to files in a filesystem on MMC, dfu_mmc.c buffers up the > entire file content until the end of the transaction, at which point the > file is written in one go. This allows writing files larger than the USB > transfer size (CONFIG_SYS_DFU_DATA_BUF_SIZE); the maximum written file > size is CONFIG_SYS_DFU_MAX_FILE_SIZE (the size of the temporary buffer). > > The current file reading code does not do any buffering, and so limits > the maximum read file size to the USB transfer size. Enhance the code to > do the same kind of buffering as the write path, so the same file size > limits apply. > > Remove the size checking code from dfu_read() since all read paths now > support larger files than the USB transfer buffer. > > Signed-off-by: Stephen Warren > Acked-by: Lukasz Majewski > Tested-by: Lukasz Majewski Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: