summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorAlexandr Shadchin <shadchin@cvs.openbsd.org>2015-05-05 16:27:21 +0000
committerAlexandr Shadchin <shadchin@cvs.openbsd.org>2015-05-05 16:27:21 +0000
commit59802ffb5702bbe4ccd0d8b924bf41b11d11d916 (patch)
treeb97be297d578c8413381ae86204052740972b2ff /sys/dev
parent6248c5e24f352718f86271e33980c47fe069dcd3 (diff)
Less magic number
For PS/2 - status byte - bit 5: The bit is '1' if the data on input port 60h came from the AUX port, or '0' if the data came from the keyboard or from the keyboard controller itself. KBS_TERR (kbd transmission error) was valid for AT-mode, but not for PS/2-mode. ok ratchov@, miod@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/i8042reg.h4
-rw-r--r--sys/dev/ic/pckbc.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/ic/i8042reg.h b/sys/dev/ic/i8042reg.h
index ef3ad189a22..01ccc71c6f1 100644
--- a/sys/dev/ic/i8042reg.h
+++ b/sys/dev/ic/i8042reg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: i8042reg.h,v 1.8 2013/12/25 21:01:01 miod Exp $ */
+/* $OpenBSD: i8042reg.h,v 1.9 2015/05/05 16:27:20 shadchin Exp $ */
/* $NetBSD: i8042reg.h,v 1.7 1998/01/18 14:41:37 drochner Exp $ */
#define KBSTATP 4 /* kbd controller status port (I) */
@@ -7,7 +7,7 @@
#define KBS_WARM 0x04 /* kbd input buffer low */
#define KBS_OCMD 0x08 /* kbd output buffer has command */
#define KBS_NOSEC 0x10 /* kbd security lock not engaged */
-#define KBS_TERR 0x20 /* kbd transmission error */
+#define KBS_AUXDATA 0x20 /* kbd data in buffer from aux port */
#define KBS_RERR 0x40 /* kbd receive error */
#define KBS_PERR 0x80 /* kbd parity error */
diff --git a/sys/dev/ic/pckbc.c b/sys/dev/ic/pckbc.c
index c0782380030..ed34dd35ecb 100644
--- a/sys/dev/ic/pckbc.c
+++ b/sys/dev/ic/pckbc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pckbc.c,v 1.47 2015/03/31 02:27:30 jcs Exp $ */
+/* $OpenBSD: pckbc.c,v 1.48 2015/05/05 16:27:20 shadchin Exp $ */
/* $NetBSD: pckbc.c,v 1.5 2000/06/09 04:58:35 soda Exp $ */
/*
@@ -153,7 +153,7 @@ pckbc_poll_data1(bus_space_tag_t iot, bus_space_handle_t ioh_d,
KBD_DELAY;
CPU_BUSY_CYCLE();
c = bus_space_read_1(iot, ioh_d, 0);
- if (checkaux && (stat & 0x20)) { /* aux data */
+ if (checkaux && (stat & KBS_AUXDATA)) {
if (slot != PCKBC_AUX_SLOT) {
DPRINTF("lost aux 0x%x\n", c);
continue;
@@ -998,7 +998,7 @@ pckbcintr_internal(struct pckbc_internal *t, struct pckbc_softc *sc)
served = 1;
- slot = (t->t_haveaux && (stat & 0x20)) ?
+ slot = (t->t_haveaux && (stat & KBS_AUXDATA)) ?
PCKBC_AUX_SLOT : PCKBC_KBD_SLOT;
q = t->t_slotdata[slot];