mtd/drivers/mtd/nand nand_base.c,1.163,1.164

tpoynor at infradead.org tpoynor at infradead.org
Wed Dec 14 21:16:20 EST 2005


Update of /home/cvs/mtd/drivers/mtd/nand
In directory phoenix.infradead.org:/tmp/cvs-serv17179/drivers/mtd/nand

Modified Files:
	nand_base.c 
Log Message:
[MTD] NAND: Remove bogus duplicate code fragment overcounting ECC bytes

nand_scan calculation of this->eccbytes is overstated for H/W ECC schemes
with more than 3 bytes of ECC per page.


Index: nand_base.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/nand_base.c,v
retrieving revision 1.163
retrieving revision 1.164
diff -u -r1.163 -r1.164
--- nand_base.c	14 Dec 2005 12:29:42 -0000	1.163
+++ nand_base.c	15 Dec 2005 02:16:17 -0000	1.164
@@ -2928,21 +2928,6 @@
 		break;
 	}
 
-	switch (this->eccmode) {
-	case NAND_ECC_HW12_2048:
-		this->eccbytes += 4;
-	case NAND_ECC_HW8_512:
-		this->eccbytes += 2;
-	case NAND_ECC_HW6_512:
-		this->eccbytes += 3;
-	case NAND_ECC_HW3_512:
-	case NAND_ECC_HW3_256:
-		if (this->calculate_ecc && this->correct_data && this->enable_hwecc)
-			break;
-		printk (KERN_WARNING "No ECC functions supplied, Hardware ECC not possible\n");
-		BUG();
-	}
-
 	mtd->eccsize = this->eccsize;
 
 	/* We consider only layout allocation performed in nand_base */





More information about the linux-mtd-cvs mailing list