public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Scott Zhang <macromarship@gmail.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: ubifs_decompress: cannot decompress 2293 bytes, compressor lzo, error -22
Date: Fri, 15 Apr 2022 10:29:29 +0200	[thread overview]
Message-ID: <20220415102929.5c654933@xps13> (raw)
In-Reply-To: <CABy3iKzERYHD8Kj+NNnPdAxTxO6ANwrUJGcJO77385RtY1ddGg@mail.gmail.com>

Hi Scott,

macromarship@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@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

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply	other threads:[~2022-04-15  8:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-14 16:45 ubifs_decompress: cannot decompress 2293 bytes, compressor lzo, error -22 Scott Zhang
2022-04-14 17:24 ` Miquel Raynal
2022-04-15  4:38   ` Scott Zhang
2022-04-15  8:29     ` Miquel Raynal [this message]
2022-04-19  2:05       ` Scott Zhang
2022-04-19  7:33         ` Miquel Raynal
2022-04-19  7:44           ` Richard Weinberger
2022-04-19  9:03             ` Scott Zhang
2022-04-19  9:11               ` Scott Zhang
2022-04-20  3:00                 ` Scott Zhang
2022-04-20  6:26                   ` Richard Weinberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220415102929.5c654933@xps13 \
    --to=miquel.raynal@bootlin.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=macromarship@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox