[Yaffs] [Yaffs-archive] RE: bad block problem

Reggiani, Adamo areggiani@ferrari.it
Mon, 19 Apr 2004 18:26:40 +0200


The last line:
> 200h:ff ff ff ff 00 00 ff ff ff ff ff ff ff ff ff ff=20
is the spare area (oob, redundancy, ...) and refers to yaffs_Spare =
structure (defined in yaffs:guts.h file).

// Spare structure
typedef struct
{
    __u8  tagByte0;
    __u8  tagByte1;
    __u8  tagByte2;
    __u8  tagByte3;
    __u8  pageStatus; 	// set to 0 to delete the chunk
    __u8  blockStatus;
    __u8  tagByte4;
    __u8  tagByte5;
    __u8  ecc1[3];
    __u8  tagByte6;
    __u8  tagByte7;
    __u8  ecc2[3];
} yaffs_Spare;

So the two 0x00 bytes are pageStatus and blockStatus.
pageStatus 0 means that the page is deleted (so ready to be used without =
a new erase command)
blockStatus 0 means that the block has been retired (marked bad) or is a =
factory marked block

>From what I can see from source code, the only way to have such values =
are:
- the Factory has marked this block bad (could happen on some =
devices/manufacturer)
- yaffs has marked this block with the function yaffs_RetireBlock

The second case (the only that depends on yaffs code) could happen if =
there's an erase error; the reason of this error could vary depending on =
your flash interface, noisy environment, EM, etc.

I suggest you to enable yaffs trace (search for #define T(x)) and look =
at debug message to better understand your fs operations.

I also suggest to erase all your flash memory before mounting yaffs =
because I can't really figure how it can menage a badly formatted chip =
(perhaps this is the real problem).

Just to know, what kind of flash device are you using?
What's the OS?

Regards
Adamo



> -----Original Message-----
> From: Skumar [mailto:skumar@mistralsoftware.com]
> Sent: luned=EC 19 aprile 2004 14.18
> To: yaffs
> Subject: bad block problem
>=20
>=20
> hi,
> has someone faced the problem where yaffs has marked many blocks bad?
> for me yaffs has marked almost 70% blocks bad.
> below i am attaching the data of page 0 of a block which is marked bad
> this is the data in the all pages of blocks which are marked bad
> notice the last row ***
>=20
> help needed
>=20
> Regards
> sharath
>=20
>  0h:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff=20
>  10h:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff=20
>  20h:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff=20
>  30h:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff=20
>  40h:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff=20
>  50h:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff=20
>  60h:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff=20
>  70h:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff=20
>  80h:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff=20
>  90h:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff=20
>  a0h:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff=20
>  b0h:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff=20
>  c0h:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff=20
>  d0h:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff=20
>  e0h:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff=20
>  f0h:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff=20
> 100h:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff=20
> 110h:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff=20
> 120h:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff=20
> 130h:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff=20
> 140h:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff=20
> 150h:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff=20
> 160h:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff=20
> 170h:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff=20
> 180h:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff=20
> 190h:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff=20
> 1a0h:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff=20
> 1b0h:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff=20
> 1c0h:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff=20
> 1d0h:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff=20
> 1e0h:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff=20
> 1f0h:ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff=20
> 200h:ff ff ff ff 00 00 ff ff ff ff ff ff ff ff ff ff=20
>=20
>=20


---------------------------------------------------------------------------------------
This mailing list is hosted by Toby Churchill open software (www.toby-churchill.org).
If mailing list membership is no longer wanted you can remove yourself from the list by 
sending an email to yaffs-request@toby-churchill.org with the text "unsubscribe" 
(without the quotes) as the subject.