Files
u-boot/include
Brandon Maier b9c3052fbb env: increment redund flag on read fail
If one of the reads fails when importing redundant environments (a
single read failure), the env_flags wouldn't get initialized in
env_import_redund(). If a user then calls saveenv, the new environment
will have the wrong flags value. So on the next load the new environment
will be ignored.

While debugging this, I also noticed that env/sf.c was not correctly
handling a single read failure, as it would not check the crc before
assigning it to gd->env_addr.

Having a special error path for when there is a single read failure
seems unnecessary and may lead to future bugs. Instead collapse the
'single read failure' error to be the same as a 'single crc failure'.
That way env_check_redund() either passes or fails, and if it passes we
are guaranteed to have checked the CRC.

Signed-off-by: Brandon Maier <brandon.maier@rockwellcollins.com>
CC: Joe Hershberger <joe.hershberger@ni.com>
CC: Wolfgang Denk <wd@denx.de>
CC: Heiko Schocher <hs@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
2021-04-16 11:55:55 -04:00
..
2021-04-12 17:45:40 -04:00
…
2021-04-12 17:44:55 -04:00
…
…
…
…
…
…
…
…
2021-01-15 14:36:12 -05:00
…
…
…
…
2021-01-25 21:52:00 +00:00
…
…
2021-01-25 21:52:00 +00:00
…
…
…
…
2021-01-12 10:58:04 +05:30
2021-01-12 10:58:04 +05:30
…
2020-12-26 12:37:28 +01:00
…
…
…
…
2021-01-30 14:25:42 -07:00
…
2021-01-31 14:08:56 +01:00
…
…
…
…
…
…
…
…
…
2020-08-03 22:19:54 -04:00
…
2021-04-10 12:00:24 +02:00
…
2021-04-16 11:55:55 -04:00
…
…
…
…
…
…
…
…
…
2020-08-07 22:31:32 -04:00
…
…
…
…
…
…
2021-04-10 08:04:42 -04:00
2021-02-10 10:00:51 +01:00
2020-10-30 10:56:11 -04:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2020-08-04 23:30:02 -04:00
…
…
…
…
2021-03-27 15:04:31 +13:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2020-12-18 20:32:21 -07:00
…
…
…
…
2021-04-12 17:44:55 -04:00
…
…
…
…
…
…
…
…
2020-09-30 11:55:23 -04:00
…
…
…
…
…
…
…
…
2021-03-27 15:04:31 +13:00
2021-01-05 16:20:26 -05:00
…
…
2020-10-22 09:54:53 -04:00
…
…
…
…
2020-08-03 22:19:54 -04:00
…
…
…
…
…
2021-01-27 17:03:16 -05:00
…
…
…
…
…
2020-08-03 22:19:54 -04:00
2020-08-03 22:19:54 -04:00
2021-01-15 14:36:12 -05:00
…
…