mtd/drivers/mtd/chips cfi_cmdset_0001.c,1.149,1.150
Nicolas Pitre
nico at infradead.org
Tue Jun 15 12:50:37 EDT 2004
Update of /home/cvs/mtd/drivers/mtd/chips
In directory phoenix.infradead.org:/tmp/cvs-serv1230/drivers/mtd/chips
Modified Files:
cfi_cmdset_0001.c
Log Message:
Also consider the PWS bit as a good status with multiple partitions.
Index: cfi_cmdset_0001.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/chips/cfi_cmdset_0001.c,v
retrieving revision 1.149
retrieving revision 1.150
diff -u -r1.149 -r1.150
--- cfi_cmdset_0001.c 11 Jun 2004 21:36:03 -0000 1.149
+++ cfi_cmdset_0001.c 15 Jun 2004 16:50:34 -0000 1.150
@@ -417,7 +417,7 @@
{
DECLARE_WAITQUEUE(wait, current);
struct cfi_private *cfi = map->fldrv_priv;
- cfi_word status, status_OK = CMD(0x80);
+ cfi_word status, status_OK = CMD(0x80), status_PWS = CMD(0x01);
unsigned long timeo;
struct cfi_pri_intelext *cfip = cfi->cmdset_priv;
@@ -490,6 +490,11 @@
if ((status & status_OK) == status_OK)
break;
+ /* At this point we're fine with write operations
+ in other partitions as they don't conflict. */
+ if (chip->priv && (status & status_PWS) == status_PWS)
+ break;
+
if (time_after(jiffies, timeo)) {
printk(KERN_ERR "Waiting for chip to be ready timed out. Status %llx\n",
(long long)status);
More information about the linux-mtd-cvs
mailing list