mtd: nand: set ECC algorithm to Hamming on fallback

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Mon May 23 21:59:24 PDT 2016


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=e9d4faed71d5a63fa0ef8fcfef559f67f8b85a22
Commit:     e9d4faed71d5a63fa0ef8fcfef559f67f8b85a22
Parent:     cc71538fab2f5470775b060c59eddafe8ffa2674
Author:     Rafał Miłecki <zajec5 at gmail.com>
AuthorDate: Sun Apr 17 22:53:02 2016 +0200
Committer:  Boris Brezillon <boris.brezillon at free-electrons.com>
CommitDate: Thu May 5 23:52:04 2016 +0200

    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 at gmail.com>
    Signed-off-by: Boris Brezillon <boris.brezillon at free-electrons.com>
---
 drivers/mtd/nand/nand_base.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 9f157bb..2a04957 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;



More information about the linux-mtd-cvs mailing list