summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornate <nate@FreeBSD.org>1996-05-07 21:48:55 +0000
committernate <nate@FreeBSD.org>1996-05-07 21:48:55 +0000
commit3fd47327baeab4086c7ca24ac783b876954f490d (patch)
tree356e9c589c87c0e1e85255e9f4b0221a62a47371
parent36bfdcbabee4f451b0e0983e49e7482fc2c43e4c (diff)
downloadFreeBSD-src-3fd47327baeab4086c7ca24ac783b876954f490d.zip
FreeBSD-src-3fd47327baeab4086c7ca24ac783b876954f490d.tar.gz
Added code to avoid keyboard 'hangs' during the probe.
Submitted by: Richard Wiwatowski <rjwiwat@adelaide.on.net>
-rw-r--r--sys/i386/isa/psm.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/i386/isa/psm.c b/sys/i386/isa/psm.c
index b4b8ee8..2dcd7c5 100644
--- a/sys/i386/isa/psm.c
+++ b/sys/i386/isa/psm.c
@@ -60,6 +60,7 @@
#endif /*DEVFS*/
#include <machine/mouse.h>
+#include <machine/clock.h>
#include <i386/isa/isa_device.h>
@@ -75,7 +76,7 @@
#define PSM_INT_DISABLE 0x65 /* disable controller interrupts */
#define PSM_DISABLE 0xa7 /* disable auxiliary port */
#define PSM_ENABLE 0xa8 /* enable auxiliary port */
-#define PSM_ENABLE 0xa9 /* test auxiliary port */
+#define PSM_AUX_TEST 0xa9 /* test auxiliary port */
/* mouse commands */
#define PSM_SET_SCALE11 0xe6 /* set 1:1 scaling */
@@ -187,6 +188,7 @@ psmprobe(struct isa_device *dvp)
ioport=dvp->id_iobase;
unit=dvp->id_unit;
+
#ifndef PSM_NO_RESET
psm_write_dev(ioport, PSM_RESET); /* Reset aux device */
#endif
@@ -302,8 +304,11 @@ psm_poll_status(int ioport)
u_char c;
while(c = inb(ioport+PSM_STATUS) & 0x03)
- if(c & PSM_OUTPUT_ACK == PSM_OUTPUT_ACK)
+ if(c & PSM_OUTPUT_ACK == PSM_OUTPUT_ACK) {
+ /* XXX - Avoids some keyboard hangs during probe */
+ DELAY(6);
inb(ioport+PSM_DATA);
+ }
return;
}
OpenPOWER on IntegriCloud