summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-03-12 20:24:17 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-03-12 20:24:17 +0000
commit96e640797bd4cc0ddd04f8191e8b395b4d3e6f36 (patch)
tree491fceee8350b4f9ed9f736d144b26955183690a
parentf1d4196fd964b653e0bdadd7591fded288a910b7 (diff)
If while attaching pckbdc device slots, we find a slot has failed to
attach and it happens to be the AUX port, aha: we are a kernel without the pms driver. In that case, we should reset that pms back into 'stupid mode'. It seems some BIOS initialize newer-style nubbins/touchpads into strange (advanced) modes, which can muddle up the pckbc pipe. This is experienced as 10-second typing pauses and strange repeat behaviour on the RAMDISK, but was eventually tied to "lightly brushing" the touchpad... work done at s2k15 with jcs
-rw-r--r--sys/dev/ic/pckbc.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/ic/pckbc.c b/sys/dev/ic/pckbc.c
index bbdec9ddb04..471d5fbcbc1 100644
--- a/sys/dev/ic/pckbc.c
+++ b/sys/dev/ic/pckbc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pckbc.c,v 1.43 2014/12/19 07:23:57 deraadt Exp $ */
+/* $OpenBSD: pckbc.c,v 1.44 2015/03/12 20:24:16 deraadt Exp $ */
/* $NetBSD: pckbc.c,v 1.5 2000/06/09 04:58:35 soda Exp $ */
/*
@@ -41,6 +41,7 @@
#include <dev/ic/i8042reg.h>
#include <dev/ic/pckbcvar.h>
+#include <dev/pckbc/pmsreg.h>
#include "pckbd.h"
@@ -277,6 +278,12 @@ pckbc_attach_slot(struct pckbc_softc *sc, pckbc_slot_t slot, int force)
if (t->t_slotdata[slot] == NULL)
return 0;
pckbc_init_slotdata(t->t_slotdata[slot]);
+ } else if (!found && slot == PCKBC_AUX_SLOT) {
+ u_char cmd[1] = { PMS_RESET };
+
+ (void) pckbc_poll_cmd(t, PCKBC_AUX_SLOT, cmd, sizeof cmd,
+ 0, NULL, 1);
+ pckbc_slot_enable(t, PCKBC_AUX_SLOT, 0);
}
return (found);
}