From: Tom Rini Date: Thu, 1 Oct 2020 10:09:58 -0400 Subject: [PATCH 3/3] net: tftp: Fix load_block offset calculation In-Reply-To: <20200825022637.93123-4-ley.foon.tan@intel.com> References: <20200825022637.93123-1-ley.foon.tan@intel.com> <20200825022637.93123-4-ley.foon.tan@intel.com> Message-ID: <20201001140958.GM14816@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 Tue, Aug 25, 2020 at 10:26:37AM +0800, Ley Foon Tan wrote: > When load the last block, the "len" might not be a block size. This cause > loading the incorrect last block data. > > The fix change "len" to tftp_block_size and minus one tftp_block_size > for offset calculation. > > Use same offset calculation formula as in store_block(). > > Signed-off-by: Ley Foon Tan > Reviewed-By: Ramon Fried Applied to u-boot/next, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: