[PATCH v3 06/10] mtd: fix the wrong mtd->type for nand chip

Huang Shijie b32955 at freescale.com
Thu Aug 29 01:50:41 EDT 2013


于 2013年08月29日 13:34, Huang Shijie 写道:
> 于 2013年08月29日 13:05, Brian Norris 写道:
>> This patch (patch 6) changes the mtd->type for MLC NAND. And 
>> mtd->type is exposed to user-space via ioctl(MEMGETINFO), and (as of 
>> this patch), it is exposed as "unknown" in sysfs.
> thanks.
>
> this patch changes the mtd->type for the jffs2, and the jffs2 can uses 
> the mtd->type to do the sanity check.
>
> If without this patch, how the jffs2 can distinguish a SLC or a MLC?
hi Brian:

I find a method to distinguish the SLC/MLC for jffs2, we can add the 
code for jffs2:
   -------------------------------------------------------
      if (mtd->flags == MTD_CAP_NANDFLASH) {

              struch nand_chip *chip = c->mtd->priv;
              if (!nand_is_slc)
                 return -EINVAL;
      }


   ------------------------------------------------------

If you think this code is okay, we can abandon serveral patches.

thanks
Huang Shijie




More information about the linux-mtd mailing list