Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1925706imu; Sun, 18 Nov 2018 11:45:35 -0800 (PST) X-Google-Smtp-Source: AJdET5cXwKKN5DPGKMzuVtUxD/ToMmnKh8UVSIPe6W9OJmZ2FanJYYp4u+U+SfnOm+Po/WnbcBW0 X-Received: by 2002:a62:cd41:: with SMTP id o62mr5444530pfg.222.1542570335177; Sun, 18 Nov 2018 11:45:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542570335; cv=none; d=google.com; s=arc-20160816; b=hFaWftdURiUmNVozN/B4wo4eHwZ/z2IMCCZ7VFWPE9aIorxkge43jIRVW73O+mrtE+ wXTnPLzuaAVEkZMc3CXnl1DDLG+tMNyhHHiNpRCrFYhXTCZvqM0MQ5GIJPXcRWu5Fcv1 h0YjTFG3oqud9Yrl+lgfapxbTLiqqUmFLcxUWSA/2c7z7EjzUG1mE9I7M0lhA+cM4wrx QuQ/KI3IZg16LjEeukkBJM03juaoDXBUR6hkvri3HZsBWyRyU+AOSvxeqO/qepIRogvQ wXnuVOAbxHYmgF9qNwzPOb8z7d9Tsg4yv9fd8m3jTDB32NMXYvz9/E6CpB3U3KReSIpc vYJA== 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=Tl5dwMFqCPdMcUej/bLUCF5jpOQtW6HxGC1y2zvn+0Q=; b=sHbf0akkND7ZPu/g8UR6U4gk6nQpqeTrPboXbWPRJWQuACZI9ciM7Swr5T+Rq/cf7l YS+xQJQKqkYJ5Sqwvw+H426bD4JkoAfxUq3ssqw+JxaQRUS+ZHIdxevL28AnKD09EYx+ 0294f+jn7U/XOu61HGYW4KiqZUHE0EWDGy6vrn380SCrpJR2sKJXLx5VJgvX7c5ixdfN 1JFD+22xEHmPiJkqGAsuCPnDMfSh/GVp9S2WOodLenpLqf6D3sDIMVJdE60q6VyIo9BC Idu6WYHc9r71O5h9jI3U+OEn5lJXiTt3+etKZxRL8WJnCX5jEN0pKjm4VLzlE6Xqcb0k wgQw== 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 bh5-v6si4019854plb.204.2018.11.18.11.45.19; Sun, 18 Nov 2018 11:45:35 -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 S1726744AbeKSGEg (ORCPT + 99 others); Mon, 19 Nov 2018 01:04:36 -0500 Received: from mail.bootlin.com ([62.4.15.54]:57786 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725805AbeKSGEg (ORCPT ); Mon, 19 Nov 2018 01:04:36 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id A40D2207B0; Sun, 18 Nov 2018 20:43:25 +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 (91-160-177-164.subs.proxad.net [91.160.177.164]) by mail.bootlin.com (Postfix) with ESMTPSA id 6045020510; Sun, 18 Nov 2018 20:43:25 +0100 (CET) Date: Sun, 18 Nov 2018 20:43:24 +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: <20181118204324.373ca9cc@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> 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 Thu, 15 Nov 2018 09:34:16 +0000 Naga Sureshkumar Relli wrote: > Hi Boris & Miquel, > > I am updating the driver by addressing your comments, and I have one concern, especially in anfc_read_page_hwecc(), > there I am checking for erased pages bit flips. > Since Arasan NAND controller doesn't have multibit error detection beyond 24-bit( it can correct up to 24 bit), > i.e. there is no indication from controller to detect uncorrectable error beyond 24bit. Do you mean that you can't detect uncorrectable errors, or just that it's not 100% sure to detect errors above max_strength? > So I took some error count as default value(MULTI_BIT_ERR_CNT 16, I put this based on the error count that > I got while reading erased page on Micron device). > And during a page read, will just read the error count register and compare this value with the default error count(16) and if it is more > Than default then I am checking for erased page bit flips. Hm, that's wrong, especially if you set ecc_strength to something > 16. > I am doubting that this will not work in all cases. It definitely doesn't. > In my case it is just working because the error count that it got on an erased page is 16. > Could you please suggest a way to do detect erased_page bit flips when reading a page with HW-ECC?. I'm a bit lost. Is the problem only about bitflips in erase pages, or is it also impacting reads of written pages that lead to uncorrectable errors. 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.