Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 201813
b: refs/heads/master
c: 1a49af2
h: refs/heads/master
i:
  201811: f2def2d
v: v3
  • Loading branch information
Artem Bityutskiy authored and Artem Bityutskiy committed Jun 11, 2010
1 parent f982930 commit 0ba9bd7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0798cea8c2e1afee59686c51d27d0e96b05e42d1
refs/heads/master: 1a49af2ca019dcb4614c32f832bbcb814b61409c
8 changes: 5 additions & 3 deletions trunk/drivers/mtd/ubi/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ int ubi_io_read(const struct ubi_device *ubi, void *buf, int pnum, int offset,
retry:
err = ubi->mtd->read(ubi->mtd, addr, len, &read, buf);
if (err) {
const char errstr = (err == -EBADMSG) ? "ECC error" : "";

if (err == -EUCLEAN) {
/*
* -EUCLEAN is reported if there was a bit-flip which
Expand All @@ -165,15 +167,15 @@ int ubi_io_read(const struct ubi_device *ubi, void *buf, int pnum, int offset,
}

if (read != len && retries++ < UBI_IO_RETRIES) {
dbg_io("error %d while reading %d bytes from PEB %d:%d,"
dbg_io("error %d%s while reading %d bytes from PEB %d:%d,"
" read only %zd bytes, retry",
err, len, pnum, offset, read);
err, errstr, len, pnum, offset, read);
yield();
goto retry;
}

ubi_err("error %d while reading %d bytes from PEB %d:%d, "
"read %zd bytes", err, len, pnum, offset, read);
"read %zd bytes", err, errstr, len, pnum, offset, read);
ubi_dbg_dump_stack();

/*
Expand Down

0 comments on commit 0ba9bd7

Please sign in to comment.