UBI use subpage and verify fail when write on nandflash

Brian Norris computersforpeace at gmail.com
Wed Apr 18 00:27:29 EDT 2012


Add Jon,

On Tue, Apr 17, 2012 at 7:19 AM, b w <wdjjwb at gmail.com> wrote:
> Hello,
>    Use linux 2.6.32,ARM,nandflash(support subpage),config
> CONFIG_MTD_NAND_VERIFY_WRITE. UBI attach fail on empty flash.I found
> when UBI write VID header to the second subpage of eraseblock,will
> call function "nand_write_page",this function write a whole page(i
> think the page size is 2048),the unset bit of the buf is filled with
> 0xff,after write,
>
> #ifdef CONFIG_MTD_NAND_VERIFY_WRITE
>        /* Send command to read back the data */
>        chip->cmdfunc(mtd, NAND_CMD_READ0, 0, page);
>
>        if (chip->verify_buf(mtd, buf, mtd->writesize))
>                return -EIO;
> #endif
>
> now,the buf for verify is not equal to the buf which write,because the
> buf which read from flash contains EC header ?
>
> I found there is topic also mention subpage:
> http://lists.infradead.org/pipermail/linux-mtd/2010-September/031822.html

Hmm, not sure if this is exactly the same issue, but it is related.
It's worth CC'ing Jon to see if he pursued this at all.

Brian



More information about the linux-mtd mailing list