Re: [Yaffs] Need help replacing yaffs1 by yaffs2

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Charles Manning
Date:  
To: Jacob Dall, yaffs
Subject: Re: [Yaffs] Need help replacing yaffs1 by yaffs2
On Saturday 11 December 2004 12:24, Jacob Dall wrote:
> Please, I need some help.
>
> I want to replace yaffs1 direct with yaffs2 direct, but I've some trouble.
>
> I've compiled the code with the CFLAGS as defined in the direct/makefile:
> CONFIG_YAFFS_DIRECT, CONFIG_YAFFS_SHORT_NAMES_IN_RAM and
> CONFIG_YAFFS_YAFFS2. I'm a bit in doubt about the last define - is it ok
> setting it when one wants to do what I want?
>
> I've completed a low-lewel check of the flash, using my implementation of
> the interface functions in direct/yaffs_flashif.c. The test is done by
> writing some well-known values to the data and spare area of each chunk,
> reading it back and verifying byte by byte. I do not allow any diffs. It
> runs to perfection - I get no errors at all.
>
> Now, starting up yaffs (of course I did erase all blocks after the
> low-level check was completed), mounting a device and opening, writing and
> closing some files, for each file I get some 'ecc error unfixed' notes, and
> a block is marked for retirement. I don't get that, taking into
> consideration that my previous test showed no issues at all.
>
> Digging into the code, I can't seem to locate the spot where data ecc is
> calculated (beyond some code not being active, either by #ifdef 0 or //).


In YAFFS2 the ecc tests have been moved out of yaffs_guts to make a better
partitioning of the file system from the NAND and ECC logic.

The ECC is done within the ReadChunkWithTags and WriteChunkWithTags functions.

If you use 512-byte pages (and yaffs1 mode compatabiliuty mode) then you
can use the tags compatability functions. These will call yaffs_ecc.c.

For 2kbyte pages etc, using full-blown yaffs2 mode, the ECC must be done in
the NAND layer. THis can be done using yaffs_ecc.c

>
> I tend to believe that what I want to achieve is either unsupported or
> untested. Am I right?


It is supported in a more flexible way. It just mean that ECC checking for 2k
pages should be done in the NAND access layer.

>
> Still, I don't get it - where is the data ecc supposed to be calculated?