summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJoshua Stein <jcs@cvs.openbsd.org>2015-03-31 02:27:31 +0000
committerJoshua Stein <jcs@cvs.openbsd.org>2015-03-31 02:27:31 +0000
commit38a3209966177abac13e955fc570f7fa57312ce0 (patch)
tree9d4183046f6e1f863271ae59e68df4535480dc10 /sys
parent7cbfc20b481be681c1c70cd5ebef516c6a22ce43 (diff)
Upon finding an AUX slot that has no driver for it (such as the
ramdisks that don't have the pms driver), setup a dummy interrupt handler to receive and discard data from the slot. This is a less invasive way of fixing the repeating keys/delay problem that occurs on newer ThinkPads when touching the trackpad/trackstick while typing during the installer. This has been in snapshots for a bit.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ic/pckbc.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/sys/dev/ic/pckbc.c b/sys/dev/ic/pckbc.c
index ba16623fda0..c0782380030 100644
--- a/sys/dev/ic/pckbc.c
+++ b/sys/dev/ic/pckbc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pckbc.c,v 1.46 2015/03/16 01:49:11 jcs Exp $ */
+/* $OpenBSD: pckbc.c,v 1.47 2015/03/31 02:27:30 jcs Exp $ */
/* $NetBSD: pckbc.c,v 1.5 2000/06/09 04:58:35 soda Exp $ */
/*
@@ -40,7 +40,6 @@
#include <dev/ic/i8042reg.h>
#include <dev/ic/pckbcvar.h>
-#include <dev/pckbc/pmsreg.h>
#include "pckbd.h"
@@ -271,12 +270,24 @@ pckbc_attach_slot(struct pckbc_softc *sc, pckbc_slot_t slot, int force)
found = (config_found_sm((struct device *)sc, &pa, pckbcprint,
force ? pckbc_submatch_locators : pckbc_submatch) != NULL);
- if (found && !t->t_slotdata[slot]) {
+ if ((found || slot == PCKBC_AUX_SLOT) && !t->t_slotdata[slot]) {
t->t_slotdata[slot] = malloc(sizeof(struct pckbc_slotdata),
M_DEVBUF, M_NOWAIT);
if (t->t_slotdata[slot] == NULL)
return 0;
pckbc_init_slotdata(t->t_slotdata[slot]);
+
+ if (!found && slot == PCKBC_AUX_SLOT) {
+ /*
+ * Some machines don't handle disabling the aux slot
+ * completely and still generate data when the mouse is
+ * moved, so setup a dummy interrupt handler to discard
+ * this slot's data.
+ */
+ pckbc_set_inputhandler(t, PCKBC_AUX_SLOT, NULL, sc,
+ NULL);
+ found = 1;
+ }
}
return (found);
}