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

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Reggiani, Adamo
Date:  
To: Skumar, yaffs
Subject: [Yaffs] [Yaffs-archive] RE: bad block problem
Hi Sharath,
by default Yaffs will do a write verify and also an erase verify before writing.
Check for CONFIG_YAFFS_DISABLE_WRITE_VERIFY and CONFIG_YAFFS_DISABLE_CHUNK_ERASED_CHECK defines on yaffs_guts.c file to see what's happen during such controls.
You'll find them in yaffs_WriteNewChunkToNAND function.

The Ecc check is done at read time (so also during write verify ;), search for it in yaffs_ReadChunkFromNAND; it can ben enabled/disabled setting dev->useNANDECC option or using the define CONFIG_YAFFS_USE_NANDECC (in this case will work only for the MTD layer).

The bad block marking isn't clear for me yet, since I can't find a 'real' block marking procedure (say writing some non-volatile infos somewhere), while it seems that yaffs simply discards chuncks that produce errors and retry with new ones until it can succeed in the requested operation.

I hope this info will be usefull.

Regards
Adamo


> -----Original Message-----
> From: Skumar [mailto:skumar@mistralsoftware.com]
> Sent: venerdì 16 aprile 2004 06.52
> To: yaffs
> Subject: bad block problem
>
>
> Hi,
> i want to know on what condition will yaffs mark a block bad?
> my assumption is when it does a page read & compares the ecc
> calculated &
> the ecc stored in oob
> and if it does not match it marks the blcok bad. is this correct
>
> will yaffs do write verify(ie will it read back the page
> after write and
> check for ecc)?
>
>
> Regards
> sharath
>
> >
> > > Sharath
> > >
> > > I had exactly that problem a while back till I made sure
> that the ecc
> > connectivity between yaffs and mtd was working right.
> Things like one mtd
> > layer being passed an integer indicating which oob style to use and
> another
> > being passed a pointer into an array of oob defs. Both
> versions link fine
> of
> > course. There is also some potential for confusion with the
> yaffs and
> smart
> > media locations too.
> > >
> > > If it is *nearly* right then reads often seem ok but the
> block is marked
> > as bad and when the data is moved a bad block marker stops
> reuse of the
> > block. Erasing the bad block marks is bad as this also removes the
> > manufacturer bad block marks and the mtd filters this out.
> For dev work I
> > stomp on this filter and accept any bad consequences.
> > >
> > > See http://62.49.201.250/balloon/ for sample linux source
> trees with
> yaffs
> > integration - new 2.4.25-vrs2-tcl1 added recently.
> > >
> > > Nick
> > >
> > > ----- Original Message -----
> > > From: "Skumar" <>
> > > To: "yaffs" <>
> > > Sent: Thursday, March 25, 2004 5:54 AM
> > > Subject: bad block problem
> > >
> > >
> > > > hin
> > > > i am working on s3c2410 processor using yaffs above mtd
> on NAND flash.
> > > > i am facing problem that sometimes the yaffs is marking
> all the blocks
> > as
> > > > bad & the yaffs partition becomes unusable.
> > > > i want to know if someone has faced this problem before.
> > > > i want to know whether to debug yaffs or mtd?
> > > >
> > > > Regards
> > > > sharath
> > > >
> > > >
> > > >
> > >
> >
> >
> --------------------------------------------------------------
> ------------
> > -------------
> > > > 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
> with the text
> > "unsubscribe"
> > > > (without the quotes) as the subject.
> > > >
> > > >
> >
> ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
> ÿÿÿÓ?+&j)bz
> >
> b²Ø¬?<-yÖòN?ò?«r?¥-S^zÊ?·?«{ü0Ãûho/Ü?êÜ?)eþSàÿò?T¨¥Sx%SËfzfÞ®È
> b¦+'¢Z'êðj{^w
> > *.q©ëzj/{*.®Ç¥}úèsØ^-+-o+?Ø§©ÞT¨¥¶Os}ûÿ­ê®zËÿ¶?òýÈn­Èb-_è®
> > "¶?az×±·û§²æìr¸>{ÿðSØhºÛaz«¨µëÿjËazË>ç-
> > >
> >
> >
>
>
>
> --------------------------------------------------------------
> -------------------------
> 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 with the text "unsubscribe"
(without the quotes) as the subject.


---------------------------------------------------------------------------------------
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 with the text "unsubscribe"
(without the quotes) as the subject.