[U-Boot] [PATCH] env_nand: Use nand_read_skip_bad instead of nand_read

Steve Sakoman steve at sakoman.com
Fri Nov 19 15:45:47 CET 2010


Otherwise environment read will fail if correctable errors occur

Signed-off-by: Steve Sakoman <steve.sakoman at linaro.org>
---

diff --git a/common/env_nand.c b/common/env_nand.c
index 4e8307a..7f6c917 100644
--- a/common/env_nand.c
+++ b/common/env_nand.c
@@ -297,7 +297,7 @@ int readenv(size_t offset, u_char * buf)
 			offset += blocksize;
 		} else {
 			char_ptr = &buf[amount_loaded];
-			if (nand_read(&nand_info[0], offset, &len, char_ptr))
+			if (nand_read_skip_bad(&nand_info[0], offset, &len, char_ptr))
 				return 1;
 			offset += blocksize;
 			amount_loaded += len;



More information about the U-Boot mailing list