Skip to contentSkip to conversation

MTD: OneNAND: fix error print

PATCH In review Artem Bityutskiy 1 participant 2 messages Sep 20, 2007 – Sep 21, 2007 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MTD: OneNAND: fix error print

From: Artem Bityutskiy <[email protected]>
Date: Thu, 20 Sep 2007 19:14:50 +0300
Subject: [PATCH] MTD: OneNAND: fix error print

Do not scare people if a correctable ECC error was detected.

---
 drivers/mtd/onenand/onenand_base.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
drivers/mtd/onenand/onenand_base.c +4 -2
index 0537fac..960863a 100644
@@ -318,12 +318,14 @@ static int onenand_wait(struct mtd_info *mtd, int state)
 	if (interrupt & ONENAND_INT_READ) {
 		int ecc = this->read_word(this->base + ONENAND_REG_ECC_STATUS);
 		if (ecc) {
-			printk(KERN_ERR "onenand_wait: ECC error = 0x%04x\n", ecc);
 			if (ecc & ONENAND_ECC_2BIT_ALL) {
+				printk(KERN_ERR "onenand_wait: ECC error = 0x%04x\n", ecc);
 				mtd->ecc_stats.failed++;
 				return ecc;
-			} else if (ecc & ONENAND_ECC_1BIT_ALL)
+			} else if (ecc & ONENAND_ECC_1BIT_ALL) {
+				printk(KERN_NOTICE "onenand_wait: correctable ECC error = 0x%04x\n", ecc);
 				mtd->ecc_stats.corrected++;
+			}
 		}
 	} else if (state == FL_READING) {
 		printk(KERN_ERR "onenand_wait: read timeout! ctrl=0x%04x intr=0x%04x\n", ctrl, interrupt);
Signature · 6 lines
1.5.0.6


-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)
#1 lore raw
Quoted 7 lines · Artem Bityutskiy

From: Artem Bityutskiy <[email protected]>
Date: Thu, 20 Sep 2007 19:14:50 +0300
Subject: [PATCH] MTD: OneNAND: fix error print

Do not scare people if a correctable ECC error was detected.

This patch is included at "[PATCH try 2] MTD: OneNAND: fix numerous races", please, use that one instead.

Signature · 2 lines
Best regards,
Artem Bityutskiy (Битюцкий Артём)