3e3183bab0
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> |
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
i2c-ali15x3.c | ||
i2c-ali1535.c | ||
i2c-ali1563.c | ||
i2c-amd756-s4882.c | ||
i2c-amd756.c | ||
i2c-amd8111.c | ||
i2c-au1550.c | ||
i2c-au1550.h | ||
i2c-elektor.c | ||
i2c-hydra.c | ||
i2c-i801.c | ||
i2c-i810.c | ||
i2c-ibm_iic.c | ||
i2c-ibm_iic.h | ||
i2c-iop3xx.c | ||
i2c-iop3xx.h | ||
i2c-isa.c | ||
i2c-ite.c | ||
i2c-ixp4xx.c | ||
i2c-ixp2000.c | ||
i2c-mpc.c | ||
i2c-mv64xxx.c | ||
i2c-nforce2.c | ||
i2c-ocores.c | ||
i2c-parport-light.c | ||
i2c-parport.c | ||
i2c-parport.h | ||
i2c-pca-isa.c | ||
i2c-piix4.c | ||
i2c-powermac.c | ||
i2c-prosavage.c | ||
i2c-pxa.c | ||
i2c-rpx.c | ||
i2c-s3c2410.c | ||
i2c-savage4.c | ||
i2c-sibyte.c | ||
i2c-sis96x.c | ||
i2c-sis630.c | ||
i2c-sis5595.c | ||
i2c-stub.c | ||
i2c-via.c | ||
i2c-viapro.c | ||
i2c-voodoo3.c | ||
scx200_acb.c | ||
scx200_i2c.c |