Linux-mtd Archive on lore.kernel.org
 help / color / mirror / Atom feed
* question about write/read sub-page with BCH algorithm or disable sub-page operation when using ubifs
@ 2012-07-31  7:23 曹荣荣
  2012-07-31  7:37 ` Matthieu CASTET
  2012-08-01  5:20 ` Iwo Mergler
  0 siblings, 2 replies; 4+ messages in thread
From: 曹荣荣 @ 2012-07-31  7:23 UTC (permalink / raw)
  To: linux-mtd

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?

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-08-01  5:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-31  7:23 question about write/read sub-page with BCH algorithm or disable sub-page operation when using ubifs 曹荣荣
2012-07-31  7:37 ` Matthieu CASTET
2012-07-31  7:52   ` 曹荣荣
2012-08-01  5:20 ` Iwo Mergler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox