* mtd: nand: mxc: change debug messages
@ 2017-10-16 9:51 Sascha Hauer
2017-10-16 9:51 ` [PATCH 1/2] mtd: nand: mxc: lower ECC failed message priority to debug level Sascha Hauer
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Sascha Hauer @ 2017-10-16 9:51 UTC (permalink / raw)
To: linux-mtd; +Cc: Boris Brezillon, Richard Weinberger, kernel
I often get reports from customers containing useless "UnCorrectable RS-ECC Error"
messages. Lower this message to debug level and while at it, use dev_dbg instead
of pr_debug.
Sascha
----------------------------------------------------------------
Sascha Hauer (2):
mtd: nand: mxc: lower ECC failed message priority to debug level
mtd: nand: mxc: use dev_dbg to print debug messages
drivers/mtd/nand/mxc_nand.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 1/2] mtd: nand: mxc: lower ECC failed message priority to debug level 2017-10-16 9:51 mtd: nand: mxc: change debug messages Sascha Hauer @ 2017-10-16 9:51 ` Sascha Hauer 2017-10-16 10:44 ` Fabio Estevam 2017-10-16 9:51 ` [PATCH 2/2] mtd: nand: mxc: use dev_dbg to print debug messages Sascha Hauer 2017-10-19 18:41 ` mtd: nand: mxc: change " Boris Brezillon 2 siblings, 1 reply; 5+ messages in thread From: Sascha Hauer @ 2017-10-16 9:51 UTC (permalink / raw) To: linux-mtd; +Cc: Boris Brezillon, Richard Weinberger, kernel, Sascha Hauer Having bad ECC is a normal case for NAND, do not spam log with the message. Users like UBI will print a message anyway which is more useful since it contains the PEB number that has bad ECC. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> --- drivers/mtd/nand/mxc_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c index 53e5e0337c3e..bec9ec5bbb8c 100644 --- a/drivers/mtd/nand/mxc_nand.c +++ b/drivers/mtd/nand/mxc_nand.c @@ -634,7 +634,7 @@ static int mxc_nand_correct_data_v2_v3(struct mtd_info *mtd, u_char *dat, do { err = ecc_stat & ecc_bit_mask; if (err > err_limit) { - printk(KERN_WARNING "UnCorrectable RS-ECC Error\n"); + dev_dbg(host->dev, "UnCorrectable RS-ECC Error\n"); return -EBADMSG; } else { ret += err; -- 2.11.0 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] mtd: nand: mxc: lower ECC failed message priority to debug level 2017-10-16 9:51 ` [PATCH 1/2] mtd: nand: mxc: lower ECC failed message priority to debug level Sascha Hauer @ 2017-10-16 10:44 ` Fabio Estevam 0 siblings, 0 replies; 5+ messages in thread From: Fabio Estevam @ 2017-10-16 10:44 UTC (permalink / raw) To: Sascha Hauer Cc: linux-mtd@lists.infradead.org, Boris Brezillon, Sascha Hauer, Richard Weinberger Hi Sascha, On Mon, Oct 16, 2017 at 7:51 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote: > Having bad ECC is a normal case for NAND, do not spam log with the > message. Users like UBI will print a message anyway which is more > useful since it contains the PEB number that has bad ECC. > > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Yes, I also get this spammed log on a mx25pdk: Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] mtd: nand: mxc: use dev_dbg to print debug messages 2017-10-16 9:51 mtd: nand: mxc: change debug messages Sascha Hauer 2017-10-16 9:51 ` [PATCH 1/2] mtd: nand: mxc: lower ECC failed message priority to debug level Sascha Hauer @ 2017-10-16 9:51 ` Sascha Hauer 2017-10-19 18:41 ` mtd: nand: mxc: change " Boris Brezillon 2 siblings, 0 replies; 5+ messages in thread From: Sascha Hauer @ 2017-10-16 9:51 UTC (permalink / raw) To: linux-mtd; +Cc: Boris Brezillon, Richard Weinberger, kernel, Sascha Hauer When a struct device * is around use dev_dbg instead of pr_debug to give the messages more context. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> --- drivers/mtd/nand/mxc_nand.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c index bec9ec5bbb8c..ecef5c2a0e56 100644 --- a/drivers/mtd/nand/mxc_nand.c +++ b/drivers/mtd/nand/mxc_nand.c @@ -415,7 +415,7 @@ static void send_cmd_v3(struct mxc_nand_host *host, uint16_t cmd, int useirq) * waits for completion. */ static void send_cmd_v1_v2(struct mxc_nand_host *host, uint16_t cmd, int useirq) { - pr_debug("send_cmd(host, 0x%x, %d)\n", cmd, useirq); + dev_dbg(host->dev, "send_cmd(host, 0x%x, %d)\n", cmd, useirq); writew(cmd, NFC_V1_V2_FLASH_CMD); writew(NFC_CMD, NFC_V1_V2_CONFIG2); @@ -431,7 +431,7 @@ static void send_cmd_v1_v2(struct mxc_nand_host *host, uint16_t cmd, int useirq) udelay(1); } if (max_retries < 0) - pr_debug("%s: RESET failed\n", __func__); + dev_dbg(host->dev, "%s: RESET failed\n", __func__); } else { /* Wait for operation to complete */ wait_op_done(host, useirq); @@ -454,7 +454,7 @@ static void send_addr_v3(struct mxc_nand_host *host, uint16_t addr, int islast) * a NAND command. */ static void send_addr_v1_v2(struct mxc_nand_host *host, uint16_t addr, int islast) { - pr_debug("send_addr(host, 0x%x %d)\n", addr, islast); + dev_dbg(host->dev, "send_addr(host, 0x%x %d)\n", addr, islast); writew(addr, NFC_V1_V2_FLASH_ADDR); writew(NFC_ADDR, NFC_V1_V2_CONFIG2); @@ -607,7 +607,7 @@ static int mxc_nand_correct_data_v1(struct mtd_info *mtd, u_char *dat, uint16_t ecc_status = get_ecc_status_v1(host); if (((ecc_status & 0x3) == 2) || ((ecc_status >> 2) == 2)) { - pr_debug("MXC_NAND: HWECC uncorrectable 2-bit ECC error\n"); + dev_dbg(host->dev, "HWECC uncorrectable 2-bit ECC error\n"); return -EBADMSG; } @@ -642,7 +642,7 @@ static int mxc_nand_correct_data_v2_v3(struct mtd_info *mtd, u_char *dat, ecc_stat >>= 4; } while (--no_subpages); - pr_debug("%d Symbol Correctable RS-ECC Error\n", ret); + dev_dbg(host->dev, "%d Symbol Correctable RS-ECC Error\n", ret); return ret; } @@ -673,7 +673,7 @@ static u_char mxc_nand_read_byte(struct mtd_info *mtd) host->buf_start++; } - pr_debug("%s: ret=0x%hhx (start=%u)\n", __func__, ret, host->buf_start); + dev_dbg(host->dev, "%s: ret=0x%hhx (start=%u)\n", __func__, ret, host->buf_start); return ret; } @@ -1212,7 +1212,7 @@ static void mxc_nand_command(struct mtd_info *mtd, unsigned command, struct nand_chip *nand_chip = mtd_to_nand(mtd); struct mxc_nand_host *host = nand_get_controller_data(nand_chip); - pr_debug("mxc_nand_command (cmd = 0x%x, col = 0x%x, page = 0x%x)\n", + dev_dbg(host->dev, "mxc_nand_command (cmd = 0x%x, col = 0x%x, page = 0x%x)\n", command, column, page_addr); /* Reset command state information */ -- 2.11.0 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: mtd: nand: mxc: change debug messages 2017-10-16 9:51 mtd: nand: mxc: change debug messages Sascha Hauer 2017-10-16 9:51 ` [PATCH 1/2] mtd: nand: mxc: lower ECC failed message priority to debug level Sascha Hauer 2017-10-16 9:51 ` [PATCH 2/2] mtd: nand: mxc: use dev_dbg to print debug messages Sascha Hauer @ 2017-10-19 18:41 ` Boris Brezillon 2 siblings, 0 replies; 5+ messages in thread From: Boris Brezillon @ 2017-10-19 18:41 UTC (permalink / raw) To: Sascha Hauer; +Cc: linux-mtd, Richard Weinberger, kernel On Mon, 16 Oct 2017 11:51:53 +0200 Sascha Hauer <s.hauer@pengutronix.de> wrote: > I often get reports from customers containing useless "UnCorrectable RS-ECC Error" > messages. Lower this message to debug level and while at it, use dev_dbg instead > of pr_debug. > > Sascha > > ---------------------------------------------------------------- > Sascha Hauer (2): > mtd: nand: mxc: lower ECC failed message priority to debug level > mtd: nand: mxc: use dev_dbg to print debug messages Applied both. Thanks, Boris > > drivers/mtd/nand/mxc_nand.c | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-10-19 18:42 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-10-16 9:51 mtd: nand: mxc: change debug messages Sascha Hauer 2017-10-16 9:51 ` [PATCH 1/2] mtd: nand: mxc: lower ECC failed message priority to debug level Sascha Hauer 2017-10-16 10:44 ` Fabio Estevam 2017-10-16 9:51 ` [PATCH 2/2] mtd: nand: mxc: use dev_dbg to print debug messages Sascha Hauer 2017-10-19 18:41 ` mtd: nand: mxc: change " Boris Brezillon
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox