linux/drivers
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
..
acorn [ARM] Turn ARM RiscPC PCF8583 i2c RTC driver into a proper module 2005-10-30 19:07:59 +00:00
acpi [PATCH] fix missing includes 2005-10-30 17:37:32 -08:00
atm [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
base Merge master.kernel.org:/home/rmk/linux-2.6-drvmodel 2005-10-31 07:32:56 -08:00
block Merge master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc-merge 2005-11-04 16:27:50 -08:00
bluetooth [Bluetooth] Ignore additional interfaces of BPA 100/105 devices 2005-10-28 19:20:57 +02:00
cdrom merge filename and modify references to iseries/vio.h 2005-11-02 15:13:57 +11:00
char Merge master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc-merge 2005-11-04 16:27:50 -08:00
connector [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
cpufreq [PATCH] create and destroy cpufreq sysfs entries based on cpu notifiers 2005-10-30 17:37:14 -08:00
crypto [PATCH] CONFIG_IA32 2005-10-30 17:37:10 -08:00
dio
eisa Create platform_device.h to contain all the platform device details. 2005-10-29 19:07:23 +01:00
fc4
firmware Merge master.kernel.org:/home/rmk/linux-2.6-drvmodel 2005-10-31 07:32:56 -08:00
hwmon Create platform_device.h to contain all the platform device details. 2005-10-29 19:07:23 +01:00
i2c Merge master.kernel.org:/home/rmk/linux-2.6-arm 2005-11-01 21:32:14 -08:00
ide Merge ../linux-2.6 by hand 2005-10-31 13:37:12 +11:00
ieee1394 Merge ../bleed-2.6 2005-10-28 10:13:16 -07:00
infiniband Merge branch 'srp' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband 2005-11-04 16:32:36 -08:00
input [PATCH] i386: CONFIG_PC removal 2005-10-31 09:20:54 -08:00
isdn [PATCH] fix missing includes 2005-10-30 17:37:32 -08:00
macintosh Merge ../linux-2.6 2005-11-02 15:20:55 +11:00
mca [PATCH] fix missing includes 2005-10-30 17:37:32 -08:00
md [BLOCK] Unify the seperate read/write io stat fields into arrays 2005-11-01 09:26:16 +01:00
media [PATCH] fix missing includes 2005-10-30 17:37:32 -08:00
message [PATCH] fix missing includes 2005-10-30 17:37:32 -08:00
mfd Merge master.kernel.org:/home/rmk/linux-2.6-drvmodel 2005-10-31 07:32:56 -08:00
misc Create platform_device.h to contain all the platform device details. 2005-10-29 19:07:23 +01:00
mmc Merge master.kernel.org:/home/rmk/linux-2.6-drvmodel 2005-10-31 07:32:56 -08:00
mtd [MTD] chips cfi_cmdset_0002: Prevent timeout race 2005-11-07 10:47:08 +01:00
net Merge master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc-merge 2005-11-04 16:27:50 -08:00
nubus
oprofile
parisc Auto-update from upstream 2005-10-28 12:18:07 -04:00
parport [PARISC] Convert parisc_device to use struct resource for hpa 2005-10-21 22:36:40 -04:00
pci [PATCH] fix missing includes 2005-10-30 17:37:32 -08:00
pcmcia Merge master.kernel.org:/home/rmk/linux-2.6-drvmodel 2005-10-31 07:32:56 -08:00
pnp [PATCH] fix missing includes 2005-10-30 17:37:32 -08:00
s390 [PATCH] fix missing includes 2005-10-30 17:37:32 -08:00
sbus [PATCH] Remove unnecessary check_region references in comments 2005-09-13 08:22:29 -07:00
scsi Merge Paulus' tree 2005-11-02 18:15:43 +11:00
serial Merge master.kernel.org:/home/rmk/linux-2.6-serial 2005-11-04 10:42:53 -08:00
sh [PATCH] fix missing includes 2005-10-30 17:37:32 -08:00
sn
tc Use physical addresses at the interface level, letting drivers remap 2005-10-29 19:31:35 +01:00
telephony [PATCH] telephony: fix-up schedule_timeout() usage 2005-09-10 10:06:39 -07:00
usb [USB]: Make early handoff a final fixup instead of a header one. 2005-11-04 11:17:24 -08:00
video [PATCH] nvidiafb: Geforce 7800 series support added 2005-11-04 18:01:34 -08:00
w1 [PATCH] fix missing includes 2005-10-30 17:37:32 -08:00
zorro [PATCH] fix missing includes 2005-10-30 17:37:32 -08:00
Kconfig [NET]: Add netlink connector. 2005-09-11 19:15:07 -07:00
Makefile [PATCH] USB: move handoff code 2005-10-28 16:47:38 -07:00