mtd, mtdblock and nand ecc.

David Daney ddaney at avtrex.com
Wed Apr 14 10:11:57 EDT 2004


Thomas Gleixner wrote:

>On Wednesday 14 April 2004 06:37, David Daney wrote:
>  
>
>>Is there some reason that the mtd and mtdblock drivers do not use ECC
>>when the backing device is nand with ECC enabled?
>>    
>>
>
>Yes. 
>If the oobsel structure == NULL, then the nand driver uses the structure, 
>which is associated to this mtd device. This can be done from userspace using 
>MEMSETOOBSEL ioctl.
>NAND aware filesystem drivers provide their own oobsel structure and use the 
>xxx_ecc functions.
>  
>
I am using the cramfs on a NAND partition as my root file system.  
cramfs is not NAND aware, and I cannot be running userspace programs 
before mounting as it is the root file system.

I have not completely educated myself on the mtdblock driver.  Since the 
mtdblock driver can be used by non-mtd-aware filesystems, I am proposing 
making mtdblock NAND aware so that it uses the xxx_ecc functions iff ECC 
is available.  Perhaps there would be a kernel/module command line 
switch to help manage the behavior.

Thoughts?

David Daney




More information about the linux-mtd mailing list