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

Henrique de Moraes Holschuh linux-thinkpad@linux-thinkpad.org
Mon, 28 Aug 2006 19:21:14 -0300


On Mon, 28 Aug 2006, TNKS wrote:
> I think Henrique was absolutely right.  I did the kind of experimentation he
> was looking for and changing 0x08 back to 0x0b was the only change that
> broke the patch.

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...

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).

If the delay fixes it, please try a delay of 5000 (5ms instead of 10ms) as
well.

> My current system has the necessary 0x08 guard on the arg0 looping,
> the "ndelay(1000)" line commented out, and also TPC_REQUEST_RETRIES set
> back to 100.  And it doesn't hang when I poll dump.

Good.  This makes the puzzle worse, but at least it makes sense...

> By the way, I can't believe this, but www.sneakemail.com seems to have lost
> its domain sometime today.  I'm completely flustered about this, because I

Their DNS is realy, really broken.  The domain is still ok, apparently.

-- 
  "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