A question on ECC
Thomas Gleixner
tglx at linutronix.de
Mon Apr 14 07:25:02 EDT 2003
On Monday 14 April 2003 19:40, Edward J. Lee wrote:
>
> this->eccmode is indeed set to NAND_ECC_SOFT.
> I guess my case is kind of 'extra-tricky'. I just found out another
> weird thing,
> that the warning messages complaining '...without ECC...' do NOT appear
> when I'm 'writing' on the chip. Strange, eh. :'(
Can you put some debug output YAFFS ?
--- yaffs_mtdif.c 8 Apr 2003 19:53:44 -0000 1.9
+++ yaffs_mtdif.c 14 Apr 2003 10:23:39 -0000
@@ -90,10 +90,12 @@
if(dev->useNANDECC)
{ // Careful, this call adds 2 ints to the end of the spare data.
Calling function should
// allocate enough memory for spare, i.e.
[YAFFS_BYTES_PER_SPARE+2*sizeof(int)].
+ printk (KERN_DEBUG "YAFFS ReadChunk with real ECC_INFO\n");
retval =
mtd->read_ecc(mtd,addr,dev->nBytesPerChunk,&dummy,data,spareAsBytes,&yaffs_oobinfo);
}
else
{
+ printk (KERN_DEBUG "YAFFS ReadChunk with dummy ECC_INFO\n");
retval =
mtd->read_ecc(mtd,addr,dev->nBytesPerChunk,&dummy,data,spareAsBytes,&yaffs_noeccinfo);
}
}
--
Thomas
________________________________________________________________________
linutronix - competence in embedded & realtime linux
http://www.linutronix.de
mail: tglx at linutronix.de
More information about the linux-mtd
mailing list