]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
mtd: ecc_strength is at ecc step granularity
authorMike Dunn <mikedunn@newsguy.com>
Wed, 25 Apr 2012 19:06:05 +0000 (12:06 -0700)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 14 May 2012 04:09:58 +0000 (23:09 -0500)
ecc_strength element of mtd_info will be the strength of one ecc step, not of
the entire writesize, as was previously planned.  This is the appropriate way
because, as was pointed out¹, bit errors in excess of the strength of one
step can cause a hard error if they all occur within the same ecc region.

¹ http://lists.infradead.org/pipermail/linux-mtd/2012-March/040313.html

Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/nand/nand_base.c
include/linux/mtd/mtd.h

index 512066e3d14358fe855febe04364b38b3870b1a8..671f228d4c7c15d85f684fa67d6140867b60a7da 100644 (file)
@@ -3487,7 +3487,7 @@ 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 * chip->ecc.steps;
+       mtd->ecc_strength = chip->ecc.strength;
 
        /* Check, if we should skip the bad block table scan */
        if (chip->options & NAND_SKIP_BBTSCAN)
index cf5ea8cdcf8e3a9a325da9a6f28f6fb120ea1319..cd0119d19cd9bce1d6ae43962ed0a0b1e1f3fd41 100644 (file)
@@ -164,7 +164,7 @@ struct mtd_info {
        /* ECC layout structure pointer - read only! */
        struct nand_ecclayout *ecclayout;
 
-       /* max number of correctible bit errors per writesize */
+       /* max number of correctible bit errors per ecc step */
        unsigned int ecc_strength;
 
        /* Data for variable erase regions. If numeraseregions is zero,