[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181211100718.51d2cd6c@xps13>
Date: Tue, 11 Dec 2018 10:07:18 +0100
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: Liang Yang <liang.yang@...ogic.com>
Cc: Boris Brezillon <boris.brezillon@...tlin.com>,
Jianxin Pan <jianxin.pan@...ogic.com>,
<linux-mtd@...ts.infradead.org>, Yixun Lan <yixun.lan@...ogic.com>,
David Woodhouse <dwmw2@...radead.org>,
Brian Norris <computersforpeace@...il.com>,
Marek Vasut <marek.vasut@...il.com>,
Richard Weinberger <richard@....at>,
Jerome Brunet <jbrunet@...libre.com>,
Neil Armstrong <narmstrong@...libre.com>,
Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
Carlo Caione <carlo@...one.org>,
Kevin Hilman <khilman@...libre.com>,
Rob Herring <robh@...nel.org>, Jian Hu <jian.hu@...ogic.com>,
Hanjie Lin <hanjie.lin@...ogic.com>,
Victor Wan <victor.wan@...ogic.com>,
<linux-amlogic@...ts.infradead.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v7 2/2] mtd: rawnand: meson: add support for Amlogic
NAND flash controller
Hi Liang,
Liang Yang <liang.yang@...ogic.com> wrote on Tue, 11 Dec 2018 16:36:47
+0800:
> Hi Miquel,
>
> Thanks for your quickly reply.
>
> On 2018/12/11 15:54, Miquel Raynal wrote:
> > Hi Liang,
> >
> > Liang Yang <liang.yang@...ogic.com> wrote on Tue, 11 Dec 2018 09:56:25
> > +0800:
> >
> >> Hi Miquel,
> >>
> >> On 2018/12/10 22:50, Miquel Raynal wrote:
> >>> Hi Liang,
> >>>
> >>> Liang Yang <liang.yang@...ogic.com> wrote on Mon, 10 Dec 2018 20:12:39
> >>> +0800:
> >>> >>>> On 2018/12/10 19:38, Boris Brezillon wrote:
> >>>>> On Mon, 10 Dec 2018 19:23:46 +0800
> >>>>> Liang Yang <liang.yang@...ogic.com> wrote:
> >>>>> >>>>>> + mtd->ecc_stats.failed++;
> >>>>>>>> + continue;
> >>>>>>>> + }
> >>>>>>>> + mtd->ecc_stats.corrected += ECC_ERR_CNT(*info);
> >>>>>>>> + bitflips = max_t(u32, bitflips, ECC_ERR_CNT(*info));
> >>>>>>>> + }
> >>>>>>>
> >>>>>>> Are you sure you handle correctly empty pages with bf?
> >>>>>>> >> if scramble is enable, i would say yes here.
> >>>>>> when scramble is disabled, i am considering how to use the helper
> >>>>>> nand_check_erased_ecc_chunk, but it seems that i can't get the ecc
> >>>>>> bytes which is caculated by ecc engine.by the way, nfc dma doesn't send
> >>>>>> out the ecc parity bytes.
> >>>>>
> >>>>> Even if the ECC engine is disabled?
> >>>>> >> No.
> >>>> When ECC engine is disabled, it can read the ecc parity bytes ; but there is another problem that i need to consider how code struct looks better when reading error with ecc opened and then try to raw read.
> >>>> Is there a good idea?
> >>>
> >>> When reading with ECC enabled, in case of uncorrectable error you
> >>> must re-read without ECC, then check if the page is empty or not with
> >>> the core helpers (nand_check_erased_*()).
> >>>
> >>> Is this what you meant?
> >>> >> yes. when uncorrectable ECC error, i need firstly read out the ECC bytes without ECC engine and then use the helper nand_check_erased_ecc_chunk to check if blank page.
> >> Of course, the precondition is without scrambler, or the bland page can be detected by meson NFC.
> >
> > A suppose you meant "blank page"? If yes, then you don't need the
> > helper to check for only-0xFF pages. If the controller tells you if the
> > page was blank, then just check for that bit.
> >
>
> i think not. we need to return back the previous problem that how i can get the bitflips of one blank page. i think i need the helper.
You are right, I suppose the "blank page" flag is only triggered if
there is no bitflip. In this case you can assume there are no
bitflips. Otherwise the controller will trigger an
uncorrectable error event and you will have to re-read the page
without ECC and check for bitflips with the helper.
Thanks,
Miquèl
Powered by blists - more mailing lists