Thread (25 messages) 25 messages, 6 authors, 2010-08-29
STALE5754d

[PATCH 6/8] mxc_nand: fix correct_data function

From: baruch@tkos.co.il (Baruch Siach)
Date: 2010-08-08 08:32:44

Hi Russell,

On Sun, Aug 08, 2010 at 09:19:56AM +0100, Russell King - ARM Linux wrote:
On Fri, Aug 06, 2010 at 03:53:09PM +0200, Sascha Hauer wrote:
quoted
+		err = ecc_stat & ecc_bit_mask;
+		if (err > err_limit) {
+			printk(KERN_WARNING "UnCorrectable RS-ECC Error\n");
+			return -1;
Someone's being lazy.
The code at nand_read_subpage() (drivers/mtd/nand/nand_base.c) expects the 
.correct callback to return -1 on an uncorrectable error:

                stat = chip->ecc.correct(mtd, p, &chip->buffers->ecccode[i], &chip->buffers->ecccalc[i]);
                if (stat == -1)
                        mtd->ecc_stats.failed++;
                else
                        mtd->ecc_stats.corrected += stat;

baruch

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help