[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181118195258.4966e2c4@xps13>
Date: Sun, 18 Nov 2018 19:52:58 +0100
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: Naga Sureshkumar Relli <nagasure@...inx.com>
Cc: "boris.brezillon@...tlin.com" <boris.brezillon@...tlin.com>,
"richard@....at" <richard@....at>,
"dwmw2@...radead.org" <dwmw2@...radead.org>,
"computersforpeace@...il.com" <computersforpeace@...il.com>,
"marek.vasut@...il.com" <marek.vasut@...il.com>,
"nagasuresh12@...il.com" <nagasuresh12@...il.com>,
Michal Simek <michals@...inx.com>,
"linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"robh@...nel.org" <robh@...nel.org>
Subject: Re: [LINUX PATCH v12 3/3] mtd: rawnand: arasan: Add support for
Arasan NAND Flash Controller
Hi Naga,
Naga Sureshkumar Relli <nagasure@...inx.com> wrote on Thu, 15 Nov 2018
09:34:16 +0000:
> 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.
> 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.
> I am doubting that this will not work in all cases.
> 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?.
So the ECC engine is broken by design.
I think you should determine a number of bitflips (16 looks nice to me)
over which you declare the page bad anyway.
Now, this is generic logic: anytime a page is declared bad, 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.
Thanks,
Miquèl
Powered by blists - more mailing lists