Commit 86c2072b authored by Mike Dunn's avatar Mike Dunn Committed by David Woodhouse

mtd: ecc_strength is at ecc step granularity

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.htmlSigned-off-by: default avatarMike Dunn <mikedunn@newsguy.com>
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 09cbe581
...@@ -3487,7 +3487,7 @@ int nand_scan_tail(struct mtd_info *mtd) ...@@ -3487,7 +3487,7 @@ int nand_scan_tail(struct mtd_info *mtd)
/* propagate ecc info to mtd_info */ /* propagate ecc info to mtd_info */
mtd->ecclayout = chip->ecc.layout; 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 */ /* Check, if we should skip the bad block table scan */
if (chip->options & NAND_SKIP_BBTSCAN) if (chip->options & NAND_SKIP_BBTSCAN)
......
...@@ -164,7 +164,7 @@ struct mtd_info { ...@@ -164,7 +164,7 @@ struct mtd_info {
/* ECC layout structure pointer - read only! */ /* ECC layout structure pointer - read only! */
struct nand_ecclayout *ecclayout; 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; unsigned int ecc_strength;
/* Data for variable erase regions. If numeraseregions is zero, /* Data for variable erase regions. If numeraseregions is zero,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment