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

login
register
mail settings
Submitter Steve Sakoman
Date Nov. 19, 2010, 2:45 p.m.
Message ID <1290177947.2927.1631.camel@quadra>
Download mbox | patch
Permalink /patch/72254/
State Accepted
Commit 068a208b4a3e1e0dfc8dea6ebbd80b62ae280732
Delegated to: Scott Wood
Headers show

Comments

Steve Sakoman - Nov. 19, 2010, 2:45 p.m.
Otherwise environment read will fail if correctable errors occur

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

Patch

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;