Issue with DEBUG_LOCK_BITS

Eisenhut, Daniel (MED) Daniel.Eisenhut at med.ge.com
Mon Mar 22 18:07:26 EST 2004


I've found a bug with the DEBUG_LOCK_BITS usage in
mtd/chips/cfi_cmdset_0001.c

In cfi_intelext_lock() and cfi_intelext_unlock()... if you have enabled
DEBUG_LOCK_BITS, do_printlockstatus_oneblock is called which sends the
command 0xff before returning.  This places the chip in Read Array mode.
Then do_xxlock_oneblock calls get_chip.  If the chip->state equals
FL_STATUS, it attempts to read the status register.  This naturally fails
since it is in Read Array mode, not Read Status mode.

Is there a need for do_printlockstatus_oneblock to place the chip in Read
Array mode when it is done?  I just deleted that line and everything appears
to work fine now with the DEBUG_LOCK_BITS enabled.  (Not that this is real
important since its debug stuff, but I spent many hours with this trying
figure out why its failing and someone else probably will as well if the
debug option is there)

Dan



More information about the linux-mtd mailing list