summaryrefslogtreecommitdiff
path: root/drivers/mtd/ubi/io.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@linux.intel.com>2012-04-24 08:10:33 +0400
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-05-20 21:25:58 +0400
commitef7088e7f84ba550b276bc4a74f2732ee5618fb8 (patch)
treed78e5c018a29241b05e14b946b9f29e008fa6042 /drivers/mtd/ubi/io.c
parent25886a368d58edd9bb0f63d4417d2f73592b9dba (diff)
downloadlinux-ef7088e7f84ba550b276bc4a74f2732ee5618fb8.tar.xz
UBI: always dump flash contents in case of errors
UBI (and UBIFS) are a bit over-engineered WRT debugging. The idea was to link as few as possible when debugging is disabled, but the downside is that most people produce bug reports which are difficult to understand. Always dump the flash contents in case of errors, not only when debugging is enabled. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers/mtd/ubi/io.c')
-rw-r--r--drivers/mtd/ubi/io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c
index 507e0c6113c3..9658ac80890c 100644
--- a/drivers/mtd/ubi/io.c
+++ b/drivers/mtd/ubi/io.c
@@ -294,7 +294,7 @@ int ubi_io_write(struct ubi_device *ubi, const void *buf, int pnum, int offset,
ubi_err("error %d while writing %d bytes to PEB %d:%d, written "
"%zd bytes", err, len, pnum, offset, written);
dump_stack();
- ubi_dbg_dump_flash(ubi, pnum, offset, len);
+ ubi_dump_flash(ubi, pnum, offset, len);
} else
ubi_assert(written == len);
@@ -563,7 +563,7 @@ static int nor_erase_prepare(struct ubi_device *ubi, int pnum)
*/
ubi_err("cannot invalidate PEB %d, write returned %d read returned %d",
pnum, err, err1);
- ubi_dbg_dump_flash(ubi, pnum, 0, ubi->peb_size);
+ ubi_dump_flash(ubi, pnum, 0, ubi->peb_size);
return -EIO;
}