[U-Boot] [U-Boot, 2/2] fw_env: correct writes to devices with small erase blocks
Tom Rini
trini at ti.com
Wed Mar 12 22:05:34 CET 2014
On Thu, Mar 06, 2014 at 08:48:23PM -0800, Dustin Byford wrote:
> Some NOR flash devices have a small erase block size. For example, the
> Micron N25Q512 can erase in 4K blocks. These devices expose a bug in
> fw_env.c where flash_write_buf() incorrectly calculates bytes written
> and attempts to write past the environment sectors. Luckily, a range
> check prevents any real damage, but this does cause fw_setenv to fail
> with an error.
>
> This change corrects the write length calculation.
>
> The bug was introduced with commit 56086921 from 2008 and only affects
> configurations where the erase block size is smaller than the total
> environment data size.
>
> Signed-off-by: Dustin Byford <dustin at cumulusnetworks.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140312/5b39f17e/attachment.pgp>
More information about the U-Boot
mailing list