mtd/drivers/mtd/nand nand_base.c,1.99,1.100

gleixner at infradead.org gleixner at infradead.org
Wed Jun 16 19:26:23 EDT 2004


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

Modified Files:
	nand_base.c 
Log Message:
Read the correct number of oob bytes in case of hw ecc

Index: nand_base.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/nand_base.c,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -r1.99 -r1.100
--- nand_base.c	16 Jun 2004 21:09:52 -0000	1.99
+++ nand_base.c	16 Jun 2004 23:26:20 -0000	1.100
@@ -1092,7 +1092,9 @@
 	if (this->options & NAND_HWECC_SYNDROME)
 		compareecc = 0;
 
-	oobreadlen = (this->options & NAND_HWECC_SYNDROME) ? oobsel->eccbytes : mtd->oobsize;
+	oobreadlen = mtd->oobsize;
+	if (this->options & NAND_HWECC_SYNDROME) 
+		mdt->oobsize -= oobsel->eccbytes;
 
 	/* Loop until all data read */
 	while (read < len) {





More information about the linux-mtd-cvs mailing list