summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/nand_base.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-07-19 11:17:30 -0700
committerDavid S. Miller <davem@davemloft.net>2012-07-19 11:17:30 -0700
commitabaa72d7fd9a20a67b62e6afa0e746e27851dc33 (patch)
treeebe4134fcc93a6e205e6004b3e652d7a62281651 /drivers/mtd/nand/nand_base.c
parent67da22d23fa6f3324e03bcd0580b914b2e4afbf3 (diff)
parent3e4b9459fb0e149c6b74c9e89399a8fc39a92b44 (diff)
downloadop-kernel-dev-abaa72d7fd9a20a67b62e6afa0e746e27851dc33.zip
op-kernel-dev-abaa72d7fd9a20a67b62e6afa0e746e27851dc33.tar.gz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.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 d47586c..a11253a0 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)
OpenPOWER on IntegriCloud