summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2010-09-27 18:16:26 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2010-09-27 18:16:26 +0000
commit8a9feb9f54d7090919e37c94406de7dde4d0abc2 (patch)
treeb2b2fd127cb06df54c74ecb012d668634ec78e6f
parent8d65c00a43d84ed465e61b8885770992837db60b (diff)
Make sure the SEND_DEV_ID command is sent synchronously, so the response buffer
is valid when we look at it. Repairs intellimouse (former pmsi) operation.
-rw-r--r--sys/dev/pckbc/pms.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/pckbc/pms.c b/sys/dev/pckbc/pms.c
index fea15ba5416..d34d2de9526 100644
--- a/sys/dev/pckbc/pms.c
+++ b/sys/dev/pckbc/pms.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pms.c,v 1.4 2010/09/26 20:39:08 miod Exp $ */
+/* $OpenBSD: pms.c,v 1.5 2010/09/27 18:16:25 miod Exp $ */
/* $NetBSD: psm.c,v 1.11 2000/06/05 22:20:57 sommerfeld Exp $ */
/*-
@@ -96,7 +96,7 @@ pms_setintellimode(pckbc_tag_t tag, pckbc_slot_t slot)
}
cmd[0] = PMS_SEND_DEV_ID;
- res = pckbc_enqueue_cmd(tag, slot, cmd, 1, 1, 0, resp);
+ res = pckbc_enqueue_cmd(tag, slot, cmd, 1, 1, 1, resp);
if (res || resp[0] != 3)
return (0);
@@ -231,6 +231,7 @@ pms_change_state(struct pms_softc *sc, int newstate)
pckbc_slot_enable(sc->sc_kbctag, sc->sc_kbcslot, 1);
+ pckbc_flush(sc->sc_kbctag, sc->sc_kbcslot);
sc->intelli = pms_setintellimode(sc->sc_kbctag, sc->sc_kbcslot);
cmd[0] = PMS_DEV_ENABLE;