Re: [Yaffs] Yaffs2 erasure issue on MT29 NAND part

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: yaffs@piments.com
Date:  
To: Andrew McKay
CC: YAFFS ML
Subject: Re: [Yaffs] Yaffs2 erasure issue on MT29 NAND part
Andrew McKay wrote:
> wrote:
>> > > Yes, do some manual operations on an unmounted yaffs partition.
>> >
>> > Thanks for the help Charles
>> >
>> > I did this with mtd-utils and writing to the mtdblock device using
>> dd. I
>> > didn't seem to have any issues. The blocks that YAFFS2 were saying
>> > couldn't be erased were erased successfully (and thus not marked
>> bad). I
>> > will test a bit more with it.
>>
>> Is using dd to write to mtdblock device safer or better than using
>> hacked flash_eraseall that ignores bad blocks?
> I'm not sure what you mean, dd doesn't erase blocks, and accesses
> through the MTD driver, so it pays attention to bad blocks. It also
> doesn't appear to erase a block for attempting to write it, so you need
> to use flash_eraseall prior to testing with dd or else you will get a
> lot of ECC errors while reading NAND.
>>
>> Is the block size relevant in the way it writes to the underlying
>> device or is it best to specify bs=2048 for a 2k NAND device?
> Yes I usually set the bs to the size of the blocks on the NAND part when
> testing with dd to make sure that each block only gets one write cycle.
> This may also be enforced through buffering in the MTD layer but I can't
> confirm this off the top of my head.
>
> Any questions about that stuff would probably best be posted to the MTD
> mailing list.
>
> Andrew
>
>

Hi Andrew,

thanks very much for putting me straight. I was not expecting to have to
get involve is all this low level detail to recover this hardware from
the effects of a "robust" fs like yaffs2.

I've been looking at the output of nanddump trying to understand what
state it is in.

I suspect I may be able clear that bad block marker and use something
like nanddump -m to detect the true faulty blocks.

Its a 128MiB device bit the output stops at 7d00000 am I right in
guessing that the remainder is bad block table I have read about?

Is there a way to get the current bad block table off the device before
I attempt to force an eraseall ignoring bad blocks.

Any wisdom will be a great help.

best regards.