Commit:     e6be133b68ae2c8f89d46da25ed7b31b84793e7e
Parent:     c2aecda79cd872679b9b11f9e59d797fb4c7d677
Author:     Shashi Rao <[EMAIL PROTECTED]>
AuthorDate: Wed Mar 28 15:56:28 2007 -0700
Committer:  David Woodhouse <[EMAIL PROTECTED]>
CommitDate: Tue Apr 17 14:11:20 2007 -0400

    [MTD] Fix fwh_lock locking
    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.
    Signed-off-by: Shashi Rao <[EMAIL PROTECTED]>
    Signed-off-by: David Woodhouse <[EMAIL PROTECTED]>
 drivers/mtd/chips/fwh_lock.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/chips/fwh_lock.h b/drivers/mtd/chips/fwh_lock.h
index 77303ce..ab44f2b 100644
--- a/drivers/mtd/chips/fwh_lock.h
+++ b/drivers/mtd/chips/fwh_lock.h
@@ -65,11 +65,12 @@ static int fwh_xxlock_oneblock(struct map_info *map, struct 
flchip *chip,
                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);
        return 0;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to