FAILED: patch "[PATCH] mtd: rawnand: davinci: Don't calculate ECC when reading page" failed to apply to 5.4-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 5.4-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 71e89591502d737c10db2bd4d8fcfaa352552afb Mon Sep 17 00:00:00 2001
From: Paul Cercueil <[email protected]>
Date: Sat, 16 Oct 2021 14:22:24 +0100
Subject: [PATCH] mtd: rawnand: davinci: Don't calculate ECC when reading page
The function nand_davinci_read_page_hwecc_oob_first() does read the ECC data from the OOB area. Therefore it does not need to calculate the ECC as it is already available.
Cc <[email protected]> # v5.2
Fixes a0ac778eb82c ("mtd: rawnand: ingenic: Add support for the JZ4740")
Signed-off-by Paul Cercueil <[email protected]>
Signed-off-by Miquel Raynal <[email protected]>
drivers/mtd/nand/raw/davinci_nand.c +0 -3
@@ -394,7 +394,6 @@ static int nand_davinci_read_page_hwecc_oob_first(struct nand_chip *chip,int eccsteps = chip->ecc.steps;uint8_t *p = buf;uint8_t *ecc_code = chip->ecc.code_buf; -uint8_t *ecc_calc = chip->ecc.calc_buf;unsigned int max_bitflips =0 ;/* Read the OOB area first */
@@ -420,8 +419,6 @@ static int nand_davinci_read_page_hwecc_oob_first(struct nand_chip *chip,if (ret)return ret; - chip->ecc.calculate (chip, p, &ecc_calc[i]); - stat = chip->ecc.correct (chip, p, &ecc_code[i],NULL );if (stat == -EBADMSG && (chip->ecc.options &NAND_ECC_GENERIC_ERASED_CHECK )) {