Keyboard timed out

Andries.Brouwer@cwi.nl
Thu, 19 Oct 1995 13:17:48 +0100


: From: linux-kernel@Infodrom.North.DE (Torsten Neumann)
: Date: Wed, 11 Oct 95 19:41 MET
: Subject: probs with Kernel 1.3.32
:
: Suddenly I wasn't able to strike any key nor to move my mouse. Nothing
: happenend so I thougt my linux-box died. Sending pings from another
: machine just gave the same result : no answer.
: But after a while ( 3 minutes or so ) everything was fine again.
: All I found was the following messages :
: Oct 11 18:31:52 vir kernel: Keyboard timed out
: Oct 11 18:31:52 vir last message repeated 75 times
: could somebody tell me what happens ?

Well, the routine keyboard_interrupt() does
send_cmd(0xAD); /* disable keyboard */
and
kb_wait();
and
send_cmd(0xAE); /* enable keyboard */
where send_cmd() first does a kb_wait() and then sends a byte
to the keyboard. And kb_wait() looks like
static inline void kb_wait(void)
{
int i;

for (i=0; i<0x100000; i++)
if ((inb_p(0x64) & 0x02) == 0)
return;
printk("Keyboard timed out\n");
}
So, since this happens in an interrupt routine,
if the keyboard refuses to react, we are deaf for
a long time (three times the keyboard timeout).