All of lore.kernel.org
 help / color / mirror / Atom feed
From: Troy Kisky <troy.kisky@boundarydevices.com>
To: David Brownell <david-b@pacbell.net>
Cc: linux-mtd@lists.infradead.org,
	Snehaprabha Narnakaje <nsnehaprabha@ti.com>
Subject: Re: [PATCH 2/5] mtd: nand: Calculate better default ecc layout
Date: Thu, 14 May 2009 10:59:14 -0700	[thread overview]
Message-ID: <4A0C5BF2.8000709@boundarydevices.com> (raw)
In-Reply-To: <200905132210.27790.david-b@pacbell.net>

David Brownell wrote:
> On Wednesday 13 May 2009, Troy Kisky wrote:
>> This saves lines of code by having nand_base
>> calculate oob_free entries.
>>
>> Boards that don't specify a layout
> 
> Not specifying a layout ... that's fair, won't affect
> compatibility with anything now deployed.  A nice new
> feature, impacting nothing in-tree.
> 
> Another case would be anything using ECC_HW_SYNDROME,
> where the layout is fully specified by ecc.prepad,
> ecc.postpad, ecc.bytes, and the badblock marker
> location ... and if any other layout is specified,
> it will be ignored.  You could print warnings, and
> make the ecclayout reported through the ioctls be
> the actual layout derived from prepad/postpad/etc;
> that counts as a pure bugfix.
> 
> 
>> and don't 
>> use all ecc bytes in the current default layout
>> could have their ecc position changed.
> 
> That seems dangerous.  It will break all existing
> boards.  You *really* don't want that on your head,
> since it won't just break them but will probably
> end up trashing all the data stored on their NAND
> chips ...
> 

That was an "and" above. Not specifying a specific
layout and using a default "and" not using all bytes
in the current default layouts ecc bytes.

> 
>> Looking through the code, I can only see that
>> Davinci is effected this way. It has its ecc
>> bytes moved to the end of the oob data, which
>> is why I want this patch. Before, it was wasting
>> a lot of oob bytes.
> 
> Erm, it took the default of 6 bytes ECC every 512
> bytes of data ... which is more than the hardware
> needs, just 3 bytes ECC for that much data.  That's
> hardly a "lot" (3 extra ecc bytes per 512 data),
> especially now that new software like UBI isn't
> even using the oobdata areas.
> 
> Or the new 4-bit ECC code, *currently* supporting
> only small page chips ... needs 10 bytes ECC for
> each 512 bytes data.  There is no wasted space for
> those cases.
> 
> You should be coordinating changes to davinci_nand
> with Sneha, by the way.

Whoever is in charge of the EVM will need to specify
a layout in the platform data if they don't like the change.

> 
> 
>> Some boards will print warning messages. i.e.
>> mxc_nand which specifies ecc.bytes = 3, but
>> eccbytes = 5 (not a multiple of 3).
> 
> I think it's fair to print a warning if an ECC layout
> is provided and it's got nonfatal issues like that.
> 
> Or even print errors (and fail!) if something really
> wrong turns up ... like mxc_nand getting a large-page
> chip, so it needs eccbytes = 12 but gets an explicit
> and undersized layout as you describe above.  (You
> can see there's a pagesize_2k field that's never set.
> There are clear bugs in large page support for the
> mxc_nand driver, even if you ignore 4k pages.)
> 
> 
>> I may have missed other boards being affected
>> so it needs through testing.
>>
>> Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
> 
> 
> 

  reply	other threads:[~2009-05-14 17:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1242270008-1552-1-git-send-email-troy.kisky@boundarydevices.com>
2009-05-14  4:42 ` [PATCH 1/5] mtd: nand: move layout structure into nand_ecc_ctrl David Brownell
2009-05-14 17:53   ` Troy Kisky
2009-05-14 18:08     ` David Brownell
     [not found] ` <1242270008-1552-2-git-send-email-troy.kisky@boundarydevices.com>
2009-05-14  5:10   ` [PATCH 2/5] mtd: nand: Calculate better default ecc layout David Brownell
2009-05-14 17:59     ` Troy Kisky [this message]
     [not found]   ` <1242270008-1552-3-git-send-email-troy.kisky@boundarydevices.com>
2009-05-14  5:12     ` [PATCH 3/5] mtd: nand: atmel: use " David Brownell
2009-05-14  8:23       ` Haavard Skinnemoen
2009-05-14 18:08         ` Troy Kisky
2009-05-15  7:26           ` Richard Genoud
2009-05-15 19:57             ` Richard Genoud
2009-05-15 22:15               ` Troy Kisky
2009-05-15 22:38                 ` Richard Genoud
2009-05-15 23:04                   ` Troy Kisky
2009-05-14 18:04       ` Troy Kisky
2009-05-20 15:19       ` Nicolas Ferre
2009-05-20 18:28         ` Troy Kisky
     [not found]     ` <1242270008-1552-4-git-send-email-troy.kisky@boundarydevices.com>
2009-05-14  5:18       ` [PATCH 4/5] mtd: nand: cafe_nand: " David Brownell
2009-05-14 21:18         ` Troy Kisky

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=4A0C5BF2.8000709@boundarydevices.com \
    --to=troy.kisky@boundarydevices.com \
    --cc=david-b@pacbell.net \
    --cc=linux-mtd@lists.infradead.org \
    --cc=nsnehaprabha@ti.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.