[MTD] DiskOnChip: Add some comments
authorDan Brown <dan_brown@ieee.org>
Thu, 7 Apr 2005 14:22:58 +0000 (15:22 +0100)
committerThomas Gleixner <tglx@mtd.linutronix.de>
Mon, 23 May 2005 11:11:44 +0000 (13:11 +0200)
Add helpful comment about oobfree so I can't claim two years from
now that I don't remember what I was thinking.

Signed-off-by: Dan Brown <dan_brown@ieee.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
drivers/mtd/nand/diskonchip.c

index 9f33f33..fdb5d4a 100644 (file)
@@ -16,7 +16,7 @@
  *  
  * Interface to generic NAND code for M-Systems DiskOnChip devices
  *
- * $Id: diskonchip.c,v 1.53 2005/04/07 13:39:13 dbrown Exp $
+ * $Id: diskonchip.c,v 1.54 2005/04/07 14:22:55 dbrown Exp $
  */
 
 #include <linux/kernel.h>
@@ -1049,6 +1049,16 @@ static int doc200x_correct_data(struct mtd_info *mtd, u_char *dat, u_char *read_
                
 //u_char mydatabuf[528];
 
+/* The strange out-of-order .oobfree list below is a (possibly unneeded)
+ * attempt to retain compatibility.  It used to read:
+ *     .oobfree = { {8, 8} }
+ * Since that leaves two bytes unusable, it was changed.  But the following
+ * scheme might affect existing jffs2 installs by moving the cleanmarker:
+ *     .oobfree = { {6, 10} }
+ * jffs2 seems to handle the above gracefully, but the current scheme seems
+ * safer.  The only problem with it is that any code that parses oobfree must
+ * be able to handle out-of-order segments.
+ */
 static struct nand_oobinfo doc200x_oobinfo = {
         .useecc = MTD_NANDECC_AUTOPLACE,
         .eccbytes = 6,