Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751698AbdIOOFN (ORCPT ); Fri, 15 Sep 2017 10:05:13 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:38301 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751651AbdIOOFJ (ORCPT ); Fri, 15 Sep 2017 10:05:09 -0400 X-Google-Smtp-Source: AOwi7QBnCD+VHqUcD6q/tJCH+iN6CxlbVr6SP3fS133oqL63dNXiXTxV1nTYTt8BdvqglV3ugcBYFA== From: Romain Izard To: Nicolas Ferre , Alexandre Belloni , Boris Brezillon , Michael Turquette , Stephen Boyd , Ludovic Desroches , Wenyou Yang , Josh Wu , David Woodhouse , Brian Norris , Marek Vasut , Cyrille Pitchen , Thierry Reding , Richard Genoud , Greg Kroah-Hartman , Alan Stern Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, linux-pwm@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Romain Izard Subject: [PATCH v2 5/9] mtd: nand: atmel: Report PMECC failures as errors Date: Fri, 15 Sep 2017 16:04:07 +0200 Message-Id: <20170915140411.31716-6-romain.izard.pro@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170915140411.31716-1-romain.izard.pro@gmail.com> References: <20170915140411.31716-1-romain.izard.pro@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1050 Lines: 32 It is not normal for the PMECC to fail when trying to fix ECC errors. Report these cases as errors. Signed-off-by: Romain Izard --- drivers/mtd/nand/atmel/pmecc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/nand/atmel/pmecc.c b/drivers/mtd/nand/atmel/pmecc.c index 8d1208f38025..2a23f1ff945f 100644 --- a/drivers/mtd/nand/atmel/pmecc.c +++ b/drivers/mtd/nand/atmel/pmecc.c @@ -687,6 +687,8 @@ static int atmel_pmecc_err_location(struct atmel_pmecc_user *user) * Number of roots does not match the degree of smu * unable to correct error. */ + dev_err(pmecc->dev, + "PMECC: Impossible to calculate error location.\n"); return -EBADMSG; } @@ -729,7 +731,7 @@ int atmel_pmecc_correct_sector(struct atmel_pmecc_user *user, int sector, ptr = ecc + byte - sectorsize; area = "ECC"; } else { - dev_dbg(pmecc->dev, + dev_err(pmecc->dev, "Invalid errpos value (%d, max is %d)\n", errpos, (sectorsize + eccbytes) * 8); return -EINVAL; -- 2.11.0