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

Henrique de Moraes Holschuh linux-thinkpad@linux-thinkpad.org
Sun, 27 Aug 2006 21:12:31 -0300


On Sun, 27 Aug 2006, TNKS wrote:
> I don't know if the things you did in the patch were excessive and not
> something you'd want to release officially.  If it is, hopefully with just
> a few more iterations we can settle on changes you're happy with.

The fact is that we really have to root out exactly which change fixed the
issue, because it is indeed hanging the EC if you lose the keyboard.

Were it just a problem that made thinkpad_ec lose sync to the EC, thus just
breaking tp_smapi and hdaps, it would be nothing to lose sleep over, but
since it is hanging the EC, we really ought to learn exactly what made the
difference.

TNKS, I know this is asking a bit too much, but since you're the only one so
far who can reproduce the issue easily, would you bear with us and help us
track down the exact part of the patch that fixed the issue?

I *did* notice something weird in my T43 with the very *last* input line in
the dump request, and now that I know it is there, it also shows in your
dump too.  That would mean only the *last* change in the patch (the for
loop) has some chance of being the culprit.  

I ask you to edit your *patched* (i.e. the one that is not hanging)
tp_smapi, and change that 0x08 in the "for (arg0=0x00; arg0<=0x08; ++arg0)
{" line around line number 1110 of tp_smapi.c, back to 0x0b.

If it hangs, please send us the dmesg of the hang.

If it doesn't hang, could you please *also* revert the following changes,
one at a time, and check if that hangs the EC, and if it does, send us the
dmesg output?

	1. remove the added "ndelay(1000);¨  around line 155, thinkpad_ec.c;
	   leave the rest of the changes alone, as they will just generate
	   a helpful warning.

	2. define TPC_REQUEST_RETRIES to 100 instead of 1000 (around line
	   62 of thinkpad_ec.c);

Sorry about asking for all this.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh