aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/scan.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-07-19 07:03:16 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-08-14 13:01:35 -0400
commit29a88c99d29834fb3314e0144900b187ede83106 (patch)
tree7987ce7659e291420824c93e04cebf3c6a2ad7c4 /drivers/mtd/ubi/scan.c
parent64f1607ffbbc772685733ea63e6f7f4183df1b16 (diff)
UBI: print a message if ECH is corrupted and VIDH is ok
If the EC header is corrupted, but the VID header is OK, UBI accepts the PEB and treats it as "used". However, generally this should not happen. Print a warning if this happens. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi/scan.c')
-rw-r--r--drivers/mtd/ubi/scan.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c
index b847745394b4..93361eadab8d 100644
--- a/drivers/mtd/ubi/scan.c
+++ b/drivers/mtd/ubi/scan.c
@@ -864,7 +864,9 @@ static int process_eb(struct ubi_device *ubi, struct ubi_scan_info *si,
864 } 864 }
865 } 865 }
866 866
867 /* Both UBI headers seem to be fine */ 867 if (ec_corr)
868 ubi_warn("valid VID header but corrupted EC header at PEB %d",
869 pnum);
868 err = ubi_scan_add_used(ubi, si, pnum, ec, vidh, bitflips); 870 err = ubi_scan_add_used(ubi, si, pnum, ec, vidh, bitflips);
869 if (err) 871 if (err)
870 return err; 872 return err;