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: 9944575 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 10E346035D for ; Fri, 8 Sep 2017 15:41:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F2C2D287E7 for ; Fri, 8 Sep 2017 15:41:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E7405287F8; Fri, 8 Sep 2017 15:41:11 +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=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 921C5287E7 for ; Fri, 8 Sep 2017 15:41:11 +0000 (UTC) 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=x2Qi8FYD40r9lcJtGFKHa2MIRWnRHt2GfJQvelbEmBc=; b=RW174isjSCCY+LQdNYl2Bk02qN AqWgQYlNntq360KrZzRV0zZ46ILsH4rPv66acvrXhQsKmGb7HoSnTEw9GylQzfEP05NdglTFIF13N kwTLdlCuZv00vVdips8Xr7XM14Z9/q1DJTEjmNoMMVOApT6ZlbqR9Gnd0bwSrfpOmjHBa8qXgrUOl 1xE0UPHj500OP9sok4EsWi7b4SzLgRq9GrHRywPESiG0SsXEbzHSW3f9tB0889sky9ZAldkCi/L/j N16UMVva7oCsxR5nMsGA+tKaYQoCPtz5F+ieaHr/udl1n6yRUnYv+ZeYJ14AkmuT76pnV68ruAu86 O0LgA25A==; 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 1dqLP0-0001r3-VB; Fri, 08 Sep 2017 15:41:07 +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-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: 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-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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;