aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorZhao Yakui <yakui.zhao@intel.com>2008-08-26 01:57:34 -0400
committerAndi Kleen <ak@linux.intel.com>2008-09-04 08:32:28 -0400
commit266feefeb9ea2d846ac82eb6db1a54b230364ba4 (patch)
tree300ccf4c33715e7a792c086262f717b0555f98c3 /drivers/acpi
parentb635acec48bcaa9183fcbf4e3955616b0d4119b5 (diff)
ACPI: Avoid bogus timeout about SMbus check
In the function of wait_transaction_complete when the timeout happens, OS will try to check the status of SMbus again. If the status is what OS expected, it will be regarded as the bogus timeout. Otherwise it will be treated as ETIME. http://bugzilla.kernel.org/show_bug.cgi?id=10483 Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> tested-by : Oldřich Jedlička < <oldium.pro@seznam.cz> Signed-off-by: Andi Kleen <ak@linux.intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/sbshc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c
index bcf2c70fca87..a4e3767b8c64 100644
--- a/drivers/acpi/sbshc.c
+++ b/drivers/acpi/sbshc.c
@@ -107,6 +107,13 @@ static int wait_transaction_complete(struct acpi_smb_hc *hc, int timeout)
107 if (wait_event_timeout(hc->wait, smb_check_done(hc), 107 if (wait_event_timeout(hc->wait, smb_check_done(hc),
108 msecs_to_jiffies(timeout))) 108 msecs_to_jiffies(timeout)))
109 return 0; 109 return 0;
110 /*
111 * After the timeout happens, OS will try to check the status of SMbus.
112 * If the status is what OS expected, it will be regarded as the bogus
113 * timeout.
114 */
115 if (smb_check_done(hc))
116 return 0;
110 else 117 else
111 return -ETIME; 118 return -ETIME;
112} 119}