From patchwork Fri Sep 8 15:35:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Izard X-Patchwork-Id: 9944559 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 846766035D for ; Fri, 8 Sep 2017 15:38:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 74D46287F5 for ; Fri, 8 Sep 2017 15:38:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 698F3287FA; Fri, 8 Sep 2017 15:38:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 15446287F5 for ; Fri, 8 Sep 2017 15:38:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932691AbdIHPii (ORCPT ); Fri, 8 Sep 2017 11:38:38 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:32879 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932354AbdIHPgX (ORCPT ); Fri, 8 Sep 2017 11:36:23 -0400 Received: by mail-wm0-f65.google.com with SMTP id 187so1997765wmn.0; Fri, 08 Sep 2017 08:36:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=aaNnsNahYIjh+1Ks16UeHfn5wML1ytVR6uApSlam0ak=; b=P02uprjGGualMUPxI36GJhMM39AqQfDqCX1oWwcrmnrnYNmjaloAOSgZ9LlHq7Fkz/ Jp4YUtYpo8dhnG/PfSXn35InrHc17S5yRXHcHSQlxuCpl3uIxnKZ8ngozXXYcn6zoEAh kBIw2mhk3khGTsO1Bbpo3GU1UzSBZc1Lg6ZlalVau29gPjphnW1AALuNHrBfmpHq+jg3 Dlw+AhJ0bpZQsdDqc1vKTBw/XsqHCOELUJrVhhixVH+cJreMPDGb2FQTgun0G9D4YV9c 8jiXqhbNqwyKnbpdiwF4A77ioGA03FAkPsC+dG0R3qv9qEfDhGW1OR7/+NQTYX0iuZ3H 8isw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=aaNnsNahYIjh+1Ks16UeHfn5wML1ytVR6uApSlam0ak=; b=jxbsIpWNBfPl5fvOg5Mycfp9Re2yDT4bjZQfyQQUTgJl9+xsT4TNsQtGg9ljXxrFwb JsEcuVJJQIWlBi9+wRpk+KasMIc+Qrh9IVmN/ZEU/OLBzd6BIuX+8q4zMu+ULz1SyxmV qyHf1QUP5OLY+4EsRHodgVU5zgUkUfT0QoImh9yX2CKiEGlsYk1U8W1x9nue+MOeEO4h XII5dpvCCTDCmSxq37rYN7TxcCSf1Ed98TYsasUEXjYI5xXf8vI52SrMGqX3tlmri32v 66Hd+HuOfzKMX4d8VNNIxZ/xKbprFkQKSv/TQVZojqtS47zO0nLDyNmenCk3gdym5GT7 bbHQ== X-Gm-Message-State: AHPjjUjFJ2EF1UKUQpdvpFZMsQgxHjjtpZIRiLpXQ8S4dPZcxzxWXmlj ZATVaS0CfZvmUQ== X-Google-Smtp-Source: AOwi7QAPmTBwCM2ylwBS1zB/di7sfuTkXBL3yv9TVmHEUUtM7a0C/wcHzMOvnLgQB8Nsst69REa9ag== X-Received: by 10.28.70.130 with SMTP id t124mr1935806wma.145.1504884981816; Fri, 08 Sep 2017 08:36:21 -0700 (PDT) Received: from localhost.localdomain (146.187.3.109.rev.sfr.net. [109.3.187.146]) by smtp.gmail.com with ESMTPSA id p199sm1689224wmb.28.2017.09.08.08.36.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Sep 2017 08:36:21 -0700 (PDT) From: Romain Izard To: Nicolas Ferre , Boris Brezillon , Michael Turquette , Stephen Boyd , Ludovic Desroches , Jonathan Cameron , 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-iio@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 v1 05/10] mtd: nand: atmel: Report PMECC failures as errors Date: Fri, 8 Sep 2017 17:35:59 +0200 Message-Id: <20170908153604.28383-6-romain.izard.pro@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170908153604.28383-1-romain.izard.pro@gmail.com> References: <20170908153604.28383-1-romain.izard.pro@gmail.com> Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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;