From: David Woodhouse Date: Sat, 5 Aug 2006 19:15:19 +0000 (-0700) Subject: [PATCH] SCX200_ACB: eliminate spurious timeout errors X-Git-Tag: v2.6.18-rc4~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e3183bab0257a6d02038658c53b491e1378612f;p=pandora-kernel.git [PATCH] SCX200_ACB: eliminate spurious timeout errors 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 Cc: Christer Weinigel Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed