From: Huang Shijie <b32955@freescale.com>
To: Brian Norris <computersforpeace@gmail.com>
Cc: linux-mtd@lists.infradead.org, dwmw2@infradead.org, dedekind1@gmail.com
Subject: Re: [PATCH v3 06/10] mtd: fix the wrong mtd->type for nand chip
Date: Wed, 28 Aug 2013 14:59:24 +0800 [thread overview]
Message-ID: <521D9FCC.5010104@freescale.com> (raw)
In-Reply-To: <521D69B6.7070504@gmail.com>
于 2013年08月28日 11:08, Brian Norris 写道:
> Since we may see a v4 anyway, I'll make a comment here that I've been
> mulling over.
>
> On 08/26/2013 02:36 AM, Huang Shijie wrote:
>> Current code sets the mtd->type with MTD_NANDFLASH for both
>> SLC and MLC. So the jffs2 may supports the MLC nand, but in actually,
>> the jffs2 should not support the MLC.
>>
>> This patch uses the nand_is_slc() to check the nand cell type,
>> and set the mtd->type with the right nand type.
>>
>> After this patch, the jffs2 only can support the SLC nand.
>>
>> Signed-off-by: Huang Shijie <b32955@freescale.com>
>
> This patch doesn't note here that it is breaking the ABI: it is the
> first (AFAIK; I don't think onenand ever actually had MLC, right?)
> patch to cause an MTD to show up as MTD_MLCNANDFLASH (and "unknown" in
> sysfs -- but you change this later to "mlc-nand"). This should be made
> more clear, if we're going to do this. And you should document and
> explain it *before* this patch.
okay.
>
> But more importantly, you don't really answer this question I have:
> why we want to expose this MTD_MLCNANDFLASH type to user-space? It
> seems you need this for internal drivers' usage and for JFFS2 (both
> valid reasons). But exporting it to user-space just makes us work to
> change mtd-utils (and any other scripts that might rely on these
> types). Note that not everybody upgrades mtd-utils along with their
> kernel.
>
After we change the code with this patch, the SLC still expose the
'nand' to the user space, it's ok;
but the MLC will expose "unknown" as you said above. Some mtd-utils,
such as mtd_debug will not work well any more.
If we do expose the MTD_MLCNANDFLASH to use space, the mtd-utils may can
not work with MLC nand, some code only checks the
MTD_NANDFLASH. Please see the :
http://lists.infradead.org/pipermail/linux-mtd/2013-August/048213.html
That's why we should expose the MTD_MLCNANDFLASH to the user-space
> One argument in favor of your change: so a user can programmatically
> determine whether to use JFFS2 or UBIFS on a particular NAND. (But
> then again, SLC are getting more and more MLC-like properties that
> make them unsuitable for JFFS2...)
>
> So, I would recommend a few rearrangements of part of this series:
> (1) fixup the sysfs show() function and ABI documentation (in the same
> patch) to cover "mlc-nand". *** must clearly explain the rationale for
> userspace change (currently missing) ***
> (2) do any changes to JFFS2 based on the MLC type
> (3) allow nand_base.c to export MTD_MLCNANDFLASH
I will arrange the next version in this order.
thanks
Huang Shijie
next prev parent reply other threads:[~2013-08-28 6:58 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-26 9:36 [PATCH v3 00/10] About the SLC/MLC Huang Shijie
2013-08-26 9:36 ` [PATCH v3 01/10] mtd: nand: rename the cellinfo to bits_per_cell Huang Shijie
2013-08-27 17:10 ` Vikram Narayanan
2013-08-28 2:23 ` Huang Shijie
2013-08-28 2:42 ` Brian Norris
2013-08-28 2:45 ` Huang Shijie
2013-08-28 2:48 ` Brian Norris
2013-08-28 2:53 ` Huang Shijie
2013-08-28 3:02 ` Brian Norris
2013-08-28 3:09 ` Huang Shijie
2013-08-26 9:36 ` [PATCH v3 02/10] mtd: set the cell information for ONFI nand Huang Shijie
2013-08-26 9:36 ` [PATCH v3 03/10] mtd: print out the cell information for nand chip Huang Shijie
2013-08-26 9:36 ` [PATCH v3 04/10] mtd: gpmi: rewrite the gpmi_ecc_write_oob() to support the jffs2 Huang Shijie
2013-08-26 9:36 ` [PATCH v3 05/10] mtd: add more comment for MTD_NANDFLASH/MTD_MLCNANDFLASH Huang Shijie
2013-08-26 9:36 ` [PATCH v3 06/10] mtd: fix the wrong mtd->type for nand chip Huang Shijie
2013-08-28 3:08 ` Brian Norris
2013-08-28 6:59 ` Huang Shijie [this message]
2013-08-28 7:28 ` Brian Norris
2013-08-28 7:50 ` Huang Shijie
2013-08-28 9:26 ` Huang Shijie
2013-08-29 1:24 ` Huang Shijie
2013-08-29 5:05 ` Brian Norris
2013-08-29 5:34 ` Huang Shijie
2013-08-29 5:50 ` Huang Shijie
2013-09-04 18:51 ` Brian Norris
[not found] ` <52280278.6020007@freescale.com>
2013-09-17 0:13 ` Brian Norris
2013-08-26 9:36 ` [PATCH v3 07/10] jffs2: do not support the MLC nand Huang Shijie
2013-08-26 9:36 ` [PATCH v3 08/10] mtd: add MTD_MLCNANDFLASH case for mtd_type_show() Huang Shijie
2013-08-26 9:36 ` [PATCH v3 09/10] mtd: add a helper to detect the nand type Huang Shijie
2013-09-17 0:27 ` Brian Norris
2013-08-26 9:36 ` [PATCH v3 10/10] mtd: mtd-abi: " Huang Shijie
2013-08-26 12:41 ` [PATCH v3 00/10] About the SLC/MLC Thomas Petazzoni
2013-08-27 3:30 ` Huang Shijie
2013-10-19 13:32 ` Ezequiel Garcia
2013-10-21 2:58 ` Huang Shijie
2013-10-22 5:11 ` Gupta, Pekon
2013-10-30 22:02 ` 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=521D9FCC.5010104@freescale.com \
--to=b32955@freescale.com \
--cc=computersforpeace@gmail.com \
--cc=dedekind1@gmail.com \
--cc=dwmw2@infradead.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).