aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/nand_base.c
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2012-07-17 12:04:20 +0200
committerJoerg Roedel <joerg.roedel@amd.com>2012-07-17 12:04:20 +0200
commit8ce44a2174c3b07950d7a8d44774e23e60518205 (patch)
tree4bf04cdeed59775462d5326d3bcb00c7343b6163 /drivers/mtd/nand/nand_base.c
parentf9a4f063a88297e361fd6676986cf3e39b22de72 (diff)
parent84a1caf1453c3d44050bd22db958af4a7f99315c (diff)
Merge tag 'v3.5-rc7' into arm/tegra
This solves the merge conflicts while creating the next branch. Linux 3.5-rc7 Conflicts: drivers/iommu/tegra-smmu.c
Diffstat (limited to 'drivers/mtd/nand/nand_base.c')
-rw-r--r--drivers/mtd/nand/nand_base.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index d47586cf64ce..a11253a0fcab 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -3501,6 +3501,13 @@ int nand_scan_tail(struct mtd_info *mtd)
/* propagate ecc info to mtd_info */
mtd->ecclayout = chip->ecc.layout;
mtd->ecc_strength = chip->ecc.strength;
+ /*
+ * Initialize bitflip_threshold to its default prior scan_bbt() call.
+ * scan_bbt() might invoke mtd_read(), thus bitflip_threshold must be
+ * properly set.
+ */
+ if (!mtd->bitflip_threshold)
+ mtd->bitflip_threshold = mtd->ecc_strength;
/* Check, if we should skip the bad block table scan */
if (chip->options & NAND_SKIP_BBTSCAN)