From: Ville Syrjala Date: Thu, 15 Mar 2012 17:11:05 +0000 (+0100) Subject: i2c-algo-bit: Fix spurious SCL timeouts under heavy load X-Git-Tag: v3.2.12~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=883eb9633dcc5d3cc2389110508805d1d80c9d09;p=pandora-kernel.git i2c-algo-bit: Fix spurious SCL timeouts under heavy load commit 8ee161ce5e0cfc689eb677f227a6248191165fac upstream. When the system is under heavy load, there can be a significant delay between the getscl() and time_after() calls inside sclhi(). That delay may cause the time_after() check to trigger after SCL has gone high, causing sclhi() to return -ETIMEDOUT. To fix the problem, double check that SCL is still low after the timeout has been reached, before deciding to return -ETIMEDOUT. Signed-off-by: Ville Syrjala Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed