From ef7088e7f84ba550b276bc4a74f2732ee5618fb8 Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Tue, 24 Apr 2012 07:10:33 +0300 Subject: 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 --- drivers/mtd/ubi/io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/mtd/ubi/io.c') 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; } -- cgit v1.2.3