diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2009-08-27 16:45:21 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2009-08-27 16:45:21 +0000 |
commit | 9a2619021a39d922e470d301ee58b89cc1cd43e1 (patch) | |
tree | 718ef838954dcb79e15ac2a3b162bfe2cca5430c /sys | |
parent | fc799c2b12fef83615f04485addd98964e3f6c8b (diff) |
Bring in NetBSD's rev 1.45 by Matthias Drochner
'Reduce polling of the keyboard controller status by a factor of 1000.
While on real hardware hardware a poll cycle takes time in the
microsecond order of magnitude, a "legacy-free" system which emulates
the KBC in BIOS code takes milliseconds -- I'm seeing a multi-minute
delay in booting where the KBC is probed. So poll less and use delay()
to compensate so that the total wait time stays about the same.'
Noticeably helps some machines that do SMM based pckbc.
Tested by miod on alpha glass console.
ok miod@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/pckbc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ic/pckbc.c b/sys/dev/ic/pckbc.c index 36c2599570c..6171b156fc6 100644 --- a/sys/dev/ic/pckbc.c +++ b/sys/dev/ic/pckbc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pckbc.c,v 1.19 2009/08/25 19:16:36 miod Exp $ */ +/* $OpenBSD: pckbc.c,v 1.20 2009/08/27 16:45:20 jsg Exp $ */ /* $NetBSD: pckbc.c,v 1.5 2000/06/09 04:58:35 soda Exp $ */ /* @@ -142,8 +142,8 @@ pckbc_poll_data1(iot, ioh_d, ioh_c, slot, checkaux) int i; u_char stat; - /* if 1 port read takes 1us (?), this polls for 100ms */ - for (i = 100000; i; i--) { + /* polls for ~100ms */ + for (i = 100; i; i--, delay(1000)) { stat = bus_space_read_1(iot, ioh_c, 0); if (stat & KBS_DIB) { register u_char c; |