Few problems in mtd system

Maxim Levitsky maximlevitsky at gmail.com
Sun Dec 20 15:59:55 EST 2009


Now it all clear.
Here is the stupid emulated nand interface of the olympus 1 GB card:


-> page read returns sector contents + cooked oob which includes LBA and
'always correct ecc'

-> oob read (0x50 ....) returns only LBA. ecc is set 0xFFFFF.
Only LBA in fact is returned.


-> erase is faked. It does put 0xFFs into erase block, but actual flash
isn't touched at all.


-> page write only works if LBA is set to correct number in the oob.
Nothing else matters. If invalid ecc is written, page writes correctly
and returns 'correct' ecc. In other words XD's ecc is not used.
Of course it possible to do many page writes, without doing erases,
writing arbitrary data.


-> oob write doesn't do anything but confuses the card. It returns
garbage on following reads, but flash isn't touched ether.


Writing different physical sector with same LBA makes other one magicly
disappear...
Of course you understand why....

However, individual page writes do work correctly.

I suspect that older non type M cards didn't have such emulation, but
were real nand chips, bacause there are some references on the web about
using XD card as a nand chip replacement.
Such card as I have will really will make very poor nand replacement...


Folks, could you review my other questions about bugs in mtd core, and
tell your opinion?


Best regards,
Maxim Levitsky




More information about the linux-mtd mailing list