aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2010-10-31 12:55:30 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-02-06 12:35:26 -0500
commita87f29cbbcbd5bd1e4990367cd18967e9bbeacff (patch)
tree637789d9f982c7b92d4ee0aafcb1a3060e35a628 /drivers/mtd
parentfef2deb31f6523203a3fa1af485a5f1fef19cf6b (diff)
UBI: always re-read in case of read failures
When the read operation fails, UBI tries to re-read several times in a hope that one of the subsequent reads may succeed. However, currently UBI re-reads only if MTD failed to read all data, but does not re-reads if all the data were read, but with an integrity error (-EBADMSB). This patch makes UBI to always re-try reading. This should be useful for reading NAND pages with unstable bits - re-reading may help to get correct data. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/ubi/io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c
index 6f90a6530149..889e25c49323 100644
--- a/drivers/mtd/ubi/io.c
+++ b/drivers/mtd/ubi/io.c
@@ -188,7 +188,7 @@ retry:
188 return UBI_IO_BITFLIPS; 188 return UBI_IO_BITFLIPS;
189 } 189 }
190 190
191 if (read != len && retries++ < UBI_IO_RETRIES) { 191 if (retries++ < UBI_IO_RETRIES) {
192 dbg_io("error %d%s while reading %d bytes from PEB %d:%d," 192 dbg_io("error %d%s while reading %d bytes from PEB %d:%d,"
193 " read only %zd bytes, retry", 193 " read only %zd bytes, retry",
194 err, errstr, len, pnum, offset, read); 194 err, errstr, len, pnum, offset, read);