mtd/drivers/mtd/nand nand.c,1.77,1.78

gleixner at infradead.org gleixner at infradead.org
Thu Apr 15 04:40:49 EDT 2004


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

Modified Files:
	nand.c 
Log Message:
add credits and a buffer check in nand_scan

Index: nand.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/nand.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -r1.77 -r1.78
--- nand.c	15 Apr 2004 08:23:08 -0000	1.77
+++ nand.c	15 Apr 2004 08:40:47 -0000	1.78
@@ -20,7 +20,13 @@
  *		Make reads over block boundaries work too
  *
  *  04-14-2004	tglx: first working version for 2k page size chips
+ *
+ * Credits:
+ *	David Woodhouse for adding multichip support  
  *	
+ *	Aleph One Ltd. and Toby Churchill Ltd. for supporting the
+ *	rework for 2K page size chips	
+ *
  * TODO:
  *	Enable cached programming for 2k page size chips
  *	Read aligned to ECC boundaries if we dont read page aligned
@@ -1873,6 +1879,11 @@
 	if (i > 1)
 		printk(KERN_INFO "%d NAND chips detected\n", i);
 	
+	if (!this->oob_buf || !this->data_buf) {
+		printk (KERN_WARNING "nand_scan(): Buffers not set. Scan aborted\n"); 
+		return 1;
+	}
+
 	/* Store the number of chips and calc total size for mtd */
 	this->numchips = i;
 	mtd->size = i * this->chipsize;




More information about the linux-mtd-cvs mailing list