summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorjakllsch <jakllsch@NetBSD.org>2014-01-11 20:17:56 +0000
committerjakllsch <jakllsch@NetBSD.org>2014-01-11 20:17:56 +0000
commit79bb63029eb0ea79bdeee5afb9daa176d0bb055b (patch)
tree9035ca163e1b31c6a9954a4e0173d6e8c98ea15e /sys/dev/ic
parent6e9c510e2c626417a70e43ae7074ca1c32a2ac7d (diff)
Do not take data from the controller in interrupt handler if we are polling.
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/pckbc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/ic/pckbc.c b/sys/dev/ic/pckbc.c
index 842816b88b4..5a382666ade 100644
--- a/sys/dev/ic/pckbc.c
+++ b/sys/dev/ic/pckbc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pckbc.c,v 1.55 2013/09/15 09:21:21 martin Exp $ */
+/* $NetBSD: pckbc.c,v 1.56 2014/01/11 20:17:56 jakllsch Exp $ */
/*
* Copyright (c) 2004 Ben Harris.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pckbc.c,v 1.55 2013/09/15 09:21:21 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pckbc.c,v 1.56 2014/01/11 20:17:56 jakllsch Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -597,12 +597,14 @@ pckbcintr(void *vsc)
if (!(stat & KBS_DIB))
break;
- served = 1;
-
slot = (t->t_haveaux && (stat & 0x20)) ?
PCKBC_AUX_SLOT : PCKBC_KBD_SLOT;
q = t->t_slotdata[slot];
+ if (q != NULL && q->polling)
+ return 0;
+
+ served = 1;
KBD_DELAY;
data = bus_space_read_1(t->t_iot, t->t_ioh_d, 0);