linux-stable-rt/drivers/mtd
Konstantin Baidarov b95f9609c7 [MTD] chips cfi_cmdset_0002: Prevent timeout race
We've noticed that sometimes "MTD do_write_buffer(): software timeout"
message was printed out when writing to a Fujitsu NOR flash.
It turned out that this was because of a race in the timeout handling
do_write_buffer(). A small timeout of (HZ / 1000) + 1 is used there, and
sometimes if the timer interrupt handling takes more than one or even two
jiffies (which is 1-2 ms with HZ == 1000) and that interrupt happens just
after chip_ready() call, the driver bails out from a ready polling loop
despite the chip has actually become ready while all those interrupts were
handled. To deal with this issue, extra check for chip ready is neccessary on
timeout expiration (and the checks should better be reordered).
As do_write_oneword() uses the same approach, it needs to also be changed.

Signed-off-by: Konstantin Baidarov <kbaidarov@ru.mvista.com>
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-07 10:47:08 +01:00
..
chips [MTD] chips cfi_cmdset_0002: Prevent timeout race 2005-11-07 10:47:08 +01:00
devices [PATCH] fix missing includes 2005-10-30 17:37:32 -08:00
maps [MTD] maps: Add support for the "TQM834x" Boards 2005-11-07 10:46:22 +01:00
nand [MTD] NAND Kconfig: Simplify dependencies 2005-11-07 02:49:43 +01:00
onenand [MTD] OneNAND/Kconfig: Fix dependencies 2005-11-07 01:14:05 +01:00
Kconfig [MTD] Add initial support for OneNAND flash chips 2005-11-06 21:17:24 +01:00
Makefile [MTD] Add initial support for OneNAND flash chips 2005-11-06 21:17:24 +01:00
afs.c
cmdlinepart.c
ftl.c
inftlcore.c
inftlmount.c [MTD] Missing check on kmalloc return in INFTL mount. 2005-11-06 20:14:49 +01:00
mtd_blkdevs.c
mtdblock.c [MTD] Tidy up Tims include cleanup 2005-11-07 00:14:42 +01:00
mtdblock_ro.c
mtdchar.c [MTD] Tidy up Tims include cleanup 2005-11-07 00:14:42 +01:00
mtdconcat.c [MTD] Tidy up Tims include cleanup 2005-11-07 00:14:42 +01:00
mtdcore.c [MTD] Remove deprecated power management functions 2005-11-06 20:15:30 +01:00
mtdpart.c [MTD] mtdpart.c: Allow eraseblock size != power of 2 2005-11-06 23:04:14 +01:00
nftlcore.c
nftlmount.c
redboot.c
rfd_ftl.c [MTD] Add Resident Flash Disk (RFD) support 2005-11-06 20:08:54 +01:00