NAND write verify failed problem (SOLVED?)

Pantelis Antoniou panto at intracom.gr
Mon Jun 2 07:21:15 EDT 2003


Pantelis Antoniou wrote:

> Hi
>
> I'm testing a new board with a NAND device chip
> and I've hit a couple of problems which I'm not
> sure what the problem is.
>
> My configuration is as follows.
>
> CPU: MPC850SR powerpc
> NAND: Samsung K9FF5608U0B (32Mb, 8bit interface).
> Kernel: LinuxPPC 2.4.21-rc2 devel.
>
> The kernel has fairly recent MTD drivers and a diff
> found no major differences.
> I use the mtd utils from the latest nightly tarball.
>
> The NAND driver is a custom one I made based on the
> example in the docs. It is fairly simple and the
> chip is detected alright at boot time.
>
> The relevant .config fragment is as follows:
>
> CONFIG_MTD=y
> CONFIG_MTD_DEBUG=y
> CONFIG_MTD_DEBUG_VERBOSE=0
> CONFIG_MTD_PARTITIONS=y
> CONFIG_MTD_CONCAT=y
> CONFIG_MTD_CMDLINE_PARTS=y
> CONFIG_MTD_CHAR=y
> CONFIG_MTD_BLOCK=y
> CONFIG_MTD_NAND=y
> CONFIG_MTD_NAND_VERIFY_WRITE=y
> CONFIG_MTD_NAND_NETVIA=y # the name of my board
> CONFIG_MTD_NAND_IDS=y
>
> I intend to use JFFS2 which I used in a previous
> design with a NOR flash.
>
> Mounting an NFS root from a shell on the target...
>
> Erasing seems to go well.
>
> > root$ eraseall -j /dev/mtd0
> Erasing 16 Kibyte @ 1ffc000 -- 99 % complete. Cleanmarker written at 
> 1ffc000
>
> Making a test jffs2 image (size 540672 bytes)
>
> > root$ mkfs.jffs2 -e16384 -b -p -v -d /root/ -o /tmp/root.jffs2.image
>
> Copying the image to the NAND.
>
> > root$ fcp -v /tmp/root.jffs2.image /dev/mtd0
> > Erasing blocks: 33/33 (100%)
> > Writing data: 528k/528k (100%)
> > Verifying data: 20k/528k (3%)File does not seem to match flash data. 
> First mismatch at 0x00002800-0x00005000
>
> We have the first warning that something is amiss.
> Still no warning or error at syslog.
>
> Now things get interesting...
>
> > root$ mount -t jffs2 /dev/mtdblock0 /mnt/
>
> Mount takes 30 seconds to finish, and during that time the board does not
> respond to any external stimulus. This is caused I believe from the 
> scaning
> of the NAND, which I take it is normal.
>
> The contents of the files match what was written to the image.
>
> But when I try to write by copying a small file the write fails
> and I get the following to the syslog.
>
> nand_write_page: Failed write verify, page 0x0000040b <5>Write of 68 
> bytes at 0x00081774 failed. returned -5, retlen 0
> Mar 10 21:44:22 netvia-ppc kernel: Not marking the space at 0x00081774 
> as dirty because the flash driver returned retlen zero
>
> Any ideas how to proceed?
>
> Regards
>
> Pantelis
>
>
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>
>
I hate to reply to myself, but the problem appears to be the NAND verify
code. When I removed it everything works fine. Should I be worried though?

Regards

Pantelis





More information about the linux-mtd mailing list