summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2016-04-17 22:53:02 +0200
committerBoris Brezillon <boris.brezillon@free-electrons.com>2016-05-05 23:52:04 +0200
commite9d4faed71d5a63fa0ef8fcfef559f67f8b85a22 (patch)
treeded5aa0ec6a4cf725aa928a0d1197c52cc9901a0 /drivers/mtd/nand
parentcc71538fab2f5470775b060c59eddafe8ffa2674 (diff)
downloadlinux-e9d4faed71d5a63fa0ef8fcfef559f67f8b85a22.tar.bz2
mtd: nand: set ECC algorithm to Hamming on fallback
This is part of process deprecating NAND_ECC_SOFT_BCH (and switching to enum nand_ecc_algo). Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r--drivers/mtd/nand/nand_base.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 9f157bb3faa2..2a049576ab31 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -4337,6 +4337,7 @@ int nand_scan_tail(struct mtd_info *mtd)
pr_warn("%d byte HW ECC not possible on %d byte page size, fallback to SW ECC\n",
ecc->size, mtd->writesize);
ecc->mode = NAND_ECC_SOFT;
+ ecc->algo = NAND_ECC_HAMMING;
case NAND_ECC_SOFT:
ecc->calculate = nand_calculate_ecc;