From apgmoorthi@hotmail.com Thu Aug 21 10:17:13 2008
Received: from blu0-omc1-s4.blu0.hotmail.com ([65.55.116.15])
	by stoneboat.aleph1.co.uk with esmtp (Exim 4.63)
	(envelope-from <apgmoorthi@hotmail.com>) id 1KW6Hn-0001fB-W9
	for yaffs@lists.aleph1.co.uk; Thu, 21 Aug 2008 10:17:13 +0100
Received: from BLU149-W9 ([65.55.116.9]) by blu0-omc1-s4.blu0.hotmail.com with
	Microsoft SMTPSVC(6.0.3790.3959); Thu, 21 Aug 2008 02:16:49 -0700
Message-ID: <BLU149-W9ABCB3692CEAC56915DF0D36B0@phx.gbl>
Content-Type: multipart/alternative;
	boundary="_bcad3f33-f265-48ac-afd0-dbdab41ad960_"
X-Originating-IP: [203.78.214.150]
From: Gangheya moorthy <apgmoorthi@hotmail.com>
To: <yaffs@lists.aleph1.co.uk>
Date: Thu, 21 Aug 2008 14:46:50 +0530
Importance: Normal
In-Reply-To: <mailman.1.1219143607.31048.yaffs@lists.aleph1.co.uk>
References: <mailman.1.1219143607.31048.yaffs@lists.aleph1.co.uk>
MIME-Version: 1.0
X-OriginalArrivalTime: 21 Aug 2008 09:16:49.0757 (UTC)
	FILETIME=[A47AD8D0:01C9036E]
X-SA-Exim-Connect-IP: 65.55.116.15
X-SA-Exim-Mail-From: apgmoorthi@hotmail.com
X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on
	stoneboat.aleph1.co.uk
X-Spam-Level: 
X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,HTML_MESSAGE,
	SPF_PASS autolearn=ham version=3.2.3
X-SA-Exim-Version: 4.2.1 (built Tue, 09 Jan 2007 17:23:22 +0000)
X-SA-Exim-Scanned: Yes (on stoneboat.aleph1.co.uk)
Subject: [Yaffs] Re : Re: Yaffs2 and MLC NAND with Block size 256K
X-BeenThere: yaffs@lists.aleph1.co.uk
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Discussion of YAFFS NAND flash filesystem <yaffs.lists.aleph1.co.uk>
List-Unsubscribe: <http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs>, 
	<mailto:yaffs-request@lists.aleph1.co.uk?subject=unsubscribe>
List-Archive: <http://lists.aleph1.co.uk/lurker/list/yaffs.html>
List-Post: <mailto:yaffs@lists.aleph1.co.uk>
List-Help: <mailto:yaffs-request@lists.aleph1.co.uk?subject=help>
List-Subscribe: <http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs>,
	<mailto:yaffs-request@lists.aleph1.co.uk?subject=subscribe>
X-List-Received-Date: Thu, 21 Aug 2008 09:17:13 -0000

--_bcad3f33-f265-48ac-afd0-dbdab41ad960_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


Hi Amol=2C
=20
 I have seen the latest Yaffs2 code  =2C As you said
=20
 I guess =2C
=20
  dev->nChunksPerBlock =3D mtd->erasesize / mtd->writesize=3B
=20
                    will  override
  =20
   dev->nChunksPerBlock =3D YAFFS_CHUNKS_PER_BLOCK
=20
 in YAFFS2.
=20
=20
With Regards
  Moorthy
=20
 > From: yaffs-request@lists.aleph1.co.uk> Subject: yaffs Digest=2C Vol 39=
=2C Issue 9> To: yaffs@lists.aleph1.co.uk> Date: Tue=2C 19 Aug 2008 12:00:0=
7 +0100> > Send yaffs mailing list submissions to> yaffs@lists.aleph1.co.uk=
> > To subscribe or unsubscribe via the World Wide Web=2C visit> http://lis=
ts.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs> or=2C via email=2C send a m=
essage with subject or body 'help' to> yaffs-request@lists.aleph1.co.uk> > =
You can reach the person managing the list at> yaffs-owner@lists.aleph1.co.=
uk> > When replying=2C please edit your Subject line so it is more specific=
> than "Re: Contents of yaffs digest..."> > > Today's Topics:> > 1. yaffs_t=
agscompat aliasing problem (James Kehl)> 2. Yaffs2 and MLC NAND with Block =
size 256K (Amol Lad)> 3. Re: Yaffs2 and MLC NAND with Block size 256K (Jame=
s Kehl)> 4. notification about data error during read (Evgeny Habinsky)> 5.=
 Can't open files under "/" (Evgeny Habinsky)> 6. Re: Yaffs2 and MLC NAND w=
