[PATCH] Bugfix in nand_write_page

Dave Ellis DGE at sixnetio.com
Wed Oct 16 11:34:57 EDT 2002


This patch fixes a bug with verifying a NAND write with
CONFIG_MTD_NAND_VERIFY_WRITE enabled. It needs to verify
using the proper data buffer.

Dave Ellis

Index: nand.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/nand.c,v
retrieving revision 1.32
diff -u -p -r1.32 nand.c
--- nand.c	13 Sep 2002 14:27:37 -0000	1.32
+++ nand.c	16 Oct 2002 15:26:37 -0000
@@ -481,7 +481,7 @@ static int nand_write_page (struct mtd_i
 	this->cmdfunc (mtd, NAND_CMD_READ0, col, page);
 	/* Loop through and verify the data */
 	for (i = col; i < last; i++) {
-		if (this->data_buf[i] != readb (this->IO_ADDR_R)) {
+		if (this->data_poi[i] != readb (this->IO_ADDR_R)) {
 			DEBUG (MTD_DEBUG_LEVEL0, "nand_write_ecc: " "Failed
write verify, page 0x%08x ", page);
 			return -EIO;
 		}






More information about the linux-mtd mailing list