mtd/drivers/mtd/nand Config.in, 1.18, 1.19 Kconfig, 1.12, 1.13 diskonchip.c, 1.21, 1.22

dbrown at infradead.org dbrown at infradead.org
Mon Jul 12 14:42:02 EDT 2004


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

Modified Files:
	Config.in Kconfig diskonchip.c 
Log Message:
Add kernel config option to enable BBT writes on INFTL devices.


Index: Config.in
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/Config.in,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- Config.in	18 Jun 2004 16:18:41 -0000	1.18
+++ Config.in	12 Jul 2004 18:41:59 -0000	1.19
@@ -43,5 +43,8 @@
 fi
 
 dep_tristate '  NAND Flash Driver for DiskOnChip (Early development!!)' CONFIG_MTD_NAND_DISKONCHIP $CONFIG_MTD_NAND $CONFIG_EXPERIMENTAL
+if [ "$CONFIG_MTD_NAND_DISKONCHIP" = "y" -o "$CONFIG_MTD_NAND_DISKONCHIP" = "m" ]; then
+   bool '    Allow BBT write on DiskOnChip Millenium and 2000TSOP' CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE
+fi
 
 endmenu

Index: Kconfig
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/Kconfig,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- Kconfig	12 Jul 2004 14:49:52 -0000	1.12
+++ Kconfig	12 Jul 2004 18:41:59 -0000	1.13
@@ -89,7 +89,26 @@
 	  earlier self-contained MTD device drivers.
 	  This should enable, among other things, proper JFFS2 operation on
 	  these devices.
-	  This is still a work in progress, and almost certainly still has
-	  data-destroying bugs.  You have been warned.
-endmenu
 
+config MTD_NAND_DISKONCHIP_BBTWRITE
+	bool "Allow BBT writes on DiskOnChip Millenium and 2000TSOP"
+	depends on MTD_NAND_DISKONCHIP
+	help
+	  On DiskOnChip devices shipped with the INFTL filesystem (Millenium
+	  and 2000 TSOP/Alon), Linux reserves some space at the end of the
+	  device for the Bad Block Table (BBT).  If you have existing INFTL
+	  data on your device (created by non-Linux tools such as M-Systems'
+	  DOS drivers), your data might overlap the area Linux wants to use for
+	  the BBT.  If this is a concern for you, leave this option disabled and
+	  Linux will not write BBT data into this area.
+	  The downside of leaving this option disabled is that if bad blocks
+	  are detected by Linux, they will not be recorded in the BBT, which
+	  could cause future problems.
+	  Once you enable this option, new filesystems (INFTL or others, created
+	  in Linux or other operating systems) will not use the reserved area.
+	  The only reason not to enable this option is to prevent damage to
+	  preexisting filesystems.
+	  Even if you leave this disabled, you can enable BBT writes at module
+	  load time (assuming you build diskonchip as a module) with the module
+	  parameter "inftl_bbt_write=1".
+endmenu

Index: diskonchip.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/diskonchip.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- diskonchip.c	12 Jul 2004 10:23:59 -0000	1.21
+++ diskonchip.c	12 Jul 2004 18:41:59 -0000	1.22
@@ -102,7 +102,11 @@
 static int no_autopart=0;
 MODULE_PARM(no_autopart, "i");
 
+#ifdef MTD_NAND_DISKONCHIP_BBTWRITE
+static int inftl_bbt_write=1;
+#else
 static int inftl_bbt_write=0;
+#endif
 MODULE_PARM(inftl_bbt_write, "i");
 
 static unsigned long doc_config_location = CONFIG_MTD_DOCPROBE_ADDRESS;





More information about the linux-mtd-cvs mailing list