mtd/drivers/mtd/chips cfi_cmdset_0002.c,1.108,1.109

Thayne Harbaugh tharbaugh at lnxi.com
Wed Sep 15 19:48:12 EDT 2004


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

Modified Files:
	cfi_cmdset_0002.c 
Log Message:
single word writes at the end of a buffer write are done with the wrong address

- Jochen Karrer

Index: cfi_cmdset_0002.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/chips/cfi_cmdset_0002.c,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -r1.108 -r1.109
--- cfi_cmdset_0002.c	2 Sep 2004 01:59:22 -0000	1.108
+++ cfi_cmdset_0002.c	15 Sep 2004 23:48:09 -0000	1.109
@@ -1111,8 +1111,8 @@
 		size_t local_len = (-ofs)&(map_bankwidth(map)-1);
 		if (local_len > len)
 			local_len = len;
-		ret = cfi_amdstd_write_words(mtd, to, local_len,
-					       retlen, buf);
+		ret = cfi_amdstd_write_words(mtd, ofs + (chipnum<<cfi->chipshift),
+					     local_len, retlen, buf);
 		if (ret)
 			return ret;
 		ofs += local_len;
@@ -1158,7 +1158,8 @@
 	if (len) {
 		size_t retlen_dregs = 0;
 
-		ret = cfi_amdstd_write_words(mtd, to, len, &retlen_dregs, buf);
+		ret = cfi_amdstd_write_words(mtd, ofs + (chipnum<<cfi->chipshift),
+					     len, &retlen_dregs, buf);
 
 		*retlen += retlen_dregs;
 		return ret;





More information about the linux-mtd-cvs mailing list