Re: [Yaffs] YAFFS2 on LP NAND (still trying to make it work)

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Charles Manning
Date:  
To: yaffs
Subject: Re: [Yaffs] YAFFS2 on LP NAND (still trying to make it work)
On Wednesday 20 September 2006 06:20, Boris Deschenes wrote:


What is LP NAND?

> In the following trace, I flash_erase, mount, copy a file and unmount a
> partition, the write has trouble with 2 chunks and the resulting file is
> invalid (bad checksum). Sometimes, doing the exact same operation will
> result in a valid file.


All the problems you mention are almost 100% likely to be caused by tags
corruption in the NAND driver.:

* The most typical cause for writes failing the erased check is that the
scanning thought that the chunk was empty. This will normally happen because
the oob was not written correctly.

* Sometimes valid and sometimes invalid files suggest only some partial
corruption. This could be due to:
**) Some bit patterns get corrupted (eg. due to clashes with ECC bytes used in
the driver). THis means that some tags patterns will be corrupted and others
will not.
**) Read/write timing on the flash chips

* Do you have any write verification in the driver? That might help you spot
any problems caused by bad writes.


>
> I am also worried about the tags values listed in the unmount block.
>
>
>
> I should say that as of now, my low level driver does not pass any
> information about OOB to the MTD. Should my low level driver tells MTD how
> to handle OOB? I'm lost guys, if one of you can point me in the right
> direction that would be greatly appreciated.



This depends on how your driver is written and configured. You need walk
through the calling path and ensure that the byte placement is consistent and
that the driver is not using the same bytes for both ECC/ bad block marker
flags and data. AFAIK, Vitaly's patches should be handling this properly, but
it is always wise to walk through things on your hw/driver comination.

-- Charles