All of lore.kernel.org
 help / color / mirror / Atom feed
From: Liang Yang <liang.yang@amlogic.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Boris Brezillon <boris.brezillon@bootlin.com>,
	Jianxin Pan <jianxin.pan@amlogic.com>,
	<linux-mtd@lists.infradead.org>,
	Yixun Lan <yixun.lan@amlogic.com>,
	David Woodhouse <dwmw2@infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	Marek Vasut <marek.vasut@gmail.com>,
	Richard Weinberger <richard@nod.at>,
	Jerome Brunet <jbrunet@baylibre.com>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	Carlo Caione <carlo@caione.org>,
	Kevin Hilman <khilman@baylibre.com>,
	Rob Herring <robh@kernel.org>, Jian Hu <jian.hu@amlogic.com>,
	Hanjie Lin <hanjie.lin@amlogic.com>,
	Victor Wan <victor.wan@amlogic.com>,
	<linux-amlogic@lists.infradead.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v7 2/2] mtd: rawnand: meson: add support for Amlogic NAND flash controller
Date: Tue, 11 Dec 2018 17:43:11 +0800	[thread overview]
Message-ID: <ce821991-423b-837a-a936-699716791aad@amlogic.com> (raw)
In-Reply-To: <20181211100718.51d2cd6c@xps13>

Hi Miquel,

On 2018/12/11 17:07, Miquel Raynal wrote:
> Hi Liang,
> 
> Liang Yang <liang.yang@amlogic.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@amlogic.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@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?
>>>>>     >> 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.
> 
yes, that is right. i will do the "re-read" process.
> 
> Thanks,
> Miquèl
> 
> .
> 

WARNING: multiple messages have this Message-ID (diff)
From: Liang Yang <liang.yang@amlogic.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Rob Herring <robh@kernel.org>,
	Hanjie Lin <hanjie.lin@amlogic.com>,
	Victor Wan <victor.wan@amlogic.com>,
	Jianxin Pan <jianxin.pan@amlogic.com>,
	Marek Vasut <marek.vasut@gmail.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	Richard Weinberger <richard@nod.at>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Yixun Lan <yixun.lan@amlogic.com>,
	linux-kernel@vger.kernel.org,
	Boris Brezillon <boris.brezillon@bootlin.com>,
	Jian Hu <jian.hu@amlogic.com>,
	linux-mtd@lists.infradead.org,
	Kevin Hilman <khilman@baylibre.com>,
	Carlo Caione <carlo@caione.org>,
	linux-amlogic@lists.infradead.org,
	Brian Norris <computersforpeace@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>,
	linux-arm-kernel@lists.infradead.org,
	Jerome Brunet <jbrunet@baylibre.com>
Subject: Re: [PATCH v7 2/2] mtd: rawnand: meson: add support for Amlogic NAND flash controller
Date: Tue, 11 Dec 2018 17:43:11 +0800	[thread overview]
Message-ID: <ce821991-423b-837a-a936-699716791aad@amlogic.com> (raw)
In-Reply-To: <20181211100718.51d2cd6c@xps13>

Hi Miquel,

On 2018/12/11 17:07, Miquel Raynal wrote:
> Hi Liang,
> 
> Liang Yang <liang.yang@amlogic.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@amlogic.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@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?
>>>>>     >> 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.
> 
yes, that is right. i will do the "re-read" process.
> 
> Thanks,
> Miquèl
> 
> .
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Liang Yang <liang.yang@amlogic.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Rob Herring <robh@kernel.org>,
	Hanjie Lin <hanjie.lin@amlogic.com>,
	Victor Wan <victor.wan@amlogic.com>,
	Jianxin Pan <jianxin.pan@amlogic.com>,
	Marek Vasut <marek.vasut@gmail.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	Richard Weinberger <richard@nod.at>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Yixun Lan <yixun.lan@amlogic.com>,
	linux-kernel@vger.kernel.org,
	Boris Brezillon <boris.brezillon@bootlin.com>,
	Jian Hu <jian.hu@amlogic.com>,
	linux-mtd@lists.infradead.org,
	Kevin Hilman <khilman@baylibre.com>,
	Carlo Caione <carlo@caione.org>,
	linux-amlogic@lists.infradead.org,
	Brian Norris <computersforpeace@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>,
	linux-arm-kernel@lists.infradead.org,
	Jerome Brunet <jbrunet@baylibre.com>
Subject: Re: [PATCH v7 2/2] mtd: rawnand: meson: add support for Amlogic NAND flash controller
Date: Tue, 11 Dec 2018 17:43:11 +0800	[thread overview]
Message-ID: <ce821991-423b-837a-a936-699716791aad@amlogic.com> (raw)
In-Reply-To: <20181211100718.51d2cd6c@xps13>

