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

TNKS linux-thinkpad@linux-thinkpad.org
Tue, 29 Aug 2006 05:43:36 -0500


Henrique de Moraes Holschuh wrote:
 
> I don't believe calling function 0x0b is the problem, though.  You can
> play with that loop (e.g. making it start on 0x07 and end on 0x0b, and
> even start AND end with 0x0b :p) to verify this...

I didn't exactly do testing you recommended above (just because I got caught
up playing around with the udelay's).  But I did reduce the guard from 0x0b
to 0x0a.  And the problem went away... no delays needed.  There's a pretty
big difference between 0ms and 10ms.  I'm feeling like there /is/ something
special about 0x0b. Well, I /know/ something is special about it, because I
do get warnings when I do the dump:

thinkpad_ec: thinkpad_ec_read_data: 0x161F reports error: (0x0b:0x00)->0x80.  

They fill up my dmesg.  One for every EC access.

> If you add a "udelay(10000);" inside the arg0 loop right after (or right
> before, the net effect is the same) the EC calls (there are two calls, so
> you will need to add two udelay()), and let the loop do its usual job of
> 0x00 to 0x0b, does it stop the crash?
> 
> My pet theory right now is that we are drowning out the EC with too many
> consecutive requests, so it ends up not doing something it should be doing
> instead...  A delay of 10ms between requests should give even a dog-slow
> 10MHz H8 time to process *way* enough instructions to complete the LPC3
> transaction AND go back to whatever it was doing when we interrupted it
> (the Renesas H8S manual is pretty clear that LPC transactions are
> interrupts).

Unfortunately, although the problem seems /slightly/ diminished, it still
hangs every time with a delay of 10ms before every EC read.  It takes a few
seconds longer with this delay.  It's not a instantaneous as it was before.

I didn't play around with widening the delay farther beyond 10ms.  I'm
apprehensive of trying to delay ourselves out of this bug.  The issue just
seems to involve some kind of crazy system condition when there's a problem
reading EC data.  I'd feel more comfortable if we could just avoid the read
on systems that don't seem to support it.

Hopefully we can reach some kind of consensus soon.  Keep me posted.

(Sneakemail's back. . . thank god)

- Sukant