All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: rawnand: atmel: Update ecc_stats.corrected counter
@ 2021-03-22 15:07 ` Tudor Ambarus
  0 siblings, 0 replies; 6+ messages in thread
From: Tudor Ambarus @ 2021-03-22 15:07 UTC (permalink / raw)
  To: miquel.raynal, richard, vigneshr
  Cc: nicolas.ferre, alexandre.belloni, ludovic.desroches, bbrezillon,
	linux-mtd, linux-arm-kernel, linux-kernel,
	Kai Stuhlemmer (ebee Engineering),
	stable, Tudor Ambarus

From: "Kai Stuhlemmer (ebee Engineering)" <kai.stuhlemmer@ebee.de>

Update MTD ECC statistics with the number of corrected bits.

Fixes: f88fc122cc34 ("mtd: nand: Cleanup/rework the atmel_nand driver")
Cc: stable@vger.kernel.org
Signed-off-by: Kai Stuhlemmer (ebee Engineering) <kai.stuhlemmer@ebee.de>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
---
 drivers/mtd/nand/raw/atmel/nand-controller.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/raw/atmel/nand-controller.c b/drivers/mtd/nand/raw/atmel/nand-controller.c
index e6ceec8f50dc..8aab1017b460 100644
--- 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(struct nand_chip *chip, void *buf,
 							  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;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] mtd: rawnand: atmel: Update ecc_stats.corrected counter
@ 2021-03-22 15:07 ` Tudor Ambarus
  0 siblings, 0 replies; 6+ messages in thread
From: Tudor Ambarus @ 2021-03-22 15:07 UTC (permalink / raw)
  To: miquel.raynal, richard, vigneshr
  Cc: nicolas.ferre, alexandre.belloni, ludovic.desroches, bbrezillon,
	linux-mtd, linux-arm-kernel, linux-kernel,
	Kai Stuhlemmer (ebee Engineering),
	stable, Tudor Ambarus

From: "Kai Stuhlemmer (ebee Engineering)" <kai.stuhlemmer@ebee.de>

Update MTD ECC statistics with the number of corrected bits.

Fixes: f88fc122cc34 ("mtd: nand: Cleanup/rework the atmel_nand driver")
Cc: stable@vger.kernel.org
Signed-off-by: Kai Stuhlemmer (ebee Engineering) <kai.stuhlemmer@ebee.de>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
---
 drivers/mtd/nand/raw/atmel/nand-controller.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/raw/atmel/nand-controller.c b/drivers/mtd/nand/raw/atmel/nand-controller.c
index e6ceec8f50dc..8aab1017b460 100644
--- 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(struct nand_chip *chip, void *buf,
 							  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;
-- 
2.25.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] mtd: rawnand: atmel: Update ecc_stats.corrected counter
@ 2021-03-22 15:07 ` Tudor Ambarus
  0 siblings, 0 replies; 6+ messages in thread
From: Tudor Ambarus @ 2021-03-22 15:07 UTC (permalink / raw)
  To: miquel.raynal, richard, vigneshr
  Cc: alexandre.belloni, Kai Stuhlemmer (ebee Engineering),
	bbrezillon, Tudor Ambarus, stable, linux-kernel,
	ludovic.desroches, linux-mtd, linux-arm-kernel

From: "Kai Stuhlemmer (ebee Engineering)" <kai.stuhlemmer@ebee.de>

Update MTD ECC statistics with the number of corrected bits.

Fixes: f88fc122cc34 ("mtd: nand: Cleanup/rework the atmel_nand driver")
Cc: stable@vger.kernel.org
Signed-off-by: Kai Stuhlemmer (ebee Engineering) <kai.stuhlemmer@ebee.de>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
---
 drivers/mtd/nand/raw/atmel/nand-controller.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/raw/atmel/nand-controller.c b/drivers/mtd/nand/raw/atmel/nand-controller.c
index e6ceec8f50dc..8aab1017b460 100644
--- 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(struct nand_chip *chip, void *buf,
 							  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;
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] mtd: rawnand: atmel: Update ecc_stats.corrected counter
  2021-03-22 15:07 ` Tudor Ambarus
  (?)
