mtd/drivers/mtd/nand diskonchip.c,1.17,1.18

dbrown at infradead.org dbrown at infradead.org
Thu Jun 24 11:02:53 EDT 2004


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

Modified Files:
	diskonchip.c 
Log Message:
Don't force ECC for all 0xff pages to all 0xff because it breaks MSYS compatibility.


Index: diskonchip.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/diskonchip.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- diskonchip.c	24 Jun 2004 14:29:40 -0000	1.17
+++ diskonchip.c	24 Jun 2004 15:02:50 -0000	1.18
@@ -535,11 +535,12 @@
 			emptymatch = 0;
 	}
 	WriteDOC(DOC_ECC_DIS, docptr, ECCConf);
+#if 0
 	/* If emptymatch=1, we might have an all-0xff data buffer.  Check. */
 	if (emptymatch) {
 		/* Note: this somewhat expensive test should not be triggered
 		   often.  It could be optimized away by examining the data in
-		   the readbuf routine, and remembering the result. */
+		   the writebuf routine, and remembering the result. */
 		for (i = 0; i < 512; i++) {
 			if (dat[i] == 0xff) continue;
 			emptymatch = 0;
@@ -550,6 +551,7 @@
 	   Return all-0xff ecc value instead of the computed one, so
 	   it'll look just like a freshly-erased page. */
 	if (emptymatch) memset(ecc_code, 0xff, 6);
+#endif
 	return 0;
 }
 
@@ -593,7 +595,7 @@
 		if (emptymatch) {
 		/* Note: this somewhat expensive test should not be triggered
 		   often.  It could be optimized away by examining the data in
-		   the writebuf routine, and remembering the result. */
+		   the readbuf routine, and remembering the result. */
 			for (i = 0; i < 512; i++) {
 				if (dat[i] == 0xff) continue;
 				emptymatch = 0;





More information about the linux-mtd-cvs mailing list