LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@bootlin.com>
To: "Wan, Jane (Nokia - US/Sunnyvale)" <jane.wan@nokia.com>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>,
	"shreeya.patel23498@gmail.com" <shreeya.patel23498@gmail.com>,
	"yamada.masahiro@socionext.com" <yamada.masahiro@socionext.com>,
	"richard@nod.at" <richard@nod.at>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"marek.vasut@gmail.com" <marek.vasut@gmail.com>,
	"Bos, Ties \(Nokia - US/Sunnyvale\)" <ties.bos@nokia.com>,
	"prabhakar.kushwaha@nxp.com" <prabhakar.kushwaha@nxp.com>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	"jagdish.gediya@nxp.com" <jagdish.gediya@nxp.com>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>,
	"computersforpeace@gmail.com" <computersforpeace@gmail.com>,
	"dwmw2@infradead.org" <dwmw2@infradead.org>
Subject: Re: [PATCH 1/2] Fix FSL NAND driver to read all ONFI parameter pages
Date: Wed, 2 May 2018 12:39:14 +0200	[thread overview]
Message-ID: <20180502123914.3755a634@bbrezillon> (raw)
In-Reply-To: <VI1PR07MB161575ACAE380B18882E8EE981810@VI1PR07MB1615.eurprd07.prod.outlook.com>

On Tue, 1 May 2018 05:01:23 +0000
"Wan, Jane (Nokia - US/Sunnyvale)" <jane.wan@nokia.com> wrote:

> Hi Miquèl and Boris,
> 
> Thank you for your response and feedback.  I've modified the fix based on your comments.  
> Please see the updated patch file at the end of this message (also in attachment).
> My answers to your comments/questions are inline in the previous message.
> 
> Here is the answer to Boris question in another email thread:
> 
> > What if some NANDs have 4 or more copies of the param page?  
>  [Jane] The ONFI spec defines that the parameter page and its two redundant copies are mandatory.  
> The additional redundant pages are optional.  Currently, the FSL NAND driver only reads the first 
> parameter page.  This patch is to fix the driver to meet the mandatory requirement in the spec. 
> We got a batch of particularly bad NAND chips recently and we needed these changes to make them 
> work reliably over temperature.  The patch was verified using these bad chips.

And that proves my point. The core is reading 3 param pages [1], but
since this driver was trying to guess how many bytes to read from
->cmdfunc() and did not guess correctly you ended up with a partially
working implementation (works only if the first PARAM page is valid).
Now, you fix it to read 3 PARAM pages, but what if we decide to read
more to cope with MLC NANDs where even more copy are needed to have one
valid version? You'll have to patch ->cmdfunc() again, just because
you're trying to guess something that the core is supposed to tell you.

[1]https://elixir.bootlin.com/linux/v4.17-rc3/source/drivers/mtd/nand/raw/nand_base.c#L5115

  parent reply	other threads:[~2018-05-02 10:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-27  0:19 [PATCH 0/2] Fix fsl_ifc_nand reading ONFI parameters to meet ONFI spec Jane Wan
2018-04-27  0:19 ` [PATCH 1/2] Fix FSL NAND driver to read all ONFI parameter pages Jane Wan
2018-04-28 11:42   ` Miquel Raynal
2018-05-01  5:01     ` Wan, Jane (Nokia - US/Sunnyvale)
2018-05-02  8:10       ` Miquel Raynal
2018-05-02 10:39       ` Boris Brezillon [this message]
2018-04-30 10:00   ` Boris Brezillon
2018-04-27  0:19 ` [PATCH 2/2] Use bit-wise majority to recover the contents of ONFI parameter Jane Wan
2018-04-28 12:06   ` Miquel Raynal
2018-05-01  5:33     ` Wan, Jane (Nokia - US/Sunnyvale)
2018-05-02 10:25   ` Boris Brezillon
2018-05-02 10:31     ` Boris Brezillon

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=20180502123914.3755a634@bbrezillon \
    --to=boris.brezillon@bootlin.com \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=jagdish.gediya@nxp.com \
    --cc=jane.wan@nokia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=prabhakar.kushwaha@nxp.com \
    --cc=richard@nod.at \
    --cc=shawnguo@kernel.org \
    --cc=shreeya.patel23498@gmail.com \
    --cc=ties.bos@nokia.com \
    --cc=yamada.masahiro@socionext.com \
    --subject='Re: [PATCH 1/2] Fix FSL NAND driver to read all ONFI parameter pages' \
    /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

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).