I'm using Connect Core IMX53 board with Kernel version 126.96.36.199 and Yocto 1.4 OS.
I have a random problem when writing operations are done over the Nand Flash: for instance when I insert rows into the database (the file grows) or when I copy new files to the jffs2 partition. Sometimes I got an input/output error and after that I won't be able to recovery the file neither if I try to remove or if a try to copy a new file which override the one who has problem.
JFFS2 error: (1) jffs2_build_inode_pass1: child dir "res" (ino #9334) of dir ino #9333 appears to be a hard link
JFFS2 warning: (973) jffs2_do_read_inode_internal: no data nodes found for ino #9334
iget() failed for ino #9334
JFFS2 notice: (746) check_node_data: wrong data CRC in data node at 0x0df47474: read 0xfbf9abb7, calculated 0xbf64ad10.
JFFS2 warning: (1016) jffs2_get_inode_nodes: Eep. No valid nodes for ino #9334.
JFFS2 warning: (1016) jffs2_do_read_inode_internal: no data nodes found for ino #9334
Also I checked in U-boot if exist any bad blocks and it doesn't.
I was researching how a Nand flash works and I found that it has an Out-of-Band (OOB) area that contains an Error-Correcting-Code (ECC) algorithm. This ECC is used to check and fix any possible writing error.
So, when I was checking if that feature is enabled in my board I found in the kernel log the message:
user.warn kernel: Memory policy: ECC disabled, Data cache writeback
user.info kernel: JFFS2 doesn't use OOB.
I want to know if my hypothesis is correct and how can i enable and use the ECC and OOB?