Staging
v0.6.0
https://github.com/torvalds/linux
Revision 3e3183bab0257a6d02038658c53b491e1378612f authored by David Woodhouse on 05 August 2006, 19:15:19 UTC, committed by Linus Torvalds on 06 August 2006, 15:57:49 UTC
While busy-waiting for completion, check the hardware after scheduling;
don't schedule and then immediately check the _timeout_.  If the yield()
took a long time (as it does on my OLPC prototype board when it's busy),
we'd report a timeout even though the hardware was now ready.

This fixes it, and also switches the yield() for a cond_resched() because
we don't actually want to be _that_ nice about it.  I see nice
tightly-packed SMBus transactions now, rather than waiting for milliseconds
between successive phases.

Actually, we shouldn't be busy-waiting here at all.  We should be using
interrupts.  That's an exercise for another day though.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Cc: Christer Weinigel <wingel@nano-system.com>
Cc: <Jordan.Crouse@amd.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 225add6
History
Tip revision: 3e3183bab0257a6d02038658c53b491e1378612f authored by David Woodhouse on 05 August 2006, 19:15:19 UTC
[PATCH] SCX200_ACB: eliminate spurious timeout errors
Tip revision: 3e3183b
File Mode Size
Kconfig -rw-r--r-- 1.1 KB
Kconfig.iosched -rw-r--r-- 1.9 KB
Makefile -rw-r--r-- 333 bytes
as-iosched.c -rw-r--r-- 45.4 KB
blktrace.c -rw-r--r-- 12.0 KB
cfq-iosched.c -rw-r--r-- 58.0 KB
deadline-iosched.c -rw-r--r-- 18.6 KB
elevator.c -rw-r--r-- 20.3 KB
genhd.c -rw-r--r-- 16.6 KB
ioctl.c -rw-r--r-- 7.4 KB
ll_rw_blk.c -rw-r--r-- 99.3 KB
noop-iosched.c -rw-r--r-- 2.5 KB
scsi_ioctl.c -rw-r--r-- 16.4 KB

back to top