[Yaffs] yaffs2 write ecc error

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
Delete this message
Reply to this message
Author: carlde@163.com
Date:  
To: yaffs
CC: cqdxlijie
Subject: [Yaffs] yaffs2 write ecc error


Hi ,

I have mips board au1200 with a Samsung K9f1208V 64MB NAND flash which
is 528bytes/page and nor flash with 32M. i have established a jffs2 filesystem as root filesystem
in nor flash with 32M ,my sytem is ok if only use nor flash . now i plan to mount nand flash under
jffs2 filesystem . I downloaded the newest yaffs2 code from "http://www.aleph1.co.uk/cgi-bin/viewcvs.cgi/yaffs"
and place it to linux kernel 2.6.11. I select yafss and mtd support from muneconfig. After make,
I got the error messages
at the end:

all of transport is passed

1. i boot my board using jffs2 filesystem as root filesystem 
 # cat /proc/mtd 
 dev:    size   erasesize  name
 mtd0: 03c00000 00020000 "User11 FS"
 mtd1: 00100000 00020000 "YAMON"
 mtd2: 002c0000 00020000 "raw kernel"
 mtd3: 00800000 00004000 "NAND FSa 0"
 mtd4: 03800000 00004000 "NAND FSa 1"


2. using the tools "flash_eraseall /dev/mtd6 ",passed

3. # mount -tyaffs /dev/mtdblock4 /mnt/
yaffs: dev is 32505860 name is "mtdblock4"
yaffs: Attempting MTD mount on 31.4, "mtdblock4"

4. then there are erros when copying  data to mnt's directory 
   the questions :
 when copy less 120k data , no errors,and the data is correct after i reboot 
 however , copying more 100k data ,there are the following errors:
 .........................................  
 **>>mtd ecc error unfixed on chunk 113984:0
 **>>mtd ecc error unfixed on chunk 113984:1
 **>>Block 3562 marked for retirement
 **>> yaffs chunk 114016 was not erased
 **>> Erasure failed 3563
 **>> Block 3563 retired
 ......
 **>> yaffs chunk 416 was not erased
 **>> Erasure failed 13
 ......
 yaffs tragedy: no more eraased blocks
 !!!!!!!!! Allocator out !!!!!!!!!!!!!!!!!
 ......
 **>>mtd ecc error unfixed on chunk 1375:0
 **>>mtd ecc error unfixed on chunk 1375:1
 **>>Block 42 marked for retirement
 yaffs tragedy: no more eraased blocks
 !!!!!!!!! Allocator out !!!!!!!!!!!!!!!!!
 .........................................  
 then i try to exc command "df"
 /mnt # df
 Filesystem           1k-blocks      Used Available Use% Mounted on
 /dev/mtdblock0           61440     27308     34132  44% /
 tmpfs                      512        60       452  12% /var
 /dev/loop1                1244      1244         0 100% /root/test
 /dev/mtdblock4           57344     57344         0 100% /mnt


 exc command  "reboot" 
 /mnt #df
 Filesystem           1k-blocks      Used Available Use% Mounted on
 /dev/mtdblock0           61440     27308     34132  44% /
 tmpfs                      512        60       452  12% /var
 /dev/loop1                1244      1244         0 100% /root/test
 /dev/mtdblock4           57344     57344         0 2% /mnt


why ...
what is somthing wrong ?


 according to some suggustion ,    I changed my oob placement as following :


  /* Define default oob placement schemes for large and small page devices */
static struct nand_oobinfo nand_oob_8 = {
        .useecc = MTD_NANDECC_AUTOPLACE,
        .eccbytes = 3,
        .eccpos = {0, 1, 2},
        .oobfree = { {3, 2}, {6, 2} }
};


static struct nand_oobinfo nand_oob_16 = {
        .useecc = MTD_NANDECC_AUTOPLACE,
        .eccbytes = 6,
        .eccpos = {0, 1, 2, 3, 6, 7},
        .oobfree = { {8, 8} }
};


static struct nand_oobinfo nand_oob_64 = {
        .useecc = MTD_NANDECC_AUTOPLACE,
        .eccbytes = 24,
        .eccpos = {
                40, 41, 42, 43, 44, 45, 46, 47,
                48, 49, 50, 51, 52, 53, 54, 55,
                56, 57, 58, 59, 60, 61, 62, 63},
        .oobfree = { {2, 38} }
};
 --------------------------------------------------------------------------


While oob placements definition in yaffs_mtdif.c

static struct nand_oobinfo yaffs_oobinfo = {
.useecc = 1,
.eccbytes = 6,
.eccpos = {8, 9, 10, 13, 14, 15}
};

then i change the struct " nand_oobinfo nand_oob_16" into
static struct nand_oobinfo nand_oob_16 = {
.useecc = 1,
.eccbytes = 6,
.eccpos = {8, 9, 10, 13, 14, 15},
};

but the errors is the same as before. Anyclues what
could be wrong ..
Any help will be highly appreciated.


regards

please help me out ...