From: Huang Shijie <b32955@freescale.com>
To: Brian Norris <computersforpeace@gmail.com>
Cc: linux-mtd@lists.infradead.org, matthieu.castet@parrot.com,
dedekind1@gmail.com
Subject: Re: [PATCH 00/11] mtd: add datasheet's ECC information to nand_chip{}
Date: Tue, 23 Apr 2013 10:34:31 +0800 [thread overview]
Message-ID: <5175F337.6010605@freescale.com> (raw)
In-Reply-To: <CAN8TOE-Nt1HrWBN+HeeJAE0UDKBwCXiEEc5+kPtjBM5hXF4d+A@mail.gmail.com>
于 2013年04月23日 05:35, Brian Norris 写道:
>> > Initial comments:
>> >
>> > What are the semantics for these new ecc_strength and ecc_size fields
>> > for chips which aren't encoded in nand_ids.c (or aren't
>> > ONFI-compliant)? We can't necessarily say that '0' means "no data
>> > provided" - it is perfectly valid to have a value of 0, e.g., for EZ
>> > NAND (or something like that) which manages its own ECC on-die. I
>> > think there are even a few words in the ONFI spec about it. Basically,
>> > I'm trying to point out that there is a difference between those chips
>> > which we can't/don't detect their ecc_{strength,size} and those which
>> > need no ECC.
> We need to straighten out these semantics now. Perhaps the fields in
> struct nand_chip can be signed, where -1 is "unknown" and 0 is "no ECC
> required."
>
IMHO, use -1 as "unknown" makes the things a little complexed.
You have to add a patch to fix the nand_ids or init these two fields in
nand_base.c.
For the ECC on-die case(sorry, i never meet this type of nand), I prefer
to add a
new flags to distinguish them.
For the "unknown" case, use the default 0.
>> > Also, I might consider different names for these fields so that you
>> > don't just rely on the in-code comments to differentiate the nand_chip
>> > and nand_ecc_ctrl values. Perhaps min_ecc_strength and ecc_size?
>> > (can't think of a great distinguishing name for the second one)
> The naming can be changed after your series, if it seems worth it.
If we use the min_ecc_strength, we'd better use the min_ecc_size too.
thanks
Huang Shijie
next prev parent reply other threads:[~2013-04-23 2:32 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-18 11:18 [PATCH 00/11] mtd: add datasheet's ECC information to nand_chip{} Huang Shijie
2013-03-18 11:18 ` [PATCH 01/11] " Huang Shijie
2013-03-18 11:18 ` [PATCH 02/11] mtd: increase max OOB size to 744 Huang Shijie
2013-03-18 11:18 ` [PATCH 03/11] mtd: get the ECC info from the parameter page for ONFI nand Huang Shijie
2013-03-18 11:18 ` [PATCH 04/11] mtd: add data structures for Extended Parameter Page Huang Shijie
2013-04-22 4:24 ` Brian Norris
2013-04-22 6:24 ` Huang Shijie
2013-03-18 11:18 ` [PATCH 05/11] mtd: add a helper to get the supported features for ONFI nand Huang Shijie
2013-04-22 4:29 ` Brian Norris
2013-04-22 6:30 ` Huang Shijie
2013-03-18 11:18 ` [PATCH 06/11] mtd: get the ECC info from the Extended Parameter Page Huang Shijie
2013-03-18 11:18 ` [PATCH 07/11] mtd: replace the hardcode with the onfi_get_feature() Huang Shijie
2013-03-18 11:18 ` [PATCH 08/11] mtd: add a new field for ecc info in the nand_flash_dev{} Huang Shijie
2013-04-16 14:56 ` Artem Bityutskiy
2013-04-17 2:11 ` Huang Shijie
2013-03-18 11:18 ` [PATCH 09/11] mtd: parse out the ECC info for the full-id nand chips Huang Shijie
2013-03-18 11:18 ` [PATCH 10/11] mtd: add the ecc info for some " Huang Shijie
2013-04-22 3:30 ` Brian Norris
2013-03-18 11:18 ` [PATCH 11/11] mtd: gpmi: set the BCH's geometry with the ecc info Huang Shijie
2013-04-16 13:55 ` [PATCH 00/11] mtd: add datasheet's ECC information to nand_chip{} Artem Bityutskiy
2013-04-17 2:10 ` Huang Shijie
2013-04-17 3:56 ` Brian Norris
2013-04-22 21:35 ` Brian Norris
2013-04-23 2:34 ` Huang Shijie [this message]
2013-04-23 7:26 ` Brian Norris
2013-04-23 7:54 ` Huang Shijie
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=5175F337.6010605@freescale.com \
--to=b32955@freescale.com \
--cc=computersforpeace@gmail.com \
--cc=dedekind1@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=matthieu.castet@parrot.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).