ith Block size 256K (Amol Lad)> > > ---------------------------------------=
-------------------------------> > Message: 1> Date: Tue=2C 19 Aug 2008 16:=
11:11 +1000> From: "James Kehl" <jamesk@edmi.com.au>> Subject: [Yaffs] yaff=
s_tagscompat aliasing problem> To: <yaffs@lists.aleph1.co.uk>> Message-ID:>=
 <DA07ABAEC04C914DB72E4885251CCF8AB474A2@MERCURY.edmi.local>> Content-Type:=
 text/plain=3B charset=3D"us-ascii"> > Hi all=2C> > The Yaffs1 tag ECC rout=
ine runs into aliasing problems when I compile it> with ARM GCC (CodeSource=
ry 2008q1-126)=2C and causes the check routine to> flip random bits. I atta=
ch a fix (a slightly cleaner fix than> -fno-strict-aliasing!)> > There are =
some other problems with the yaffs1 tag ECC: it can't cope> with a single b=
it error in the ECC data itself (it either causes> miscorrections=2C or mak=
es the check routine return -1)=2C and it only ever> uses 7 bits out of the=
 12 provided for ECC. Yaffs2 probably doesn't have> these problems=2C and I=
 think Yaffs1 folk wouldn't want backwards> compatibility broken=2C so thes=
e remain unfixed :)> > (This is unrelated to the problems I was seeing unde=
r mingw=2C btw)> > James> -------------- next part --------------> A non-te=
xt attachment was scrubbed...> Name: yaffs_tagscompat-aliasing.patch> Type:=
 application/octet-stream> Size: 826 bytes> Desc: yaffs_tagscompat-aliasing=
.patch> Url : http://lists.aleph1.co.uk/lurker/list/yaffs.html/attachments/=
20080819/75d129ff/attachment.obj > > ------------------------------> > Mess=
age: 2> Date: Tue=2C 19 Aug 2008 11:57:58 +0530> From: "Amol Lad" <amol.lad=
@gmail.com>> Subject: [Yaffs] Yaffs2 and MLC NAND with Block size 256K> To:=
 yaffs@lists.aleph1.co.uk> Message-ID:> <8c675e9b0808182327g35cafc21k61b45f=
05b9f03901@mail.gmail.com>> Content-Type: text/plain=3B charset=3DISO-8859-=
1> > Hi=2C> > I'm using a year old snapshot of Yaffs2 cvs tree. I want to k=
now if> there are any assumptions about the block size for 2K page NAND. Fo=
r> example=2C Samsung K9F4G08U0A is SLC NAND with 2K page size and 128K> bl=
ock size. Samsung K9G4G08U0A is MLC NAND with 2K page size and 256K> block =
size (both have same device id - 0xDC)> > So=2C are there any assumptions a=
bout block size for 2K page ? or 256K> block size will work as is..> > >Fro=
m README-linux: "Block - Eraseable unit. 64 Pages. (128K on 2K> NAND=2C 32K=
 on 512b NAND)"> > Thanks> Amol> > > > ------------------------------> > Me=
ssage: 3> Date: Tue=2C 19 Aug 2008 17:04:56 +1000> From: "James Kehl" <jame=
sk@edmi.com.au>> Subject: Re: [Yaffs] Yaffs2 and MLC NAND with Block size 2=
56K> To: "Amol Lad" <amol.lad@gmail.com>=2C <yaffs@lists.aleph1.co.uk>> Mes=
sage-ID:> <DA07ABAEC04C914DB72E4885251CCF8AB474C3@MERCURY.edmi.local>> Cont=
ent-Type: text/plain=3B charset=3D"us-ascii"> > > -----Original Message----=
-> > From: yaffs-bounces@lists.aleph1.co.uk [mailto:yaffs-> > bounces@lists=
.aleph1.co.uk] On Behalf Of Amol Lad> > Sent: Tuesday=2C 19 August 2008 4:2=
8 PM> > To: yaffs@lists.aleph1.co.uk> > Subject: [Yaffs] Yaffs2 and MLC NAN=
D with Block size 256K> > > > Hi=2C> > > > I'm using a year old snapshot of=
 Yaffs2 cvs tree. I want to know if> > there are any assumptions about the =
