This is a note to let you know that I've just added the patch titled mtd: rawnand: atmel: Update ecc_stats.corrected counter to the 5.11-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: mtd-rawnand-atmel-update-ecc_stats.corrected-counter.patch and it can be found in the queue-5.11 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 33cebf701e98dd12b01d39d1c644387b27c1a627 Mon Sep 17 00:00:00 2001 From: "Kai Stuhlemmer (ebee Engineering)" <kai.stuhlemmer@xxxxxxx> Date: Mon, 22 Mar 2021 17:07:14 +0200 Subject: mtd: rawnand: atmel: Update ecc_stats.corrected counter From: Kai Stuhlemmer (ebee Engineering) <kai.stuhlemmer@xxxxxxx> commit 33cebf701e98dd12b01d39d1c644387b27c1a627 upstream. Update MTD ECC statistics with the number of corrected bits. Fixes: f88fc122cc34 ("mtd: nand: Cleanup/rework the atmel_nand driver") Cc: stable@xxxxxxxxxxxxxxx Signed-off-by: Kai Stuhlemmer (ebee Engineering) <kai.stuhlemmer@xxxxxxx> Signed-off-by: Tudor Ambarus <tudor.ambarus@xxxxxxxxxxxxx> Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx> Link: https://lore.kernel.org/linux-mtd/20210322150714.101585-1-tudor.ambarus@xxxxxxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/mtd/nand/raw/atmel/nand-controller.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/drivers/mtd/nand/raw/atmel/nand-controller.c +++ b/drivers/mtd/nand/raw/atmel/nand-controller.c @@ -883,10 +883,12 @@ static int atmel_nand_pmecc_correct_data NULL, 0, chip->ecc.strength); - if (ret >= 0) + if (ret >= 0) { + mtd->ecc_stats.corrected += ret; max_bitflips = max(ret, max_bitflips); - else + } else { mtd->ecc_stats.failed++; + } databuf += chip->ecc.size; eccbuf += chip->ecc.bytes; Patches currently in stable-queue which might be from kai.stuhlemmer@xxxxxxx are queue-5.11/mtd-rawnand-atmel-update-ecc_stats.corrected-counter.patch