should nand driver create ECC for a page after ERASE cmd?

Oleksij Rempel linux at rempel-privat.de
Sat Dec 20 00:42:29 PST 2014


Hello all,

i'm trying to pass mtd/tests for my driver.. on pagetest i fail on this
place:
http://lxr.free-electrons.com/source/drivers/mtd/tests/pagetest.c#L311

after ERASE cmd this test trying to read same page. Driver will report
ECC error on read, because erased page has no ECC data in OOB.

What is correct way to handle it?

Right now i think about fallowing scenarios:
- nand should write page filled with 0xFFs, to generate ECC. (i think it
is wrong)
- nand should check if ECC == 0xFF.. and return other error number. (not
really good)
- write some oob filed to mark erased page?
- other variants?

in all cases it looks like it should be task of mtd or nand layer to
send needed request and not the task of a driver.

PS: i think it is a cause of "error -74 (ECC error) during ubiattach" in
my case.

-- 
Regards,
Oleksij

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20141220/732cbabe/attachment.sig>


More information about the linux-mtd mailing list