linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
To: Brian Norris <computersforpeace@gmail.com>
Cc: Lior Amsalem <alior@marvell.com>,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	Tawfik Bayouk <tawfik@marvell.com>,
	Artem Bityutskiy <dedekind1@gmail.com>,
	Huang Shijie <b32955@freescale.com>,
	linux-mtd@lists.infradead.org,
	Gregory Clement <gregory.clement@free-electrons.com>,
	David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH 0/1] Bad block markers here, there and everywhere
Date: Thu, 14 Nov 2013 15:58:46 -0300	[thread overview]
Message-ID: <20131114185845.GB9912@localhost> (raw)
In-Reply-To: <20131105231522.GC11759@localhost>

On Tue, Nov 05, 2013 at 08:15:22PM -0300, Ezequiel Garcia wrote:
> On Tue, Nov 05, 2013 at 08:01:26PM -0300, Ezequiel Garcia wrote:
> > On Tue, Nov 05, 2013 at 10:07:43AM -0800, Brian Norris wrote:
> > > On Tue, Nov 05, 2013 at 09:00:20AM -0300, Ezequiel Garcia wrote:
> > > > This commit adds a new option called NAND_BBT_DATA_BBM. The change itself
> > > > is pretty small and simple to understand: when the badblock_pattern sets the
> > > > NAND_BBT_DATA_BBM option, scan_block_fast() reads the data region instead
> > > > of the OOB region.
> > > 
> > > I think this type of scanning method is better suited to a different
> > > type of solution: implement a custom nand_chip.bad_block() call-back.
> > 
> > Fully agreed (I guess you mean block_bad() right?)
> > 
> > > Unfortunately, nand_base/nand_bbt are kind of inconsistent, so that some
> > > code paths use nand_chip.bad_block() and some use nand_bbt.c's scanning
> > > code to check for bad block markers, so this is not currently a good
> > > solution.
> > > 
> > 
> > Which is why I couldn't implement a custom block_bad(). My particular
> > use case (which could match others) needs this customization in the
> > first scan. After that, once the bad block table is built, the in-flash
> > bad block markers are never touched.
> > 
> > > I've been meaning to follow through with an improved version of this
> > > patch for a while:
> > > 
> > >   http://lists.infradead.org/pipermail/linux-mtd/2012-June/042571.html
> > > 
> > > Such a patch provides several benefits, one of them being that drivers
> > > like yours can easily provide a custom BBM location. What do you think?
> > > 
> > 
> > Of course, that sounds much more flexible. Let me pick it where Matthieu left,
> > I'll read the patch and prepare something to discuss.
> > 
> > On the other side, I'm seeing the above patch was a bit argued :/ I'm
> > not sure why it got never merged, maybe you can give me some heads up
> > about potential drawbacks?
> 
> After reading the patch and reading the code, now I'm even more confused :)
> 
> The first thing that seems odd is the fact that the scan_block_fast()
> path matches a pattern (which can be several bytes long), whereas the
> default nand_block_bad() seem to check for just one byte.
> 
> This may or may not be an issue, after some thought, but it's not
> a trivial change, IMHO.
> 
> The second thing, which was already discussed back in June-2012 is the
> fact that scan_block_fast() uses mtd_read_oob() to read, but
> nand_block_bad() just issues a READOOB command.
> 
> So, what do you propose? If you can give me some guidelines I've no problem
> in preparing a (first/draft) patch to trigger the discussion.

Ping?

This is an important issue for the pxa3xx driver and I'd like to move
forward with it.

However, as I previously said I'd like to discuss some more about your
proposal: currently scan_block_fast() uses mtd_read_oob() to read, and
nand_block_bad() issues a READOOB command, so it's not trivial to
replace the former with the latter.

Ideas?
-- 
Ezequiel García, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com

  reply	other threads:[~2013-11-14 18:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-05 12:00 [PATCH 0/1] Bad block markers here, there and everywhere Ezequiel Garcia
2013-11-05 12:00 ` [PATCH 1/1] mtd: nand: Allow bad block markers to be found in the data region Ezequiel Garcia
2013-11-05 18:07 ` [PATCH 0/1] Bad block markers here, there and everywhere Brian Norris
2013-11-05 23:01   ` Ezequiel Garcia
2013-11-05 23:15     ` Ezequiel Garcia
2013-11-14 18:58       ` Ezequiel Garcia [this message]
2013-11-14 21:52         ` Brian Norris

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=20131114185845.GB9912@localhost \
    --to=ezequiel.garcia@free-electrons.com \
    --cc=alior@marvell.com \
    --cc=b32955@freescale.com \
    --cc=computersforpeace@gmail.com \
    --cc=dedekind1@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=gregory.clement@free-electrons.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=tawfik@marvell.com \
    --cc=thomas.petazzoni@free-electrons.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 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).