[Yaffs] Older Linux (2.6.30)/YAFFS2/MTD/NAND and ECC

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
Delete this message
Reply to this message
Author: Brent Leever
Date:  
To: yaffs@lists.aleph1.co.uk
Subject: [Yaffs] Older Linux (2.6.30)/YAFFS2/MTD/NAND and ECC
Hi-

We're having some difficulty with file corruption using

YAFFS2
LINUX 2.6.30
MTD (stock (probably) )
NAND (we tweaked for out target)

( a flash resident file will suddenly flip a bit or two after R/W operations in other areas of flash,
a relatively rare occurrence, but a disaster when it happens )

We are using a MICRON NAND, LARGE PAGE, 8 bit wide, 4Gb, SLC

I suspect some incorrect ECC handling...

Is it possible these layers are stepping on each other in the OOB as far as ECC data is concerned? ( probably a yes.. )

If YAFFS2 is doing ECC, should we insure that MTD/NAND/HW are not? ( perhaps this is obviously a yes.. but
do you all think this may be happening? )

If using YAFFS2 and we have enough processor... is it preferable to simply have YAFFS2 do the ECC and
disable in all other areas of the FLASH SW STACK?

Does MTD have ECC on by default?
Does the HW default ECC on by default?

If these are on.. will YAFFS2 choke or will it recognize and let the lower layers do ECC stuff?
Does the flag use_nand_ecc below mean that YAFFS will NOT do ECC and rely on the lower layers?

What is the best setup here ?
What is the most expedient if we don't really care about performance.. we just need data integrity!

Also.. MTD is setup with USE_BBT if that matters.

Also.. YAFFS2 retires a HUGE amount of blocks on some boards ( 3 ECC errors = retire the block right? )...

/proc/yaffs output below.. (this is a well behaved board.. just wanted to share the YAFFS setup )

THANK YOU ALL!
-Brent




cat /proc/yaffs

-bash-3.00# cat /proc/yaffs
Multi-version YAFFS built:May 23 2012 15:15:53


Device 0 "AJA Flash Partition 1"
start_block.......... 0
end_block............ 4095
total_bytes_per_chunk 2048
use_nand_ecc......... 1
no_tags_ecc.......... 0
is_yaffs2............ 1
inband_tags.......... 0
empty_lost_n_found... 1
disable_lazy_load.... 0
refresh_period....... 500
n_caches............. 10
n_reserved_blocks.... 5
always_check_erased.. 0

max file size....... 549755811840
data_bytes_per_chunk. 2048
chunk_grp_bits....... 0
chunk_grp_size....... 1
n_erased_blocks...... 3186
blocks_in_checkpt.... 2

n_tnodes............. 1507
n_obj................ 181
n_free_chunks........ 241847

n_page_writes........ 6443
n_page_reads......... 7099
n_erasures........... 56
n_gc_copies.......... 346
all_gcs.............. 77
passive_gc_count..... 77
oldest_dirty_gc_count 0
n_gc_blocks.......... 21
bg_gcs............... 21
n_retried_writes..... 0
n_retired_blocks..... 0
n_ecc_fixed.......... 10
n_ecc_unfixed........ 2
n_tags_ecc_fixed..... 0
n_tags_ecc_unfixed... 0
cache_hits........... 0
n_deleted_files...... 0
n_unlinked_files..... 5
refresh_count........ 1
n_bg_deletions....... 0
tags_used............ 508
summary_used......... 53364