diff options
Diffstat (limited to 'drivers/mtd/ubi')
-rw-r--r-- | drivers/mtd/ubi/vtbl.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c index 3c4d68f2cfd4..42a7815086b7 100644 --- a/drivers/mtd/ubi/vtbl.c +++ b/drivers/mtd/ubi/vtbl.c | |||
@@ -385,7 +385,16 @@ static struct ubi_vtbl_record *process_lvol(struct ubi_device *ubi, | |||
385 | err = ubi_io_read_data(ubi, leb[seb->lnum], seb->pnum, 0, | 385 | err = ubi_io_read_data(ubi, leb[seb->lnum], seb->pnum, 0, |
386 | ubi->vtbl_size); | 386 | ubi->vtbl_size); |
387 | if (err == UBI_IO_BITFLIPS || err == -EBADMSG) | 387 | if (err == UBI_IO_BITFLIPS || err == -EBADMSG) |
388 | /* Scrub the PEB later */ | 388 | /* |
389 | * Scrub the PEB later. Note, -EBADMSG indicates an | ||
390 | * uncorrectable ECC error, but we have our own CRC and | ||
391 | * the data will be checked later. If the data is OK, | ||
392 | * the PEB will be scrubbed (because we set | ||
393 | * seb->scrub). If the data is not OK, the contents of | ||
394 | * the PEB will be recovered from the second copy, and | ||
395 | * seb->scrub will be cleared in | ||
396 | * 'ubi_scan_add_used()'. | ||
397 | */ | ||
389 | seb->scrub = 1; | 398 | seb->scrub = 1; |
390 | else if (err) | 399 | else if (err) |
391 | goto out_free; | 400 | goto out_free; |