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: Andrew McKay
Date:  
To: yaffs
CC: YAFFS ML
Subject: Re: [Yaffs] Yaffs2 erasure issue on MT29 NAND part
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