linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Abhishek Sahu <absahu@codeaurora.org>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATCH 6/9] mtd: nand: qcom: support for checking read errors for last codeword
Date: Mon, 23 Apr 2018 08:56:35 +0200	[thread overview]
Message-ID: <20180423085635.794037ef@xps13> (raw)
In-Reply-To: <10ef5f58aceed5bb5069dad6c1b1b0e3@codeaurora.org>

Hi Abhishek,

On Mon, 23 Apr 2018 11:38:27 +0530, Abhishek Sahu
<absahu@codeaurora.org> wrote:

> On 2018-04-22 21:45, Miquel Raynal wrote:
> > Hi Abhishek,  
> > > On Thu, 12 Apr 2018 12:47:42 +0530, Abhishek Sahu  
> > <absahu@codeaurora.org> wrote:  
> > >> On 2018-04-10 15:35, Miquel Raynal wrote:
> >> > Hi Abhishek,  
> >> > > On Wed,  4 Apr 2018 18:12:22 +0530, Abhishek Sahu  
> >> > <absahu@codeaurora.org> wrote:  
> >> > >> Add boolean function argument in parse_read_errors to identify  
> >> >> whether the read error has been called for complete page read or
> >> >> only last codeword read. This will help in subsequent patches to
> >> >> detect ECC errors in case of last codeword read.
> >> > > Can you explain when this happen: "last codeword read"? I don't see the  
> >> > use case.  
> >> >>   Hi Miquel,
> >> >>   This is happening inside qcom_nandc_write_oob where the last subpage  
> >>   data is being copied first.
> > > I still don't understand the use case.
> > > What to you mean last 'subpage copied first'?  
> >   
>   Hi Miquel,
> 
>   According to current implementation
> 
>   QCOM NAND layout protect 16 bytes of available oob with ECC also.
>   When ecc->write_oob (qcom_nandc_write_oob) is being called
>   then it can't update just OOB bytes.
> 
>   It needs to first read the last subpage which includes old
>   OOB bytes. Then it updates the old OOB bytes with new one
>   and then again write the data back.
> 
>   You can refer function comment of qcom_nandc_write_oob
>   for the same.

Oh well, I think I see where we misunderstood: ->write_oob only asks
you to write some data, that is all. The user is supposed to know
which type of flash he is handling. If he writes a section that
has already been written, well, bad for him. But you certainly don't
want to handle that in the controller driver directly.

> 
>   But, to me, it looks like this read is unnecessary since
>   all the other bytes will be 0xff only. Require your help
>   in confirming the same and then I will remove that read
>   last subpage implementation.

I think you can drop it.

Thanks,
Miquèl

> 
>   Thanks,
>   Abhishek
> 
> >> >>     host->use_ecc = true;
> >> >>     clear_bam_transaction(nandc);  
> >>     ret = copy_last_cw(host, page);
> >>     if (ret)
> >>         return ret;  
> >> >>   you can refer function comment of qcom_nandc_write_oob  for more  
> >>   detail.  
> >> >>   Thanks,  
> >>   Abhishek  



-- 
Miquel Raynal, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2018-04-23  6:57 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-04 12:42 [PATCH 0/9] Update for QCOM NAND driver Abhishek Sahu
2018-04-04 12:42 ` [PATCH 1/9] mtd: nand: qcom: use the ecc strength from device parameter Abhishek Sahu
2018-04-06 12:31   ` Miquel Raynal
2018-04-10  6:09     ` Abhishek Sahu
2018-04-10  7:46       ` Miquel Raynal
2018-04-10  7:55         ` Miquel Raynal
2018-04-10  8:07           ` Boris Brezillon
2018-04-12  9:59             ` Abhishek Sahu
2018-04-22 16:34               ` Miquel Raynal
2018-04-23  6:44                 ` Abhishek Sahu
2018-04-23  7:05                   ` Miquel Raynal
2018-04-24  6:25                     ` Abhishek Sahu
2018-04-04 12:42 ` [PATCH 2/9] mtd: nand: qcom: wait for desc completion in all BAM channels Abhishek Sahu
2018-04-04 12:42 ` [PATCH 3/9] mtd: nand: qcom: erased page detection for uncorrectable errors only Abhishek Sahu
2018-04-10  8:59   ` Miquel Raynal
2018-04-12  6:33     ` Abhishek Sahu
2018-04-12  6:49       ` Miquel Raynal
2018-04-12  6:58         ` Abhishek Sahu
2018-04-04 12:42 ` [PATCH 4/9] mtd: nand: qcom: fix null pointer access for erased buffer detection Abhishek Sahu
2018-04-10  9:12   ` Miquel Raynal
2018-04-12  6:54     ` Abhishek Sahu
2018-04-22 16:25       ` Miquel Raynal
2018-04-23  6:29         ` Abhishek Sahu
2018-04-04 12:42 ` [PATCH 5/9] mtd: nand: qcom: parse read errors for read oob also Abhishek Sahu
2018-04-10 10:03   ` Miquel Raynal
2018-04-12  7:10     ` Abhishek Sahu
2018-04-04 12:42 ` [PATCH 6/9] mtd: nand: qcom: support for checking read errors for last codeword Abhishek Sahu
2018-04-10 10:05   ` Miquel Raynal
     [not found]     ` <d9f06fe59fa76d2dbf97cb0b5de75bc7@codeaurora.org>
2018-04-22 16:15       ` Miquel Raynal
2018-04-23  6:08         ` Abhishek Sahu
2018-04-23  6:56           ` Miquel Raynal [this message]
2018-04-04 12:42 ` [PATCH 7/9] mtd: nand: qcom: check for operation errors in case of raw read Abhishek Sahu
2018-04-10 10:12   ` Miquel Raynal
2018-04-12  7:33     ` Abhishek Sahu
2018-04-04 12:42 ` [PATCH 8/9] mtd: nand: qcom: helper function for " Abhishek Sahu
2018-04-10  9:44   ` Miquel Raynal
2018-04-12  7:06     ` Abhishek Sahu
2018-04-22 16:19       ` Miquel Raynal
2018-04-23  6:28         ` Abhishek Sahu
2018-04-23  6:58           ` Miquel Raynal
2018-04-25  6:32             ` Abhishek Sahu
2018-04-25 12:59               ` Miquel Raynal
2018-04-26  5:53                 ` Abhishek Sahu
2018-04-26  7:11                   ` Miquel Raynal
2018-04-26  7:42                     ` Abhishek Sahu
2018-04-04 12:42 ` [PATCH 9/9] mtd: nand: qcom: erased page bitflips detection Abhishek Sahu
2018-04-10 10:30   ` Miquel Raynal
2018-04-12  8:00     ` Abhishek Sahu

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=20180423085635.794037ef@xps13 \
    --to=miquel.raynal@bootlin.com \
    --cc=absahu@codeaurora.org \
    --cc=linux-mtd@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).