clean marker size for NOR w/ECC

Timofey Kutergin tkutergin at mail.ru
Wed Jun 22 08:51:20 EDT 2005


yes, I agree - eccsize is smallest write size. Or size of region which can be written only once after block erase. What I meant was that if eccsize is greater than cleanmarker size, JFFS2 does not skip rest of first ECC region in block and tries to write data to it. This causes write failure. Therefore patch sets clean marker size to eccsize if eccsize is greater than 16.

agree, I confused 12 with 16. Now I understand than 16 is set as 2*8 > 12 :)

Thanks

-----Original Message-----
From: Josh Boyer <jdub at us.ibm.com>
To: Timofey Kutergin <tkutergin at mail.ru>
Date: Wed, 22 Jun 2005 07:12:46 -0500
Subject: Re: clean marker size for NOR w/ECC

> 
> On Wed, 2005-06-22 at 10:49 +0400, Timofey Kutergin wrote:
> 
> Please set your mailer to line wrap at 80 columns.
> 
> > Currently, JFFS2 WBUF implicitly assumes that cleanmarker size is
> > multiple number of eccsize and sets it to 16 in
> > jffs2_nor_ecc_flash_setup(). Which in fact mean 1,2,4,8 and 16 valid
> > values for eccsize. Newer flashes may have ECC window more than that,
> > 1024 bytes, for example. So at least it is suggested to change
> 
> No, 1, 2, 4, and 8 are not valid values.  16 is the only valid value for
> the NOR chips with ECC that are supported by MTD.  The eccsize variable
> is pretty misleading.  It really indicates the smallest size write that
> the chip can handle.
> 
> Also, the NOR_ECC option is currently intended for chips that have
> transparent ECC.  That means that you don't have access to the ECC
> values and simply have restrictions on the minimum size of a write.
> 
> > 
> >  c->cleanmarker_size = 16;
> > to
> >  c->cleanmarker_size = c->mtd->eccsize>=16 ? c->mtd->eccsize:16;
> 
> If you're going to do that, just make it:
> 
> c->cleanmarker_size = c->mtd->eccsize;
> 
> though I'd rather leave it for now.  There are no other NOR ECC chips
> out there that I know of.
> 
> > 
> > also, when using flash_eraseall utility with -j option, it also assumes
> > cleanmarker size of 16 (sizeof(struct jffs2_unknown_inode)).
> 
> Erm, no it doesn't.  sizeof(struct jffs2_unknown_node) == 12.
> 
> > It is suggested to put similar check there:
> 
> A check similar to that could be ok.  Though I'm not entirely convinced
> it's needed.
> 
> josh
> 
> 





More information about the linux-mtd mailing list