* [PATCH] [MTD] fix fwh_lock locking
@ 2007-03-28 22:56 Shashi Rao
0 siblings, 0 replies; only message in thread
From: Shashi Rao @ 2007-03-28 22:56 UTC (permalink / raw)
To: linux-mtd, Shashi Rao
Hi all,
This is on a custom board with a mapping driver access to an ST
M50LPW080 chip. This chip is probed successfully with
do_map_probe("jedec_probe",...). If I use the mtdchar interface to
perform unlock->erase->program->lock on any of the 16 eraseblocks in the
chip, the chip is left in FL_STATUS mode while the data structures
believe that the chip is in FL_READY mode. Hence, any subsequent reads
to any flash byte results in 0x80 being read.
Thanks.
Signed-off-by: Shashi Rao <shashi at sun.com>
--- linux-2.6.20.3.orig/drivers/mtd/chips/fwh_lock.h
+++ linux-2.6.20.3/drivers/mtd/chips/fwh_lock.h
@@ -65,11 +65,12 @@
return ret;
}
+ chip->oldstate = chip->state;
chip->state = xxlt->state;
map_write(map, CMD(xxlt->val), adr);
/* Done and happy. */
- chip->state = FL_READY;
+ chip->state = chip->oldstate;
put_chip(map, chip, adr);
spin_unlock(chip->mutex);
return 0;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-03-28 22:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-28 22:56 [PATCH] [MTD] fix fwh_lock locking Shashi Rao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox