提交 180a5357 编写于 作者: R Richard Weinberger

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: NAlexander Block <Alexander.Block@continental-corporation.com>
Signed-off-by: NRichard Weinberger <richard@nod.at>
上级 56794c0a
......@@ -1419,7 +1419,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();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册