block size for 2K page NAND. For> > example=2C Samsung K9F4G08U0A is SLC NA=
ND with 2K page size and 128K> > block size. Samsung K9G4G08U0A is MLC NAND=
 with 2K page size and 256K> > block size (both have same device id - 0xDC)=
> > > > So=2C are there any assumptions about block size for 2K page ? or 2=
56K> > block size will work as is..> > > > The define YAFFS_CHUNKS_PER_BLOC=
K (from yaffs_guts.h) might be what> you're looking for. That=2C or dev->nC=
hunksPerBlock if you're using> Yaffs-Direct.> > If you've got no way of kno=
wing whether it's a 128K block size or a 256K> block size=2C then you might=
 be best off telling Yaffs to use a 256K block> size=2C and tweaking your N=
AND driver to send two erase commands (so 128K> NAND will behave like 256K =
NAND).> > James> > > > > ------------------------------> > Message: 4> Date=
: Tue=2C 19 Aug 2008 10:59:11 +0300> From: "Evgeny Habinsky" <evgenyh@Surf-=
com.com>> Subject: [Yaffs] notification about data error during read> To: <=
yaffs@lists.aleph1.co.uk>> Message-ID:> <17E66600668C05419793F4C955966EF554=
25EA@everest_n.Surfdom.dom>> Content-Type: text/plain=3B charset=3D"us-asci=
i"> > Hi!> > I use YAFFS via direct interface.> > When YAFFS encounters unr=
ecoverable ECC error during file read it> retires the block but the applica=
tion gets no notification from the file> system that the file data is corru=
pted (except for printed error> message).> > One could pass such notificati=
on via global variable from directly from> yaffs_ReadChunkFromNAND() to app=
lication. I'd like to know how do you> deal with this problem or think it s=
hould be dealt with.> > Thanks.> -------------- next part --------------> A=
n HTML attachment was scrubbed...> URL: http://lists.aleph1.co.uk/lurker/li=
st/yaffs.html/attachments/20080819/62f0de4f/attachment.htm > > ------------=
------------------> > Message: 5> Date: Tue=2C 19 Aug 2008 11:00:54 +0300> =
From: "Evgeny Habinsky" <evgenyh@Surf-com.com>> Subject: [Yaffs] Can't open=
 files under "/"> To: <yaffs@lists.aleph1.co.uk>> Message-ID:> <17E66600668=
C05419793F4C955966EF55425EB@everest_n.Surfdom.dom>> Content-Type: text/plai=
n=3B charset=3D"us-ascii"> > I found that after upgrading to the latest ver=
sion of YAFFS I'm no> longer able to create files in root directory. My fla=
sh is mounted as> "/" and it seems like yaffsfs_FindDevice() does not allow=
 to open files> directly under "/".> > I am trying to open /testfile for wr=
iting. Before matching the file> prefix to YAFFS device prefix yaffsfs_Find=
Device() strips leading> slashes from both file name and the device prefix.=
 This means it will> try to match "testfile" to "\0" which fails. > > Was t=
his change introduced intentionally to prevent mounting under root?> > Rega=
rds> Evgeny Habinsky> > > > ------------------------------> > Message: 6> D=
ate: Tue=2C 19 Aug 2008 14:03:33 +0530> From: "Amol Lad" <amol.lad@gmail.co=
m>> Subject: Re: [Yaffs] Yaffs2 and MLC NAND with Block size 256K> To: "Jam=
es Kehl" <jamesk@edmi.com.au>> Cc: yaffs@lists.aleph1.co.uk> Message-ID:> <=
8c675e9b0808190133o2fa8ca1dw9b79294463faf33d@mail.gmail.com>> Content-Type:=
 text/plain=3B charset=3DISO-8859-1> > >> So=2C are there any assumptions a=
bout block size for 2K page ? or 256K> >> block size will work as is..> >>>=
 >> > The define YAFFS_CHUNKS_PER_BLOCK (from yaffs_guts.h) might be what> =
> you're looking for. That=2C or dev->nChunksPerBlock if you're using> > Ya=
ffs-Direct.> >> > If you've got no way of knowing whether it's a 128K block=
 size or a 256K> > block size=2C then you might be best off telling Yaffs t=
