UBI: add more prints
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Sun, 22 Jul 2007 19:32:51 +0000 (22:32 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Sun, 14 Oct 2007 10:10:20 +0000 (13:10 +0300)
I hit those situations and found out lack of print messages. Add more prints
when erase problems occur.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
drivers/mtd/ubi/io.c
drivers/mtd/ubi/wl.c

index b0d8f4c..d42ec68 100644 (file)
@@ -430,13 +430,16 @@ static int torture_peb(const struct ubi_device *ubi, int pnum)
        err = patt_count;
 
 out:
-       if (err == UBI_IO_BITFLIPS || err == -EBADMSG)
+       if (err == UBI_IO_BITFLIPS || err == -EBADMSG) {
                /*
                 * If a bit-flip or data integrity error was detected, the test
                 * has not passed because it happened on a freshly erased
                 * physical eraseblock which means something is wrong with it.
                 */
+               ubi_err("read problems on freshly erased PEB %d, must be bad",
+                       pnum);
                err = -EIO;
+       }
        vfree(buf);
        return err;
 }
index a5a9b8d..12b25e5 100644 (file)
@@ -1093,6 +1093,7 @@ static int erase_worker(struct ubi_device *ubi, struct ubi_work *wl_wrk,
                return err;
        }
 
+       ubi_err("failed to erase PEB %d, error %d", pnum, err);
        kfree(wl_wrk);
        kmem_cache_free(wl_entries_slab, e);