Hi Miquel,

On 2018/12/11 17:07, Miquel Raynal wrote:
> Hi Liang,
> 
> Liang Yang <liang.yang@amlogic.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@amlogic.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@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?
>>>>>     >> 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.
> 
yes, that is right. i will do the "re-read" process.
> 
> Thanks,
> Miquèl
> 
> .
> 

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  reply	other threads:[~2018-12-11  9:42 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-16 16:40 [PATCH v7 0/2] mtd: rawnand: meson: add Amlogic NAND driver support Jianxin Pan
2018-11-16 16:40 ` Jianxin Pan
2018-11-16 16:40 ` Jianxin Pan
2018-11-16 16:40 ` Jianxin Pan
2018-11-16 16:40 ` [PATCH v7 1/2] dt-bindings: nand: meson: add Amlogic NAND controller driver Jianxin Pan
2018-11-16 16:40   ` Jianxin Pan
2018-11-16 16:40   ` Jianxin Pan
2018-11-16 16:40   ` Jianxin Pan
2018-11-16 16:40 ` [PATCH v7 2/2] mtd: rawnand: meson: add support for Amlogic NAND flash controller Jianxin Pan
2018-11-16 16:40   ` Jianxin Pan
2018-11-16 16:40   ` Jianxin Pan
2018-12-07  9:24   ` Miquel Raynal
2018-12-07  9:24     ` Miquel Raynal
2018-12-07  9:24     ` Miquel Raynal
2018-12-07  9:42     ` Miquel Raynal
2018-12-07  9:42       ` Miquel Raynal
2018-12-07  9:42       ` Miquel Raynal
2018-12-07 10:41       ` Liang Yang
2018-12-07 10:41         ` Liang Yang
2018-12-07 10:41         ` Liang Yang
2018-12-07 10:48         ` Miquel Raynal
2018-12-07 10:48           ` Miquel Raynal
2018-12-07 10:48           ` Miquel Raynal
2018-12-10 11:23     ` Liang Yang
2018-12-10 11:23       ` Liang Yang
2018-12-10 11:23       ` Liang Yang
2018-12-10 11:38       ` Boris Brezillon
2018-12-10 11:38         ` Boris Brezillon
2018-12-10 11:38         ` Boris Brezillon
2018-12-10 12:12         ` Liang Yang
2018-12-10 12:12           ` Liang Yang
2018-12-10 12:12           ` Liang Yang
2018-12-10 14:50           ` Miquel Raynal
2018-12-10 14:50             ` Miquel Raynal
2018-12-10 14:50             ` Miquel Raynal
2018-12-11  1:56             ` Liang Yang
2018-12-11  1:56               ` Liang Yang
2018-12-11  1:56               ` Liang Yang
2018-12-11  7:54               ` Miquel Raynal
2018-12-11  7:54                 ` Miquel Raynal
2018-12-11  7:54                 ` Miquel Raynal
2018-12-11  8:36                 ` Liang Yang
2018-12-11  8:36                   ` Liang Yang
2018-12-11  8:36                   ` Liang Yang
2018-12-11  9:07                   ` Miquel Raynal
2018-12-11  9:07                     ` Miquel Raynal
2018-12-11  9:07                     ` Miquel Raynal
2018-12-11  9:43                     ` Liang Yang [this message]
2018-12-11  9:43                       ` Liang Yang
2018-12-11  9:43                       ` Liang Yang
2018-12-11  8:39               ` Boris Brezillon
2018-12-11  8:39                 ` Boris Brezillon
2018-12-11  8:39                 ` Boris Brezillon
2018-12-11  9:39                 ` Liang Yang
2018-12-11  9:39                   ` Liang Yang
2018-12-11  9:39                   ` Liang Yang
2018-11-26  6:39 ` [PATCH v7 0/2] mtd: rawnand: meson: add Amlogic NAND driver support Liang Yang
2018-11-26  6:39   ` Liang Yang
2018-11-26  6:39   ` Liang Yang
2018-11-26  6:39   ` Liang Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ce821991-423b-837a-a936-699716791aad@amlogic.com \
    --to=liang.yang@amlogic.com \
    --cc=boris.brezillon@bootlin.com \
    --cc=carlo@caione.org \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=hanjie.lin@amlogic.com \
    --cc=jbrunet@baylibre.com \
    --cc=jian.hu@amlogic.com \
    --cc=jianxin.pan@amlogic.com \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=narmstrong@baylibre.com \
    --cc=richard@nod.at \
    --cc=robh@kernel.org \
    --cc=victor.wan@amlogic.com \
    --cc=yixun.lan@amlogic.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.