[PATCH] Newly erased page read workaround

Ivan Djelic ivan.djelic at parrot.com
Thu Feb 24 04:38:00 EST 2011

On Thu, Feb 24, 2011 at 06:10:16AM +0000, Viresh Kumar wrote:
> From: Vipin Kumar <vipin.kumar at st.com>
> A newly erased page contains ff in data as well as spare area. While reading an
> erased page, the read out ecc from spare area does not match the ecc generated
> by fsmc ecc hardware accelarator. This is because ecc of data ff ff is not ff
> ff. This leads to errors when jffs2 fs erases and reads back the pages to
> ensure consistency.
> This patch adds a software workaround to ensure that the ecc check is not
> performed for erased pages. An erased page is checked by checking data as ff ff.

Hello Vipin,

Just a suggestion: maybe you could mention in your comments the fact that you
cannot workaround the problem using a mask to get a valid ECC on erased pages,
because your controller does not allow it ?

If you plan to use your workaround on recent NAND devices with UBIFS, you may
still experience problems because of uncorrected bitflips on erased pages, and
get errors such as:

UBIFS error (pid 576): ubifs_scan: corrupt empty space at LEB 509:126586
UBIFS error (pid 576): ubifs_scanned_corruption: corruption at LEB 509:126586
UBIFS error (pid 576): ubifs_scan: LEB 509 scanning failed
UBIFS warning (pid 576): ubifs_ro_mode: switched to read-only mode, error -117



More information about the linux-mtd mailing list