question about write/read sub-page with BCH algorithm or disable sub-page operation when using ubifs

曹荣荣 caorr1980 at gmail.com
Tue Jul 31 03:23:25 EDT 2012


Hello,
I have a question about sub-page when using ubifs, so ask help from here.

Let me take a 2048-size page with 4 sub-page Nand as example.

The documentation said, "To write a sub-page, the driver may actually
write whole NAND page, but put 0xFF bytes to the sub-pages which are
not relevant to this operation."
It's OK for some ECC algorithms such as Hamming algorithm, because the
ECC codes generated by Hamming algorithm for the 0xFF data are still
0xFF'ed. However, if we use BCH algorithm, the generated ECC codes for
0xFF data will be not 0xFF'ed, and they will overwrite the previous
OOB data, so error will be happened when reading next time.

I try to resolve this issue by disabling sub-page operation, so I add
NAND_NO_SUBPAGE_WRITE into chip->options, but chip->options will be
flushed in nand_get_flash_type() funtion (chip->options &=
~NAND_CHIPOPTIONS_MSK).

So, my question is, How can I do to write/read sub-page with BCH
algorithm, or to disable sub-page operation?



More information about the linux-mtd mailing list