summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>2000-12-19 06:58:40 +0000
committerConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>2000-12-19 06:58:40 +0000
commit135df068726fceeb3fd0e44f16868d8a2089e3d4 (patch)
tree232b4a305dc06ea94125756f193edee2828530da
parentf75a5344ac66f9ab3e9de8c22e308cbd146af9b3 (diff)
This fixes keyboard lock-ups I was getting wiggling the mouse in
console mode while using my omnicube KVM switch. The keyboard lock-ups were caused by the keyboard/mouse interface controller's input buffer filling up. This was caused because the mouse was sending data to the computer and the pms driver wasn't draining it. The driver used to rely on the fact that it could disable the mouse device when the mouse driver was closed. Disabling the mouse device prevents it from sending data to the computer. At the same time pms disabled the mouse device, pms disabled interrupt notification of the arrival of new data. This regime doesn't work so well with KVM switches which re-enable the mouse. In this case, the mouse will send data to the computer but the keyboard/moust interface controller won't raise an interrupt (because pms disabled interrupts). pms will never read from the input buffer.
-rw-r--r--sys/arch/i386/isa/pms.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/arch/i386/isa/pms.c b/sys/arch/i386/isa/pms.c
index 78f16e35fc1..3d2e16a0faf 100644
--- a/sys/arch/i386/isa/pms.c
+++ b/sys/arch/i386/isa/pms.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pms.c,v 1.27 2000/09/21 15:52:47 mickey Exp $ */
+/* $OpenBSD: pms.c,v 1.28 2000/12/19 06:58:39 csapuntz Exp $ */
/* $NetBSD: pms.c,v 1.29 1996/05/12 23:12:42 mycroft Exp $ */
/*-
@@ -244,6 +244,8 @@ pmsattach(parent, self, aux)
sc->sc_ih = isa_intr_establish(ic, irq, IST_EDGE, IPL_TTY,
pmsintr, sc, sc->sc_dev.dv_xname);
+
+ pms_pit_cmd(PMS_INT_ENABLE);
}
int
@@ -318,9 +320,10 @@ pmsclose(dev, flag, mode, p)
/* Disable interrupts. */
/* pms_dev_cmd(PMS_DEV_DISABLE); */
+#if 0
pms_pit_cmd(PMS_INT_DISABLE);
pms_aux_cmd(PMS_AUX_DISABLE);
-
+#endif
sc->sc_state &= ~PMS_OPEN;
sc->sc_io = NULL;