lkml.org 
[lkml]   [2018]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 2/2] mtd: rawnand: meson: add support for Amlogic NAND flash controller
Hi Liang,

Liang Yang <liang.yang@amlogic.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@amlogic.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?

Thanks,
Miquèl

\
 
 \ /
  Last update: 2018-12-10 15:51    [W:0.098 / U:7.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site