clean marker size for NOR w/ECC
jdub at us.ibm.com
Wed Jun 22 08:12:46 EDT 2005
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;
> 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
More information about the linux-mtd