mtd/drivers/mtd/chips cfi_cmdset_0001.c,1.111,1.112
Joakim Tjernlund
jocke at infradead.org
Fri Jan 31 04:07:35 EST 2003
Update of /home/cvs/mtd/drivers/mtd/chips
In directory phoenix.infradead.org:/tmp/cvs-serv17755
Modified Files:
cfi_cmdset_0001.c
Log Message:
Dont clear VPP when writing if an erase has been suspended.
Reworked the "disable erase suspend on write" logic.
Index: cfi_cmdset_0001.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/chips/cfi_cmdset_0001.c,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -r1.111 -r1.112
--- cfi_cmdset_0001.c 29 Jan 2003 11:48:32 -0000 1.111
+++ cfi_cmdset_0001.c 31 Jan 2003 09:07:33 -0000 1.112
@@ -170,9 +170,9 @@
cfi_tell_features(extp);
#endif
-#define DISABLE_ERASE_SUSPEND_ON_WRITE
-#ifdef DISABLE_ERASE_SUSPEND_ON_WRITE
-/* Enable this if you suspect buggy suspend support */
+#ifndef CMDSET0001_ENABLE_ERASE_SUSPEND_ON_WRITE
+/* #define CMDSET0001_ENABLE_ERASE_SUSPEND_ON_WRITE if you want to try this function. */
+/* Some Intel Strata Flash prior to FPO revision C has bugs in this area */
if(extp->SuspendCmdSupport & 1)
printk(KERN_WARNING "cfi_cmdset_0001: Suspend "
"erase on write disabled.\n");
@@ -897,7 +897,6 @@
chip->word_write_time++;
/* Done and happy. */
- DISABLE_VPP(map);
chip->state = FL_STATUS;
/* check for lock bit */
if (status & CMD(0x02)) {
@@ -922,7 +921,9 @@
do. */
cfi_write(map, CMD(0xd0), adr);
cfi_write(map, CMD(0x70), adr);
- }
+ } else
+ DISABLE_VPP(map); /* must not clear the VPP if there is a suspended erase to be resumed */
+
wake_up(&chip->wq);
spin_unlock(chip->mutex);
return ret;
@@ -1261,7 +1262,6 @@
chip->buffer_write_time++;
/* Done and happy. */
- DISABLE_VPP(map);
chip->state = FL_STATUS;
/* check for lock bit */
if (status & CMD(0x02)) {
@@ -1286,7 +1286,9 @@
do. */
cfi_write(map, CMD(0xd0), adr);
cfi_write(map, CMD(0x70), adr);
- }
+ } else
+ DISABLE_VPP(map); /* must not clear the VPP if there is a suspended erase to be resumed */
+
wake_up(&chip->wq);
spin_unlock(chip->mutex);
return ret;
More information about the linux-mtd-cvs
mailing list