ubifs_decompress: cannot decompress 2293 bytes, compressor lzo, error -22
Miquel Raynal
miquel.raynal at bootlin.com
Fri Apr 15 01:29:29 PDT 2022
Hi Scott,
macromarship at gmail.com wrote on Fri, 15 Apr 2022 12:38:09 +0800:
> Hi. Miquèl.
> Yes. I tried nandbiterrs, the result is below. Looks ecc is not working .
>
> [root at jgcx: ~]#./nandbiterrs /dev/mtd2 -i
> incremental biterrors test
> Successfully corrected 0 bit errors per subpage
> Inserted biterror @ 0/5
> Failed to recover 1 bitflips
> Read error after 1 bit errors per page
>
> By checking the nand driver whichi is nuc980_nand.c
>
> https://github.com/OpenNuvoton/NUC980-linux-4.4.y/blob/master/drivers/mtd/nand/nuc980_nand.c
>
>
> * Enable HW ECC : unused on most chips
> */
> void nuc980_nand_enable_hwecc(struct mtd_info *mtd, int mode)
> {
> ENTER();
> #ifdef NUC980_NAND_DEBUG
> {
> char * ptr=REG_SMRA0;
> int i=0;
> if( mode == NAND_ECC_READ )
> printk("[R]=\n");
> else
> printk("[W]=\n");
>
> for(i=0; i<mtd->oobsize; i++)
> {
> printk("%X ", *(ptr+i) );
> if ( i % 32 == 31)
> printk("\n");
> }
> printk("\n");
> }
> #endif
> LEAVE();
> }
>
>
> I guess the nuc980 driver doesn't support ecc correction.
You cannot use NAND without proper ECC handling.
Thanks,
Miquèl
More information about the linux-mtd
mailing list