Re: BUG: pc_keyb.c

From: Andries.Brouwer@cwi.nl
Date: Tue Aug 21 2001 - 10:45:39 EST


    From alan@lxorguk.ukuu.org.uk Tue Aug 21 00:48:32 2001

> But the present code does not guarantee such a delay at all.
> For example, kbd_write_cmd() does
> kb_wait();
> outb(...);
> kb_wait();
> where the second kb_wait reads the status very quickly after the first.

    Thats wrong by the spec. I dug out my docs - there is a required 1mS (not
    2 tho) delay for keyboard port accesses.

Since there are various keyboard and mouse paths that can lead to
register access, it seems that we must either prefix each access
by a wait, or otherwise we must remember at what time we last did
a read.

Something else is that on some ancient (MCA) systems a delay is required
between finding the ready bit and actually reading the data
(Frank van Gilluwe, p. 273: wait 7 us).

On the other hand, 1 ms is a very long time these days; it is a bit
surprising that modern hardware should need delays in that order of
magnitude; maybe the problem is elsewhere and the mdelay(2) happens
to change the timing and avoid the problem.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Aug 23 2001 - 21:00:43 EST