@ 2021-03-28 17:14   ` Miquel Raynal
  -1 siblings, 0 replies; 6+ messages in thread
From: Miquel Raynal @ 2021-03-28 17:14 UTC (permalink / raw)
  To: Tudor Ambarus, miquel.raynal, richard, vigneshr
  Cc: nicolas.ferre, alexandre.belloni, ludovic.desroches, bbrezillon,
	linux-mtd, linux-arm-kernel, linux-kernel,
	Kai Stuhlemmer (ebee Engineering),
	stable

On Mon, 2021-03-22 at 15:07:14 UTC, Tudor Ambarus wrote:
> From: "Kai Stuhlemmer (ebee Engineering)" <kai.stuhlemmer@ebee.de>
> 
> Update MTD ECC statistics with the number of corrected bits.
> 
> Fixes: f88fc122cc34 ("mtd: nand: Cleanup/rework the atmel_nand driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: Kai Stuhlemmer (ebee Engineering) <kai.stuhlemmer@ebee.de>
> Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Miquel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mtd: rawnand: atmel: Update ecc_stats.corrected counter
@ 2021-03-28 17:14   ` Miquel Raynal
  0 siblings, 0 replies; 6+ messages in thread
From: Miquel Raynal @ 2021-03-28 17:14 UTC (permalink / raw)
  To: Tudor Ambarus, miquel.raynal, richard, vigneshr
  Cc: nicolas.ferre, alexandre.belloni, ludovic.desroches, bbrezillon,
	linux-mtd, linux-arm-kernel, linux-kernel,
	Kai Stuhlemmer (ebee Engineering),
	stable

On Mon, 2021-03-22 at 15:07:14 UTC, Tudor Ambarus wrote:
> From: "Kai Stuhlemmer (ebee Engineering)" <kai.stuhlemmer@ebee.de>
> 
> Update MTD ECC statistics with the number of corrected bits.
> 
> Fixes: f88fc122cc34 ("mtd: nand: Cleanup/rework the atmel_nand driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: Kai Stuhlemmer (ebee Engineering) <kai.stuhlemmer@ebee.de>
> Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Miquel

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mtd: rawnand: atmel: Update ecc_stats.corrected counter
@ 2021-03-28 17:14   ` Miquel Raynal
  0 siblings, 0 replies; 6+ messages in thread
From: Miquel Raynal @ 2021-03-28 17:14 UTC (permalink / raw)
  To: Tudor Ambarus, miquel.raynal, richard, vigneshr
  Cc: alexandre.belloni, Kai Stuhlemmer (ebee Engineering),
	bbrezillon, stable, linux-kernel, ludovic.desroches, linux-mtd,
	linux-arm-kernel

On Mon, 2021-03-22 at 15:07:14 UTC, Tudor Ambarus wrote:
> From: "Kai Stuhlemmer (ebee Engineering)" <kai.stuhlemmer@ebee.de>
> 
> Update MTD ECC statistics with the number of corrected bits.
> 
> Fixes: f88fc122cc34 ("mtd: nand: Cleanup/rework the atmel_nand driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: Kai Stuhlemmer (ebee Engineering) <kai.stuhlemmer@ebee.de>
> Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Miquel

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-03-29 17:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-22 15:07 [PATCH] mtd: rawnand: atmel: Update ecc_stats.corrected counter Tudor Ambarus
2021-03-22 15:07 ` Tudor Ambarus
2021-03-22 15:07 ` Tudor Ambarus
2021-03-28 17:14 ` Miquel Raynal
2021-03-28 17:14   ` Miquel Raynal
2021-03-28 17:14   ` Miquel Raynal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.