Re: [Yaffs] Older yaffs bad block detection

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Andre Renaud
Date:  
To: ian
CC: yaffs
Subject: Re: [Yaffs] Older yaffs bad block detection
Kernel 2.6.20, so it is using the translate_spare2oob stuff. The problem
seems to be (from memory now, since I no longer have the old code in
place), that yaffs_tagsCompatabilityQueryNANDBlock, which in turn would
have called nandmtd_ReadChunkFromNAND, expected the bad block
information to be in there, but I don't think it is if you do an
MTD_OOB_AUTO read of the OOB.

File details (from older version)
    "$Id: yaffs_guts.c,v 1.49 2007-05-15 20:07:40 charles Exp $";
    "$Id: yaffs_mtdif.c,v 1.19 2007/02/14 01:09:06 wookey Exp $";


The OOB definition was the standard one, so nand_oob_16:
static struct nand_ecclayout nand_oob_16 = {
    .eccbytes = 6,
    .eccpos = {0, 1, 2, 3, 6, 7},
    .oobfree = {
        {.offset = 8,
         . length = 8}}
};


I believe when you do an MTD_OOB_AUTO read you just get back the bytes
in oobfree (as in from 8, length 8), meaning the bad block information
is not supplied (byte 6).

Andre

wrote:
> Andre,
>
> On Monday 17 September 2007 16:32, Andre Renaud wrote:
>> We were having some issues with a ~4 month old yaffs checkout,
>> where it would incorrectly think that blocks were bad. It
>> appeared as though it was using MTD_OOB_AUTO to read the OOB
>> tags, but then assuming that byte 5 of these contained the bad
>> block marker. This was all before the large patch which added
>> yaffs_mtdif1.c. Has anyone seen this issue in older versions -
>> was it a known bug?
>
> More details needed... MTD version, versions of the
> yaffs_mtd*.c files (see $Id in files, or use 'ident' command).
> I presume you have a small page device -- it has the bad-block
> marker at the 6th byte (so offset 5) of oob/space on the chip.
>
> What is your MTD nand_oobinfo definition? -- see MTD's
> nand_base.c source file, or perhaps your platform NAND mapping
> code.
>
> Do you know if your build of yaffs_mtd.c is using the
> translate_spare2oob() calls? -- depends on kernel version
> seen during Yaffs build.
>
> -imcd



--
Bluewater Systems Ltd - ARM Technology Solutions Centre

       Andre Renaud                             Bluewater Systems Ltd
Phone: +64 3 3779127 (Aus 1 800 148 751)        Level 17, 119 Armagh St
Fax:   +64 3 3779135                            PO Box 13889
Email:                  Christchurch
Web:   http://www.bluewatersys.com              New Zealand