mtd/drivers/mtd nftlcore.c,1.94,1.95 nftlmount.c,1.34,1.35

gleixner at infradead.org gleixner at infradead.org
Wed Jun 16 15:21:20 EDT 2004


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

Modified Files:
	nftlcore.c nftlmount.c 
Log Message:
Fix it. Not because I broke it due to remiving NAND_ECC_DISKONCHIP. It was broken anyway

Index: nftlcore.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nftlcore.c,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -r1.94 -r1.95
--- nftlcore.c	23 Jun 2003 12:00:08 -0000	1.94
+++ nftlcore.c	16 Jun 2004 19:21:17 -0000	1.95
@@ -351,16 +351,16 @@
                         continue;
                 
                 ret = MTD_READECC(nftl->mbd.mtd, (nftl->EraseSize * BlockMap[block]) + (block * 512),
-				  512, &retlen, movebuf, (char *)&oob, NAND_ECC_DISKONCHIP); 
+				  512, &retlen, movebuf, (char *)&oob, NULL); 
                 if (ret < 0) {
                     ret = MTD_READECC(nftl->mbd.mtd, (nftl->EraseSize * BlockMap[block])
                                       + (block * 512), 512, &retlen,
-                                      movebuf, (char *)&oob, NAND_ECC_DISKONCHIP); 
+                                      movebuf, (char *)&oob, NULL); 
                     if (ret != -EIO) 
                         printk("Error went away on retry.\n");
                 }
                 MTD_WRITEECC(nftl->mbd.mtd, (nftl->EraseSize * targetEUN) + (block * 512),
-                             512, &retlen, movebuf, (char *)&oob, NAND_ECC_DISKONCHIP);
+                             512, &retlen, movebuf, (char *)&oob, NULL);
 	}
         
         /* add the header so that it is now a valid chain */
@@ -629,7 +629,7 @@
 	}
 
 	MTD_WRITEECC(nftl->mbd.mtd, (writeEUN * nftl->EraseSize) + blockofs,
-		     512, &retlen, (char *)buffer, (char *)eccbuf, NAND_ECC_DISKONCHIP);
+		     512, &retlen, (char *)buffer, (char *)eccbuf, NULL);
         /* no need to write SECTOR_USED flags since they are written in mtd_writeecc */
 
 	return 0;
@@ -693,7 +693,7 @@
 		loff_t ptr = (lastgoodEUN * nftl->EraseSize) + blockofs;
 		size_t retlen;
 		u_char eccbuf[6];
-		if (MTD_READECC(nftl->mbd.mtd, ptr, 512, &retlen, buffer, eccbuf, NAND_ECC_DISKONCHIP))
+		if (MTD_READECC(nftl->mbd.mtd, ptr, 512, &retlen, buffer, eccbuf, NULL))
 			return -EIO;
 	}
 	return 0;

Index: nftlmount.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nftlmount.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- nftlmount.c	21 May 2003 10:54:10 -0000	1.34
+++ nftlmount.c	16 Jun 2004 19:21:17 -0000	1.35
@@ -104,7 +104,7 @@
 
 		/* Finally reread to check ECC */
 		if ((ret = MTD_READECC(nftl->mbd.mtd, block * nftl->EraseSize, SECTORSIZE,
-				&retlen, buf, (char *)&oob, NAND_ECC_DISKONCHIP) < 0)) {
+				&retlen, buf, (char *)&oob, NULL) < 0)) {
 			printk(KERN_NOTICE "ANAND header found at 0x%x in mtd%d, but ECC read failed (err %d)\n",
 			       block * nftl->EraseSize, nftl->mbd.mtd->index, ret);
 			continue;
@@ -217,7 +217,7 @@
 				/* read one sector for every SECTORSIZE of blocks */
 				if ((ret = MTD_READECC(nftl->mbd.mtd, block * nftl->EraseSize +
 						       i + SECTORSIZE, SECTORSIZE, &retlen, buf,
-						       (char *)&oob, NAND_ECC_DISKONCHIP)) < 0) {
+						       (char *)&oob, NULL)) < 0) {
 					printk(KERN_NOTICE "Read of bad sector table failed (err %d)\n",
 					       ret);
 					kfree(nftl->ReplUnitTable);





More information about the linux-mtd-cvs mailing list