diff options
Diffstat (limited to 'drivers/mtd/ubi/build.c')
-rw-r--r-- | drivers/mtd/ubi/build.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c index 1405b556c65a..d3da66682667 100644 --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c | |||
@@ -633,6 +633,15 @@ static int io_init(struct ubi_device *ubi) | |||
633 | } | 633 | } |
634 | 634 | ||
635 | /* | 635 | /* |
636 | * Set maximum amount of physical erroneous eraseblocks to be 10%. | ||
637 | * Erroneous PEB are those which have read errors. | ||
638 | */ | ||
639 | ubi->max_erroneous = ubi->peb_count / 10; | ||
640 | if (ubi->max_erroneous < 16) | ||
641 | ubi->max_erroneous = 16; | ||
642 | dbg_msg("max_erroneous %d", ubi->max_erroneous); | ||
643 | |||
644 | /* | ||
636 | * It may happen that EC and VID headers are situated in one minimal | 645 | * It may happen that EC and VID headers are situated in one minimal |
637 | * I/O unit. In this case we can only accept this UBI image in | 646 | * I/O unit. In this case we can only accept this UBI image in |
638 | * read-only mode. | 647 | * read-only mode. |