Does the soft ecc mode of nandsim work?

Liu Hui onlyflyer at gmail.com
Tue Mar 16 03:44:18 EDT 2010


Hi,
I found nandsim use NAND_ECC_SOFT mode, but after I write sth. to the
nand page and read the oob of this page, I found the oob is full of
'0xFF'. In NAND_ECC_SOFT, mtd layer should write ECC to oob
automatically, but I can find nothing.

Here is the example code which run on nandsim:

    mtd->write(mtd, offs, len, &retlen, buf);

    oob = kmalloc(mtd->oobsize, GFP_KERNEL);
    memset(oob, 0, mtd->oobsize);
    ret = wnftl_read_oob_place(mtd, offs, mtd->oobsize, &retlen,
                                (uint8_t *)oob);
    if (wnftl_check_data_emtpy(oob, mtd->oobsize))
        {
        kfree(oob);
        BUG(); // the oob is always full of 'OxFF', so the code always run here.
        }

My kernel is 2.6.27, could you please give me some clues?

-- 
Thanks & Best Regards
Liu Hui
--



More information about the linux-mtd mailing list