o use a 256K block> > size=2C and tweaking your NAND driver to send two era=
se commands (so 128K> > NAND will behave like 256K NAND).> > It seems for y=
affs2=2C these parameters are not set using #defines but> from mtd. Please =
see below snippet.> > yaffs_fs.c:> > if (yaffsVersion =3D=3D 2) {> ....> ..=
..> #if (LINUX_VERSION_CODE > KERNEL_VERSION(2=2C6=2C17))> dev->nDataBytesP=
erChunk =3D mtd->writesize=3B> dev->nChunksPerBlock =3D mtd->erasesize / mt=
d->writesize=3B> #else> dev->nDataBytesPerChunk =3D mtd->oobblock=3B> dev->=
nChunksPerBlock =3D mtd->erasesize / mtd->oobblock=3B> #endif> nBlocks =3D =
mtd->size / mtd->erasesize=3B> > dev->startBlock =3D 0=3B> dev->endBlock =
=3D nBlocks - 1=3B> > So are above the only parameters ? or some other plac=
e also I need to verify.> > >> > James> > Thanks> Amol> > > > -------------=
-----------------> > _______________________________________________> yaffs=
 mailing list> yaffs@lists.aleph1.co.uk> http://lists.aleph1.co.uk/cgi-bin/=
mailman/listinfo/yaffs> > > End of yaffs Digest=2C Vol 39=2C Issue 9> *****=
*******************************
_________________________________________________________________
Searching for the best deals on travel? Visit MSN Travel.
http://msn.coxandkings.co.in/cnk/cnk.do=

--_bcad3f33-f265-48ac-afd0-dbdab41ad960_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<style>
.hmmessage P
{
margin:0px=3B
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt=3B
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class=3D'hmmessage'>
<FONT color=3D#000000>Hi Amol=2C</FONT><BR>
<FONT color=3D#000000></FONT>&nbsp=3B<BR>
<FONT color=3D#000000>&nbsp=3BI have seen the latest Yaffs2 code&nbsp=3B =
=2C As you said</FONT><BR>
<FONT color=3D#000000>&nbsp=3B</FONT><BR>
<FONT color=3D#000000>&nbsp=3BI guess =2C</FONT><BR>
<FONT color=3D#000000></FONT>&nbsp=3B<BR>
<FONT face=3DArial><FONT color=3D#000000>&nbsp=3B dev-&gt=3BnChunksPerBlock=
 =3D mtd-&gt=3Berasesize / mtd-&gt=3Bwritesize=3B<?xml:namespace prefix =3D=
 o ns =3D "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></F=
ONT><BR>
<P class=3DMsoNormal><FONT color=3D#000000 size=3D2><SPAN style=3D"FONT-SIZ=
E: 10pt=3B COLOR: navy=3B FONT-FAMILY: Arial"><o:p>&nbsp=3B</o:p></SPAN></F=
ONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN style=3D"FONT-SIZE: =
10pt=3B COLOR: navy=3B FONT-FAMILY: Arial"><FONT color=3D#000000>&nbsp=3B&n=
bsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=
=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B will&nb=
sp=3B override</FONT></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN style=3D"FONT-SIZE: =
10pt=3B COLOR: navy=3B FONT-FAMILY: Arial"><FONT color=3D#000000>&nbsp=3B&n=
bsp=3B <o:p></o:p></FONT></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN style=3D"FONT-SIZE: =
10pt=3B COLOR: navy=3B FONT-FAMILY: Arial"><FONT color=3D#000000>&nbsp=3B&n=
bsp=3B dev-&gt=3BnChunksPerBlock =3D YAFFS_CHUNKS_PER_BLOCK<o:p></o:p></FON=
T></SPAN></FONT></P>
<FONT color=3D#000000></FONT>&nbsp=3B<BR>
<FONT color=3D#000000>&nbsp=3Bin YAFFS2.</FONT><BR>
<FONT color=3D#000000></FONT>&nbsp=3B<BR>
<FONT color=3D#000000></FONT>&nbsp=3B<BR>
<FONT color=3D#000000>With Regards</FONT><BR>
<FONT color=3D#000000>&nbsp=3B&nbsp=3BMoorthy</FONT><BR>
&nbsp=3B<BR>
&nbsp=3B<BR><BR>&gt=3B From: yaffs-request@lists.aleph1.co.uk<BR>&gt=3B Sub=
ject: yaffs Digest=2C Vol 39=2C Issue 9<BR>&gt=3B To: yaffs@lists.aleph1.co=
.uk<BR>&gt=3B Date: Tue=2C 19 Aug 2008 12:00:07 +0100<BR>&gt=3B <BR>&gt=3B =
Send yaffs mailing list submissions to<BR>&gt=3B yaffs@lists.aleph1.co.uk<B=
R>&gt=3B <BR>&gt=3B To subscribe or unsubscribe via the World Wide Web=2C v=
isit<BR>&gt=3B http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs<BR>=
&gt=3B or=2C via email=2C send a message with subject or body 'help' to<BR>=
&gt=3B yaffs-request@lists.aleph1.co.uk<BR>&gt=3B <BR>&gt=3B You can reach =
the person managing the list at<BR>&gt=3B yaffs-owner@lists.aleph1.co.uk<BR=
>&gt=3B <BR>&gt=3B When replying=2C please edit your Subject line so it is =
more specific<BR>&gt=3B than "Re: Contents of yaffs digest..."<BR>&gt=3B <B=
R>&gt=3B <BR>&gt=3B Today's Topics:<BR>&gt=3B <BR>&gt=3B 1. yaffs_tagscompa=
t aliasing problem (James Kehl)<BR>&gt=3B 2. Yaffs2 and MLC NAND with Block=
 size 256K (Amol Lad)<BR>&gt=3B 3. Re: Yaffs2 and MLC NAND with Block size =
256K (James Kehl)<BR>&gt=3B 4. notification about data error during read (E=
vgeny Habinsky)<BR>&gt=3B 5. Can't open files under "/" (Evgeny Habinsky)<B=
R>&gt=3B 6. Re: Yaffs2 and MLC NAND with Block size 256K (Amol Lad)<BR>&gt=
=3B <BR>&gt=3B <BR>&gt=3B -------------------------------------------------=
---------------------<BR>&gt=3B <BR>&gt=3B Message: 1<BR>&gt=3B Date: Tue=
=2C 19 Aug 2008 16:11:11 +1000<BR>&gt=3B From: "James Kehl" &lt=3Bjamesk@ed=
mi.com.au&gt=3B<BR>&gt=3B Subject: [Yaffs] yaffs_tagscompat aliasing proble=
m<BR>&gt=3B To: &lt=3Byaffs@lists.aleph1.co.uk&gt=3B<BR>&gt=3B Message-ID:<=
BR>&gt=3B &lt=3BDA07ABAEC04C914DB72E4885251CCF8AB474A2@MERCURY.edmi.local&g=
t=3B<BR>&gt=3B Content-Type: text/plain=3B charset=3D"us-ascii"<BR>&gt=3B <=
BR>&gt=3B Hi all=2C<BR>&gt=3B <BR>&gt=3B The Yaffs1 tag ECC routine runs in=
to aliasing problems when I compile it<BR>&gt=3B with ARM GCC (CodeSourcery=
 2008q1-126)=2C and causes the check routine to<BR>&gt=3B flip random bits.=
 I attach a fix (a slightly cleaner fix than<BR>&gt=3B -fno-strict-aliasing=
!)<BR>&gt=3B <BR>&gt=3B There are some other problems with the yaffs1 tag E=
CC: it can't cope<BR>&gt=3B with a single bit error in the ECC data itself =
(it either causes<BR>&gt=3B miscorrections=2C or makes the check routine re=
turn -1)=2C and it only ever<BR>&gt=3B uses 7 bits out of the 12 provided f=
or ECC. Yaffs2 probably doesn't have<BR>&gt=3B these problems=2C and I thin=
k Yaffs1 folk wouldn't want backwards<BR>&gt=3B compatibility broken=2C so =
these remain unfixed :)<BR>&gt=3B <BR>&gt=3B (This is unrelated to the prob=
lems I was seeing under mingw=2C btw)<BR>&gt=3B <BR>&gt=3B James<BR>&gt=3B =
-------------- next part --------------<BR>&gt=3B A non-text attachment was=
 scrubbed...<BR>&gt=3B Name: yaffs_tagscompat-aliasing.patch<BR>&gt=3B Type=
: application/octet-stream<BR>&gt=3B Size: 826 bytes<BR>&gt=3B Desc: yaffs_=
tagscompat-aliasing.patch<BR>&gt=3B Url : http://lists.aleph1.co.uk/lurker/=
list/yaffs.html/attachments/20080819/75d129ff/attachment.obj <BR>&gt=3B <BR=
>&gt=3B ------------------------------<BR>&gt=3B <BR>&gt=3B Message: 2<BR>&=
gt=3B Date: Tue=2C 19 Aug 2008 11:57:58 +0530<BR>&gt=3B From: "Amol Lad" &l=
t=3Bamol.lad@gmail.com&gt=3B<BR>&gt=3B Subject: [Yaffs] Yaffs2 and MLC NAND=
 with Block size 256K<BR>&gt=3B To: yaffs@lists.aleph1.co.uk<BR>&gt=3B Mess=
age-ID:<BR>&gt=3B &lt=3B8c675e9b0808182327g35cafc21k61b45f05b9f03901@mail.g=
mail.com&gt=3B<BR>&gt=3B Content-Type: text/plain=3B charset=3DISO-8859-1<B=
R>&gt=3B <BR>&gt=3B Hi=2C<BR>&gt=3B <BR>&gt=3B I'm using a year old snapsho=
t of Yaffs2 cvs tree. I want to know if<BR>&gt=3B there are any assumptions=
 about the block size for 2K page NAND. For<BR>&gt=3B example=2C Samsung K9=
F4G08U0A is SLC NAND with 2K page size and 128K<BR>&gt=3B block size. Samsu=
ng K9G4G08U0A is MLC NAND with 2K page size and 256K<BR>&gt=3B block size (=
both have same device id - 0xDC)<BR>&gt=3B <BR>&gt=3B So=2C are there any a=
ssumptions about block size for 2K page ? or 256K<BR>&gt=3B block size will=
 work as is..<BR>&gt=3B <BR>&gt=3B &gt=3BFrom README-linux: "Block - Erasea=
ble unit. 64 Pages. (128K on 2K<BR>&gt=3B NAND=2C 32K on 512b NAND)"<BR>&gt=
=3B <BR>&gt=3B Thanks<BR>&gt=3B Amol<BR>&gt=3B <BR>&gt=3B <BR>&gt=3B <BR>&g=
t=3B ------------------------------<BR>&gt=3B <BR>&gt=3B Message: 3<BR>&gt=
=3B Date: Tue=2C 19 Aug 2008 17:04:56 +1000<BR>&gt=3B From: "James Kehl" &l=
t=3Bjamesk@edmi.com.au&gt=3B<BR>&gt=3B Subject: Re: [Yaffs] Yaffs2 and MLC =
NAND with Block size 256K<BR>&gt=3B To: "Amol Lad" &lt=3Bamol.lad@gmail.com=
&gt=3B=2C &lt=3Byaffs@lists.aleph1.co.uk&gt=3B<BR>&gt=3B Message-ID:<BR>&gt=
=3B &lt=3BDA07ABAEC04C914DB72E4885251CCF8AB474C3@MERCURY.edmi.local&gt=3B<B=
R>&gt=3B Content-Type: text/plain=3B charset=3D"us-ascii"<BR>&gt=3B <BR>&gt=
=3B &gt=3B -----Original Message-----<BR>&gt=3B &gt=3B From: yaffs-bounces@=
lists.aleph1.co.uk [mailto:yaffs-<BR>&gt=3B &gt=3B bounces@lists.aleph1.co.=
uk] On Behalf Of Amol Lad<BR>&gt=3B &gt=3B Sent: Tuesday=2C 19 August 2008 =
4:28 PM<BR>&gt=3B &gt=3B To: yaffs@lists.aleph1.co.uk<BR>&gt=3B &gt=3B Subj=
ect: [Yaffs] Yaffs2 and MLC NAND with Block size 256K<BR>&gt=3B &gt=3B <BR>=
&gt=3B &gt=3B Hi=2C<BR>&gt=3B &gt=3B <BR>&gt=3B &gt=3B I'm using a year old=
 snapshot of Yaffs2 cvs tree. I want to know if<BR>&gt=3B &gt=3B there are =
any assumptions about the block size for 2K page NAND. For<BR>&gt=3B &gt=3B=
 example=2C Samsung K9F4G08U0A is SLC NAND with 2K page size and 128K<BR>&g=
t=3B &gt=3B block size. Samsung K9G4G08U0A is MLC NAND with 2K page size an=
d 256K<BR>&gt=3B &gt=3B block size (both have same device id - 0xDC)<BR>&gt=
=3B &gt=3B <BR>&gt=3B &gt=3B So=2C are there any assumptions about block si=
ze for 2K page ? or 256K<BR>&gt=3B &gt=3B block size will work as is..<BR>&=
gt=3B &gt=3B <BR>&gt=3B <BR>&gt=3B The define YAFFS_CHUNKS_PER_BLOCK (from =
yaffs_guts.h) might be what<BR>&gt=3B you're looking for. That=2C or dev-&g=
t=3BnChunksPerBlock if you're using<BR>&gt=3B Yaffs-Direct.<BR>&gt=3B <BR>&=
gt=3B If you've got no way of knowing whether it's a 128K block size or a 2=
56K<BR>&gt=3B block size=2C then you might be best off telling Yaffs to use=
 a 256K block<BR>&gt=3B size=2C and tweaking your NAND driver to send two e=
rase commands (so 128K<BR>&gt=3B NAND will behave like 256K NAND).<BR>&gt=
=3B <BR>&gt=3B James<BR>&gt=3B <BR>&gt=3B <BR>&gt=3B <BR>&gt=3B <BR>&gt=3B =
------------------------------<BR>&gt=3B <BR>&gt=3B Message: 4<BR>&gt=3B Da=
te: Tue=2C 19 Aug 2008 10:59:11 +0300<BR>&gt=3B From: "Evgeny Habinsky" &lt=
=3Bevgenyh@Surf-com.com&gt=3B<BR>&gt=3B Subject: [Yaffs] notification about=
 data error during read<BR>&gt=3B To: &lt=3Byaffs@lists.aleph1.co.uk&gt=3B<=
BR>&gt=3B Message-ID:<BR>&gt=3B &lt=3B17E66600668C05419793F4C955966EF55425E=
A@everest_n.Surfdom.dom&gt=3B<BR>&gt=3B Content-Type: text/plain=3B charset=
=3D"us-ascii"<BR>&gt=3B <BR>&gt=3B Hi!<BR>&gt=3B <BR>&gt=3B I use YAFFS via=
 direct interface.<BR>&gt=3B <BR>&gt=3B When YAFFS encounters unrecoverable=
 ECC error during file read it<BR>&gt=3B retires the block but the applicat=
ion gets no notification from the file<BR>&gt=3B system that the file data =
is corrupted (except for printed error<BR>&gt=3B message).<BR>&gt=3B <BR>&g=
t=3B One could pass such notification via global variable from directly fro=
m<BR>&gt=3B yaffs_ReadChunkFromNAND() to application. I'd like to know how =
do you<BR>&gt=3B deal with this problem or think it should be dealt with.<B=
R>&gt=3B <BR>&gt=3B Thanks.<BR>&gt=3B -------------- next part ------------=
--<BR>&gt=3B An HTML attachment was scrubbed...<BR>&gt=3B URL: http://lists=
.aleph1.co.uk/lurker/list/yaffs.html/attachments/20080819/62f0de4f/attachme=
nt.htm <BR>&gt=3B <BR>&gt=3B ------------------------------<BR>&gt=3B <BR>&=
gt=3B Message: 5<BR>&gt=3B Date: Tue=2C 19 Aug 2008 11:00:54 +0300<BR>&gt=
=3B From: "Evgeny Habinsky" &lt=3Bevgenyh@Surf-com.com&gt=3B<BR>&gt=3B Subj=
ect: [Yaffs] Can't open files under "/"<BR>&gt=3B To: &lt=3Byaffs@lists.ale=
ph1.co.uk&gt=3B<BR>&gt=3B Message-ID:<BR>&gt=3B &lt=3B17E66600668C05419793F=
4C955966EF55425EB@everest_n.Surfdom.dom&gt=3B<BR>&gt=3B Content-Type: text/=
plain=3B charset=3D"us-ascii"<BR>&gt=3B <BR>&gt=3B I found that after upgra=
ding to the latest version of YAFFS I'm no<BR>&gt=3B longer able to create =
files in root directory. My flash is mounted as<BR>&gt=3B "/" and it seems =
like yaffsfs_FindDevice() does not allow to open files<BR>&gt=3B directly u=
nder "/".<BR>&gt=3B <BR>&gt=3B I am trying to open /testfile for writing. B=
efore matching the file<BR>&gt=3B prefix to YAFFS device prefix yaffsfs_Fin=
dDevice() strips leading<BR>&gt=3B slashes from both file name and the devi=
ce prefix. This means it will<BR>&gt=3B try to match "testfile" to "\0" whi=
ch fails. <BR>&gt=3B <BR>&gt=3B Was this change introduced intentionally to=
 prevent mounting under root?<BR>&gt=3B <BR>&gt=3B Regards<BR>&gt=3B Evgeny=
 Habinsky<BR>&gt=3B <BR>&gt=3B <BR>&gt=3B <BR>&gt=3B ----------------------=
--------<BR>&gt=3B <BR>&gt=3B Message: 6<BR>&gt=3B Date: Tue=2C 19 Aug 2008=
 14:03:33 +0530<BR>&gt=3B From: "Amol Lad" &lt=3Bamol.lad@gmail.com&gt=3B<B=
R>&gt=3B Subject: Re: [Yaffs] Yaffs2 and MLC NAND with Block size 256K<BR>&=
gt=3B To: "James Kehl" &lt=3Bjamesk@edmi.com.au&gt=3B<BR>&gt=3B Cc: yaffs@l=
ists.aleph1.co.uk<BR>&gt=3B Message-ID:<BR>&gt=3B &lt=3B8c675e9b0808190133o=
2fa8ca1dw9b79294463faf33d@mail.gmail.com&gt=3B<BR>&gt=3B Content-Type: text=
/plain=3B charset=3DISO-8859-1<BR>&gt=3B <BR>&gt=3B &gt=3B&gt=3B So=2C are =
there any assumptions about block size for 2K page ? or 256K<BR>&gt=3B &gt=
=3B&gt=3B block size will work as is..<BR>&gt=3B &gt=3B&gt=3B<BR>&gt=3B &gt=
=3B<BR>&gt=3B &gt=3B The define YAFFS_CHUNKS_PER_BLOCK (from yaffs_guts.h) =
might be what<BR>&gt=3B &gt=3B you're looking for. That=2C or dev-&gt=3BnCh=
unksPerBlock if you're using<BR>&gt=3B &gt=3B Yaffs-Direct.<BR>&gt=3B &gt=
=3B<BR>&gt=3B &gt=3B If you've got no way of knowing whether it's a 128K bl=
ock size or a 256K<BR>&gt=3B &gt=3B block size=2C then you might be best of=
f telling Yaffs to use a 256K block<BR>&gt=3B &gt=3B size=2C and tweaking y=
our NAND driver to send two erase commands (so 128K<BR>&gt=3B &gt=3B NAND w=
ill behave like 256K NAND).<BR>&gt=3B <BR>&gt=3B It seems for yaffs2=2C the=
se parameters are not set using #defines but<BR>&gt=3B from mtd. Please see=
 below snippet.<BR>&gt=3B <BR>&gt=3B yaffs_fs.c:<BR>&gt=3B <BR>&gt=3B if (y=
affsVersion =3D=3D 2) {<BR>&gt=3B ....<BR>&gt=3B ....<BR>&gt=3B #if (LINUX_=
VERSION_CODE &gt=3B KERNEL_VERSION(2=2C6=2C17))<BR>&gt=3B dev-&gt=3BnDataBy=
tesPerChunk =3D mtd-&gt=3Bwritesize=3B<BR>&gt=3B dev-&gt=3BnChunksPerBlock =
=3D mtd-&gt=3Berasesize / mtd-&gt=3Bwritesize=3B<BR>&gt=3B #else<BR>&gt=3B =
dev-&gt=3BnDataBytesPerChunk =3D mtd-&gt=3Boobblock=3B<BR>&gt=3B dev-&gt=3B=
nChunksPerBlock =3D mtd-&gt=3Berasesize / mtd-&gt=3Boobblock=3B<BR>&gt=3B #=
endif<BR>&gt=3B nBlocks =3D mtd-&gt=3Bsize / mtd-&gt=3Berasesize=3B<BR>&gt=
=3B <BR>&gt=3B dev-&gt=3BstartBlock =3D 0=3B<BR>&gt=3B dev-&gt=3BendBlock =
=3D nBlocks - 1=3B<BR>&gt=3B <BR>&gt=3B So are above the only parameters ? =
or some other place also I need to verify.<BR>&gt=3B <BR>&gt=3B &gt=3B<BR>&=
gt=3B &gt=3B James<BR>&gt=3B <BR>&gt=3B Thanks<BR>&gt=3B Amol<BR>&gt=3B <BR=
>&gt=3B <BR>&gt=3B <BR>&gt=3B ------------------------------<BR>&gt=3B <BR>=
&gt=3B _______________________________________________<BR>&gt=3B yaffs mail=
ing list<BR>&gt=3B yaffs@lists.aleph1.co.uk<BR>&gt=3B http://lists.aleph1.c=
o.uk/cgi-bin/mailman/listinfo/yaffs<BR>&gt=3B <BR>&gt=3B <BR>&gt=3B End of =
yaffs Digest=2C Vol 39=2C Issue 9<BR>&gt=3B *******************************=
*****<BR><BR><br /><hr />Do you have a You@live.in id yet? Get it now. Sign=
 up for a Windows Live ID <a href=3D'http://ss1.richmedia.in/recurl.asp?pid=
=3D531' target=3D'_new'>Try it!</a></body>
</html>=

--_bcad3f33-f265-48ac-afd0-dbdab41ad960_--

