[Yaffs] RE: inadvertently marking all blocks bad?

Lawson.Reed Reed.Lawson at IGT.com
Fri Jul 8 00:59:16 BST 2005


First of all, My thoughts and prayers are with you in the UK 
as you recover from this horrific attack on your country, 
this slaughter of innocent people by those sick terrorist. 
Just horrible....

Anyway... 

I wanted to let you know I found part of my problem. I did not have
useecc = MTD_NANDECC_AUTOPLACE. I had to do this 
in my map driver: 
	igt_sn2_mtd->oobinfo.useecc = MTD_NANDECC_AUTOPLACE;
just before adding the partition.

then, I was getting an infinite loop because of this in
nand_prepare_oobbuf():

		for (i = 0, len = 0; len < mtd->oobavail; i++) {
			int to = ofs + oobsel->oobfree[i][0];
			int num = oobsel->oobfree[i][1];
			memcpy (&this->oob_buf[to], fsbuf, num);
			len += num;
			fsbuf += num;
		}
my mtd->oobavail was 39 and my oobsel->oobfree[0][1] was 38.
but the next one (oobsel->oobfree[1][1]) was 0 making "num"
zero so the loop went forever. That's pretty nasty. 
I change mtd->oobavail to 38 and then it was happy. Humm.

However, now I am getting tons of these when I remove a file
and copy another one in:

	page 130 in gc has no object
	page 131 in gc has no object
	page 132 in gc has no object
	page 133 in gc has no object
	page 134 in gc has no object
	etc....

Any ideas? Is it because I moved the stuff in the oob and now
someplace else can't find it? Is this MTD_NANDECC_AUTOPLACE
the right thing to set to avoid the zeroing out of the 
bad block markers? or is there a better way?

Thanks.
__________________________________
Reed Lawson
IGT Firmware Engineering
(775) 448-0755




More information about the yaffs mailing list