Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp775843imu; Tue, 20 Nov 2018 06:50:18 -0800 (PST) X-Google-Smtp-Source: AFSGD/WDdxw7jtl5WvIEiFsaHGOS7LYGIRA/bEoNIHlXfwFSB/85J4zMnVdfUC9AErOZoW+X/hf1 X-Received: by 2002:a65:534b:: with SMTP id w11mr2168270pgr.125.1542725418919; Tue, 20 Nov 2018 06:50:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542725418; cv=none; d=google.com; s=arc-20160816; b=DkHgKljkOG7CEPVrBocC1LE6G2x55IGc+25l3zqxMD+85/X8SDvZgSP3zqjQA5Vj69 9xbswYq4e+j9+IZh16lI1HPHRdCgywZaN0PLIbuquGTbFJuI18cN8XRf3S1Msj4jiARx e8LE8vzOAmM+l6iacQCjU8oLYxZnxGllHu/qKUjLdDA4Odgy/IOP2VaLnOhaySXwKmaF Oljyre9WnVFMZR08OOZNmBJ382U35VgKCCH1sdLyfiX0eFLjyKTtiowB3QZvlcC7oeMM 2rxd+Ls72IMvmJnomBQsaYRoRjbQWLWQJXU9ehuTvBIZPAtmc0UvYEAJdlEry5L8F2lD dKIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=+VhWU+ElFPhKW3D3OwPTPIS1fPwqKmq0uErgeiq5y+I=; b=B/jdQjKrDHseXciHmy+kk7DD/t28EZ5kiJiA2s+HCSaprm6UBjurB5i1+W8aQD6shW xLAiMz0+BYudwFj+sDbprgKrdKdgZv75B8IQipAlohEdlSVedcDBOYToShRsVBiZx+N0 qMpNiJ8ZFSZU7j0LaqUcA8Nhy4bhMHip0S+oixftQoCiUHCSjWD7pqRxsjFnAAbEVN5c fRr77ckdcaoZ4zo5UNUD7dsEZ5/R90NQx1SQB4r/a4bKyygPGaNjZdHCyVPFuuuvMVGA ggC2To2objWhNqbYLvtd38Vtrqdg2Zeefo4cpMSqWrMm3v6a3UcTtwwOyTac5GsvloYm DRMg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b6si22449489pls.367.2018.11.20.06.50.04; Tue, 20 Nov 2018 06:50:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728918AbeKTVba (ORCPT + 99 others); Tue, 20 Nov 2018 16:31:30 -0500 Received: from mail.bootlin.com ([62.4.15.54]:53094 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725989AbeKTVba (ORCPT ); Tue, 20 Nov 2018 16:31:30 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id C69A120D72; Tue, 20 Nov 2018 12:02:54 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.2 Received: from bbrezillon (aaubervilliers-681-1-13-146.w90-88.abo.wanadoo.fr [90.88.134.146]) by mail.bootlin.com (Postfix) with ESMTPSA id 72F67207B0; Tue, 20 Nov 2018 12:02:44 +0100 (CET) Date: Tue, 20 Nov 2018 12:02:44 +0100 From: Boris Brezillon To: Naga Sureshkumar Relli Cc: "miquel.raynal@bootlin.com" , "richard@nod.at" , "dwmw2@infradead.org" , "computersforpeace@gmail.com" , "marek.vasut@gmail.com" , "linux-mtd@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "nagasuresh12@gmail.com" , "robh@kernel.org" , Michal Simek Subject: Re: [LINUX PATCH v12 3/3] mtd: rawnand: arasan: Add support for Arasan NAND Flash Controller Message-ID: <20181120120244.7d2442b5@bbrezillon> In-Reply-To: References: <1541739641-17789-1-git-send-email-naga.sureshkumar.relli@xilinx.com> <1541739641-17789-4-git-send-email-naga.sureshkumar.relli@xilinx.com> <20181118204324.373ca9cc@bbrezillon> <20181119090246.49060019@bbrezillon> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 20 Nov 2018 07:02:08 +0000 Naga Sureshkumar Relli wrote: > > > > Can you please run nandbiterrs (availaible in mtd-utils). I fear your > > device won't pass the test. > Yes, nandbiterror test is passing till 24bit, after that it is failing. Can you paste the output of nandbiterrs please? > > > > > But we are hitting this because of erased page reading(needed in case of ubifs). > > > > > > > > > > > Don't you have a bit (or several bits) reporting when the ECC engine was not able to > > correct > > > > data? I you do, you should base the "detect bitflips in erase pages" logic on this information. > > > Bit reporting for several bit errors is there only for Hamming(1bit correction and 2bit > > detection) but not in BCH. > > > > > > > Then I tend to agree with Miquel: your ECC engine is broken, and I'm > > not even sure how to deal with that yet. > So as per the Miquel's suggestion, can I proceed to add the below one? > "you should re-read the page in raw mode and check for the number of bitflips manually (thanks to the helpers in the core). Again, if the number of BF is above 16, we can assume the page is bad and increment ->ecc.failed accordingly." But that's just partially fixing the problem. And you didn't answer my previous question: what happens when you configure the ECC engine in, say 12bit/1024 and you end up with uncorrectable errors (more than 12 bitflips in a 1k block). What's the number reported ECC_ERR_CNT? Is it set to 13?