Subject: Re: SA kernel hangs while initialising keyboard
To: Adam Gundy <adam@impala.demon.co.uk>
From: Jasper Wallace <jasper@ivision.co.uk>
List: port-arm32
Date: 01/03/1997 17:18:36
On Thu, 2 Jan 1997, Adam Gundy wrote:

> In message <9612211818.ZM9210@physig4.ph.kcl.ac.uk> you wrote:
> 
> > >If I boot into RiscBSD after my machine has been switched on for
> > >a while ( ie more than 5 minutes ), the kernel will hang while
> > >initialising the keyboard - all the keyboard lights come on, then
> > >stay on...
> > 
> > WHen you say stay on do you mean that they pulse quite fast continually ?
> > or are they solidly on ?
> 
> firstly, sorry for the delay in replying - I tried to have 2 weeks
> with no computer over Xmas (I didn't succeed...)
> 
> the lights on the keyboard pulse when the kernel hangs. Unfortunately
> it's difficult to repeat - leaving the machine on for 5 mins then booting
> usually does the trick, except when you _want_ it to hang... ;-)

This is a known bug/problem with the keyboard reset code, I had the same
thing happen, Mark says it's a problem with kbdreset() in
/arm32/mainbus/kbd.c:

ok leave it long enough and it will continue. This is on my todo list.
The problem occurs in the keyboard reset routine. There are occasions when
the
keyboard fails to respond correctly on in the expected time to a reset
command.
If so the driver tries again and again .... eventually it gives up but not   
until rather a lot of retries.
The quick fix is to increase the wait time for each retry or to reduce the
number of retries.

Ohhh, just looking at the code. I delays 1ms each retry and will retry
100000
times so that means if the that after 100secs it should continue the boot.
I think that retry count could be reduced by a factor of 10 at least.

If you want to patch it look at kbdreset() in arm32/mainbus/kbd.c



-- 
Jasper Wallace-Internet Vision | Caving-Acorn-RiscBSD-Chocolate-Banks-Fish
My opinions != IVisions's      | PovRay-FVWM-Perl-C-Mono-Food-Wired-?
E-Mail:jasper@ivision.co.uk    | This is the Internet, untamed and free,
Tel: +44 171 589 4500 (work)   | Where you can be anything you want to be