Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp675046imu; Tue, 20 Nov 2018 05:18:04 -0800 (PST) X-Google-Smtp-Source: AFSGD/WDcfCkj6q0XVsBgI0nfq0anwfqKrCt07qxuLjGWYg/d+ONFtjveBChFETjktvvYxHh937u X-Received: by 2002:a65:6094:: with SMTP id t20mr1829617pgu.285.1542719884641; Tue, 20 Nov 2018 05:18:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542719884; cv=none; d=google.com; s=arc-20160816; b=LnwOLzLpCvAp2aJRnMF917w1YrMEHgsXC9I+9pjdiix6Jb39H3Stmk5Vj37/N+b8/f QqQzPS3sIVmyJBcGoBMEBPHTW8vZgwDOLBATBzyV7aQuHsFssTnlCCT/8sVtUZQgDNWJ Rw+dz94QWwCrQjmd6VifotAc7NRGxrci/SPghJPIJf1rMlvDqrSbs1BeK0tyBz5va530 0dRYWqqY/mFpdQeEJ3L8qE4Hern/IT8ttMyt93zfQJVj2euhj0577sNNOiQYXlDWr6mR QdSEH2JrC5OzJWQsUY7gVffcoocP5jl2jpo+PazDH8/I2yUNpJm3rhvcwj1ifdt0lGPV sBhg== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=E0fkrfaliawKgosywZIr5SNkvahBs/yBVAfm5gih+CI=; b=tpeFPeZ1SGi1HcXPJ5d7vIe9w15JKrd1SC5sTgnLyBhelYnh1olqpr3y7Lh0eBKAue HWWQzLcaKt3uyRINd5IK9QOHfQEQuKos8UMZQQFIHr9ebyLV8DDckWr7+2wcoLj7Dg3O kLARwe8O63XkzmtCgu1TDvzbXLhjDfOzoGy4s6RIWv9RXWzt2058pBKJ62Hq5VxPlRz5 YYceo6Cqzh0tC8SG9LnUD8iBlcrEyzEA3GHnm5YR8Lc3BNAZ+U2k5IdKzOaOSip3g0qQ OdJi1jX2xU95t/2cvjW700Phuv4PYk6lrfW9TOght7jCNGIN63dLkSjATUlaRxBPTT3b WEUg== 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 l24si45000293pgj.171.2018.11.20.05.17.48; Tue, 20 Nov 2018 05:18:04 -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 S1726431AbeKTXFd convert rfc822-to-8bit (ORCPT + 99 others); Tue, 20 Nov 2018 18:05:33 -0500 Received: from mail.bootlin.com ([62.4.15.54]:54990 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725843AbeKTXFd (ORCPT ); Tue, 20 Nov 2018 18:05:33 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id 8D90720D29; Tue, 20 Nov 2018 13:36:35 +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, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.2 Received: from xps13 (aaubervilliers-681-1-13-146.w90-88.abo.wanadoo.fr [90.88.134.146]) by mail.bootlin.com (Postfix) with ESMTPSA id 340672037D; Tue, 20 Nov 2018 13:36:25 +0100 (CET) Date: Tue, 20 Nov 2018 13:36:24 +0100 From: Miquel Raynal To: Boris Brezillon Cc: Naga Sureshkumar Relli , "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: <20181120133624.3fa4742d@xps13> In-Reply-To: <20181120120244.7d2442b5@bbrezillon> 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> <20181120120244.7d2442b5@bbrezillon> Organization: Bootlin 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=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Naga, Boris Brezillon wrote on Tue, 20 Nov 2018 12:02:44 +0100: > 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? Apparently 'nandbiterrs -i 'just crashes the kernel because of a segmentation fault. Please run this test (from the mtd-utils package) and fix this issue. Then we would like to see the output. > > > > > > > > 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? Please dump this register, and eventually what's the value of the Packet_bound_Err_count field ([0:7]) for each iteration of nandbiterrs -i. If there is no way, when the status bit is set, to discriminate if the data is reliable or was not corrected at all, it is gonna be a real issue and I don't think we want to support such engine. Thanks, Miquèl