[ltp] Re: EC Hanging with latest tp-smapi (0.29)

Shem Multinymous linux-thinkpad@linux-thinkpad.org
Wed, 23 Aug 2006 09:46:35 +0300


Hi Sukant,

On 8/22/06, TNKS <0osz0s302@sneakemail.com> wrote:
> I unloaded my old tp_smapi (from /lib/module), patched your the tp_smapi
> tree, make, sudo make load...
>
> but upon spin-polling dump, I have an EC hang that occurs about as fast as
> before.

OK, that rules out one cause. Can you try the following patch too, and
report the first ~20 dmesg lines starting with the first "weird" one?

--- a/thinkpad_ec.c
+++ b/thinkpad_ec.c
@@ -63,3 +63,3 @@
 #define TPC_READ_NDELAY     500
-#define TPC_REQUEST_RETRIES 100
+#define TPC_REQUEST_RETRIES 1000
 #define TPC_REQUEST_NDELAY   10
@@ -229,2 +229,6 @@
 		       MSG_FMT("OBF3B=1 after read (0x%02x)", str3));
+	/* If port 0x161F returns 0x80 too often, the EC may lock up: */
+	if (data->val[0xF] == 0x80)
+		printk(KERN_WARNING
+		       MSG_FMT("0x161F indicates error", data->val[0xF]));
 	return 0;