Commit 8d2d4011 authored by Artem Bityutskiy's avatar Artem Bityutskiy

UBI: add more prints

I hit those situations and found out lack of print messages. Add more prints
when erase problems occur.
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
parent 8bc22961
...@@ -430,13 +430,16 @@ static int torture_peb(const struct ubi_device *ubi, int pnum) ...@@ -430,13 +430,16 @@ static int torture_peb(const struct ubi_device *ubi, int pnum)
err = patt_count; err = patt_count;
out: 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 * If a bit-flip or data integrity error was detected, the test
* has not passed because it happened on a freshly erased * has not passed because it happened on a freshly erased
* physical eraseblock which means something is wrong with it. * physical eraseblock which means something is wrong with it.
*/ */
ubi_err("read problems on freshly erased PEB %d, must be bad",
pnum);
err = -EIO; err = -EIO;
}
vfree(buf); vfree(buf);
return err; return err;
} }
......
...@@ -1093,6 +1093,7 @@ static int erase_worker(struct ubi_device *ubi, struct ubi_work *wl_wrk, ...@@ -1093,6 +1093,7 @@ static int erase_worker(struct ubi_device *ubi, struct ubi_work *wl_wrk,
return err; return err;
} }
ubi_err("failed to erase PEB %d, error %d", pnum, err);
kfree(wl_wrk); kfree(wl_wrk);
kmem_cache_free(wl_entries_slab, e); kmem_cache_free(wl_entries_slab, e);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment