linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ACPI : Avoid bogus timeout about SMbus check
@ 2008-08-26  5:57 Zhao Yakui
  2008-09-04 12:18 ` Andi Kleen
  0 siblings, 1 reply; 24+ messages in thread
From: Zhao Yakui @ 2008-08-26  5:57 UTC (permalink / raw)
  To: Andi Kleen; +Cc: linux-acpi, lenb, astarikovskiy

Subject: ACPI: Avoid bogus timeout about SMbus check
>From :  Zhao Yakui <yakui.zhao@intel.com>

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>

---
 drivers/acpi/sbshc.c |    7 +++++++
 1 file changed, 7 insertions(+)

Index: linux-2.6/drivers/acpi/sbshc.c
===================================================================
--- linux-2.6.orig/drivers/acpi/sbshc.c
+++ linux-2.6/drivers/acpi/sbshc.c
@@ -107,6 +107,13 @@ static int wait_transaction_complete(str
 	if (wait_event_timeout(hc->wait, smb_check_done(hc),
 			       msecs_to_jiffies(timeout)))
 		return 0;
+	/*
+	 * After the timeout happens, OS will try to check the status of SMbus.
+	 * If the status is what OS expected, it will be regarded as the bogus
+	 * timeout.
+	 */
+	if (smb_check_done(hc))
+		return 0;
 	else
 		return -ETIME;
 }


--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2008-09-14 20:17 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-26  5:57 [PATCH] ACPI : Avoid bogus timeout about SMbus check Zhao Yakui
2008-09-04 12:18 ` Andi Kleen
2008-09-04 12:33   ` patch for bugs 9998 and 10724 Alexey Starikovskiy
2008-09-04 12:35     ` Alexey Starikovskiy
2008-09-04 13:18       ` Andi Kleen
2008-09-05  2:26       ` Zhang Rui
2008-09-05  3:49         ` Zhao Yakui
2008-09-05 12:58           ` Alexey Starikovskiy
2008-09-08  1:18             ` Zhao Yakui
2008-09-05 12:45         ` Alexey Starikovskiy
2008-09-08  2:56           ` Zhang Rui
2008-09-08  8:25             ` Alexey Starikovskiy
2008-09-09  9:13               ` Zhao Yakui
2008-09-09  9:12                 ` Alexey Starikovskiy
2008-09-09  9:28                   ` Alexey Starikovskiy
2008-09-09  9:43                   ` Zhao Yakui
2008-09-09  9:36                     ` Alexey Starikovskiy
2008-09-10  1:15                       ` Zhao Yakui
2008-09-10  2:23                         ` Alexey Starikovskiy
2008-09-11 19:49   ` [PATCH] ACPI : Avoid bogus timeout about SMbus check Oldrich Jedlicka
2008-09-11 21:13     ` Alexey Starikovskiy
2008-09-14 20:06       ` Oldrich Jedlicka
2008-09-12  1:38     ` Zhao Yakui
2008-09-14 20:17       ` Oldrich Jedlicka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).