RE: question about write/read sub-page with BCH algorithm or disable sub-page operation when using ubifs
Iwo Mergler <Iwo.Mergler <at> netcommwireless.com>
2012-08-01 05:20:35 GMT
On Tue, 31 Jul 2012 17:23:25 +1000
曹荣荣 <caorr1980 <at> gmail.com> wrote:
> 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?
>
Without sub-page support, UBI overhead doubles from about 1.5% to
over 3%, so sub-page support is worth considering.
(Continue reading)