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

Reggiani, Adamo areggiani@ferrari.it
Fri, 16 Apr 2004 11:55:09 +0200


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=EC 16 aprile 2004 06.52
> To: yaffs
> Subject: bad block problem
>=20
>=20
> 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=20
> calculated &
> the ecc stored in oob
> and if it does not match  it marks the blcok bad. is this correct
>=20
> will yaffs do write verify(ie will it read back the page=20
> after write and
> check for ecc)?
>=20
>=20
> Regards
> sharath
>=20
> >
> > > Sharath
> > >
> > > I had exactly that problem a while back till I made sure=20
> that the ecc
> > connectivity between yaffs and mtd was working right.=20
> 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=20
> versions link fine
> of
> > course. There is also some potential for confusion with the=20
> yaffs and
> smart
> > media locations too.
> > >
> > > If it is *nearly* right then reads often seem ok but the=20
> block is marked
> > as bad and when the data is moved a bad block marker stops=20
> 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.=20
> For dev work I
> > stomp on this filter and accept any bad consequences.
> > >
> > > See http://62.49.201.250/balloon/ for sample linux source=20
> trees with
> yaffs
> > integration - new 2.4.25-vrs2-tcl1 added recently.
> > >
> > > Nick
> > >
> > > ----- Original Message -----
> > > From: "Skumar" <skumar@mistralsoftware.com>
> > > To: "yaffs" <yaffs@toby-churchill.org>
> > > Sent: Thursday, March 25, 2004 5:54 AM
> > > Subject: bad block problem
> > >
> > >
> > > > hin
> > > > i am working on s3c2410 processor using yaffs above mtd=20
> on NAND flash.
> > > > i am facing problem that sometimes the yaffs is marking=20
> 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
> > > >
> > > >
> > > >
> > >
> >
> >=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=20
> remove yourself
> > from the list by
> > > > sending an email to yaffs-request@toby-churchill.org=20
> with the text
> > "unsubscribe"
> > > > (without the quotes) as the subject.
> > > >
> > > >
> >=20
> =
=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=
=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=
=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF=FF
> =FF=FF=FF=D3?+&j)bz
> >
> =
b=B2=D8=AC?<-y=D6=F2N?=F2=1B=ABr=18=A5-S^z=CA=1F=B7=06=AB{=FC0=C3=FBho/=DC=
?=EA=DC?)e=FES=E0=FF=F2=1FT=A8=A5Sx%S=CBfzf=DE=AE=C8
> b=A6+'=A2Z'=81=EA=F0j{^w
> > =
*.q=A9=EBzj/{*.=AE=C7=A5}=FA=E8s=D8^-+-o+=1E=9D=D8=A7=81=A9=DET=A8=A5=B6O=
s}=FB=FF=AD=EA=AEz=CB=FF=B6?=F2=FD=C8n=AD=C8b-_=E8=AE
> > =
"=B6=1Baz=D7=B1=B7=FB=A7=B2=E6=ECr=B8>{=FF=F0S=D8h=BA=DBaz=AB=A8=B5=EB=FF=
j=CBaz=CB>=8D=E7-
> > >
> >
> >
>=20
>=20
>=20
> --------------------------------------------------------------
> -------------------------
> This mailing list is hosted by Toby Churchill open software=20
(www.toby-churchill.org).
If mailing list membership is no longer wanted you can remove yourself =
from the list by=20
sending an email to yaffs-request@toby-churchill.org with the text =
"unsubscribe"=20
(without the quotes) as the subject.=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.