diff options
author | Richard Weinberger <richard@nod.at> | 2016-05-27 09:44:36 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-05-27 12:30:27 +0200 |
commit | 787b429414e46e1d2cea610963539762dd1e1a81 (patch) | |
tree | eb7fdfbbc1e1e0c532c22f8397862aff9ac3d8fa | |
parent | 0aaf425c29549b1c651723be57957a6db1edbc9d (diff) | |
download | barebox-787b429414e46e1d2cea610963539762dd1e1a81.tar.gz barebox-787b429414e46e1d2cea610963539762dd1e1a81.tar.xz |
UBI: Fastmap: Fall back to scanning mode after ECC error
If we encounter an uncorrectable ECC error while scanning for the fastmap
UBI must not fail hard. Instead fall back to scanning mode.
Reported-by: Alexander Block <Alexander.Block@continental-corporation.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Conflicts:
drivers/mtd/ubi/attach.c
Fixed minor conflict.
Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | drivers/mtd/ubi/attach.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/attach.c b/drivers/mtd/ubi/attach.c index dc14a2b23a..b49842be39 100644 --- a/drivers/mtd/ubi/attach.c +++ b/drivers/mtd/ubi/attach.c @@ -1390,7 +1390,7 @@ int ubi_attach(struct ubi_device *ubi, int force_scan) err = scan_all(ubi, ai, 0); else { err = scan_fast(ubi, ai); - if (err > 0) { + if (err > 0 || mtd_is_eccerr(err)) { if (err != UBI_NO_FASTMAP) { destroy_ai(ai); ai = alloc_ai("ubi_aeb_slab_cache2"); |