summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-04-25 08:15:38 +0200
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-05-20 19:25:58 +0200
commitf01e2d1654dc65792674b3fe5403dbfcce43f9d2 (patch)
tree6aa4a3bef6973f8c404992beb1a242bf7dc300e6 /drivers/mtd
parentUBI: always dump VID and EC headers in case of errors (diff)
downloadlinux-f01e2d1654dc65792674b3fe5403dbfcce43f9d2.tar.xz
linux-f01e2d1654dc65792674b3fe5403dbfcce43f9d2.zip
UBI: always warn if case of I/O errors
Currently UBI silently retries I/O operation in case of errors. This patch makes it emit a warning before retrying. This should allow users notice issues earlier. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/ubi/io.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c
index a3225c212feb..19ee1a821557 100644
--- a/drivers/mtd/ubi/io.c
+++ b/drivers/mtd/ubi/io.c
@@ -189,9 +189,9 @@ retry:
}
if (retries++ < UBI_IO_RETRIES) {
- dbg_io("error %d%s while reading %d bytes from PEB "
- "%d:%d, read only %zd bytes, retry",
- err, errstr, len, pnum, offset, read);
+ ubi_warn("error %d%s while reading %d bytes from PEB "
+ "%d:%d, read only %zd bytes, retry",
+ err, errstr, len, pnum, offset, read);
yield();
goto retry;
}
@@ -364,8 +364,8 @@ retry:
err = mtd_erase(ubi->mtd, &ei);
if (err) {
if (retries++ < UBI_IO_RETRIES) {
- dbg_io("error %d while erasing PEB %d, retry",
- err, pnum);
+ ubi_warn("error %d while erasing PEB %d, retry",
+ err, pnum);
yield();
goto retry;
}
@@ -383,7 +383,7 @@ retry:
if (ei.state == MTD_ERASE_FAILED) {
if (retries++ < UBI_IO_RETRIES) {
- dbg_io("error while erasing PEB %d, retry", pnum);
+ ubi_warn("error while erasing PEB %d, retry", pnum);
yield();
goto retry;
}