android_kernel_xiaomi_sm8350/drivers/mtd/chips
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
..
amd_flash.c [MTD] amd_flash: Fix chip ID clash 2005-05-23 12:21:41 +02:00
cfi_cmdset_0001.c [MTD] chips/cfi_cmdset_0001: fix for P30 cfi parsing 2005-11-06 23:19:17 +01:00
cfi_cmdset_0002.c [MTD] chips cfi_cmdset_0002: Prevent timeout race 2005-11-07 10:47:08 +01:00
cfi_cmdset_0020.c [MTD] CHIPS: Recognize Spansion CFI 1.4 chips 2005-08-04 12:49:25 +02:00
cfi_probe.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
cfi_util.c [MTD] CHIPS: Recognize Spansion CFI 1.4 chips 2005-08-04 12:49:25 +02:00
chipreg.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
fwh_lock.h [MTD] XIP for AMD CFI flash. 2005-06-29 14:18:40 +02:00
gen_probe.c {MTD] add support for Intel's "Sibley" flash 2005-11-06 20:12:17 +01:00
jedec_probe.c [MTD] Add SST 39VF1601 (MPF+) ID 2005-05-23 12:34:00 +02:00
jedec.c [PATCH] fix missing includes 2005-10-30 17:37:32 -08:00
Kconfig [MTD] Make XIP support depend on CONFIG_ARM 2005-07-12 17:51:06 +02:00
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
map_absent.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
map_ram.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
map_rom.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sharp.c [MTD] Pre-CFI Sharp chip driver: Some speedups and cleanups 2005-08-04 12:52:09 +02:00