mtd/drivers/mtd/nand nand.c,1.25,1.26

gleixner at infradead.org gleixner at infradead.org
Wed Aug 7 07:19:43 EDT 2002


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

Modified Files:
	nand.c 
Log Message:
force badblock marker location to byte 5 of oob, even if CONFIG_NAND_ECC_JFFS2 is not set

Index: nand.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/nand.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- nand.c	1 Aug 2002 09:25:45 -0000	1.25
+++ nand.c	7 Aug 2002 11:19:41 -0000	1.26
@@ -57,6 +57,12 @@
  *  08-01-2002  Thomas Gleixner (tglx at linutronix.de)	
  *		- changed my mailaddress, added pointer to tech/nand.html
  *
+ *  08-07-2002 	Thomas Gleixner (tglx at linutronix.de)
+ *		forced bad block location to byte 5 of OOB, even if
+ *		CONFIG_MTD_NAND_ECC_JFFS2 is not set, to prevent
+ *		erase /dev/mtdX from erasing bad blocks and destroying
+ *		bad block info
+ *
  * $Id$
  *
  * This program is free software; you can redistribute it and/or modify
@@ -1180,7 +1186,7 @@
 	oob_config.ecc_pos[3] = NAND_JFFS2_OOB_ECCPOS3;
 	oob_config.ecc_pos[4] = NAND_JFFS2_OOB_ECCPOS4;
 	oob_config.ecc_pos[5] = NAND_JFFS2_OOB_ECCPOS5;
-	oob_config.badblock_pos = 5;
+	oob_config.badblock_pos = NAND_FORCE_BADBPOS;
 	oob_config.eccvalid_pos = 4;
 #else
 	oob_config.ecc_pos[0] = NAND_NOOB_ECCPOS0;
@@ -1189,7 +1195,7 @@
 	oob_config.ecc_pos[3] = NAND_NOOB_ECCPOS3;
 	oob_config.ecc_pos[4] = NAND_NOOB_ECCPOS4;
 	oob_config.ecc_pos[5] = NAND_NOOB_ECCPOS5;
-	oob_config.badblock_pos = NAND_NOOB_BADBPOS;
+	oob_config.badblock_pos = NAND_FORCE_BADBPOS;
 	oob_config.eccvalid_pos = NAND_NOOB_ECCVPOS;
 #endif
 





More information about the linux-mtd-cvs mailing list