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: 811672 X-Patchwork-Delegate: boris.brezillon@free-electrons.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LQiNaZ/1"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="P02uprjG"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xphf00rQZz9s7f for ; Sat, 9 Sep 2017 01:52:08 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=B14KBsFptgoCrFKlgdF3/XtK8oPediLw1bhtTQ5qHD4=; b=LQiNaZ/1pqKJAwut1rJ/wbkCtK Q5XSGdy2OQZ6DGEM4PIlHWDo4GF4eqXSHj1y5RKxAfdBxoJD/U2x4DysA6HMtuBJzY/CQeFCOliVH 1PHrNMIRxlIciVZ+6fz1CoGmqaMGCHiRRHRv0j+A6S73XxcHNtg4KGJXh8sWtwWjxzuMHjE6q3mfD vM4rHnU9/Sw9mhEEjt6aJABsILu6cUSCZi/7LCYOB6UbHlX9ide8oiQp+Ek6TXfqkw1BRl2JUEVEt Op22x0gkNnESHG51ZXIomfIqEsn92hwQEvJ/Ft8zOKM5yKXQABg2jFSay0vtk0HGHoI8hBwYY59I3 IsSsYkWQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dqLZW-0000pq-LS; Fri, 08 Sep 2017 15:51:58 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dqLKl-00067h-Lk; Fri, 08 Sep 2017 15:36:49 +0000 Received: by mail-wm0-x244.google.com with SMTP id e64so1985651wmi.2; Fri, 08 Sep 2017 08:36:23 -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=OxY3CU6IuiFevdXZM5nHTZu+qrzEC9fwDBRCcopcnNYt/DC1QtJyz7gTj2GWGx8Jp4 QXLZ2vZcWn38FQczQL9o/+fdArIEsCvBWA0FadQJd55wtJe/IEc+AlxXOff6M0VDnFqB zSnRE1aFyr8MGRqjkfq/MuK9sRiQh1v1lIGGcTUv1+xateaxuXmzdaihv/UXl2lBgElc z98uZNAPGvBWHP+x079UUUpLYxcMeZQKNenLNLvpseNb6pF4YLuEixFLRxkCT/LRC4DT wFj+CaNN6gA4kDmM8h9DebTVxs99Uhm/hypD/BHuK+Q7WEUhpKNNs+riOARrJ6ps6kho VC4Q== X-Gm-Message-State: AHPjjUjFF5Y75bcKUiJGzrgAIv3cnfInILKGugPHaiT87BwjqXB2BOBL xFnuLAiRtdvoZ23DxwI= 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170908_083644_235974_EF640657 X-CRM114-Status: GOOD ( 10.18 ) X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a00:1450:400c:c09:0:0:0:244 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (romain.izard.pro[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pwm@vger.kernel.org, linux-iio@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, linux-serial@vger.kernel.org, Romain Izard , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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;