Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic Do not take data from the controller in interrupt...



details:   https://anonhg.NetBSD.org/src/rev/bfcf0c880fae
branches:  trunk
changeset: 325931:bfcf0c880fae
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Sat Jan 11 20:17:56 2014 +0000

description:
Do not take data from the controller in interrupt handler if we are polling.

diffstat:

 sys/dev/ic/pckbc.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (35 lines):

diff -r 4614ef1e758b -r bfcf0c880fae sys/dev/ic/pckbc.c
--- a/sys/dev/ic/pckbc.c        Sat Jan 11 19:48:22 2014 +0000
+++ b/sys/dev/ic/pckbc.c        Sat Jan 11 20:17:56 2014 +0000
@@ -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 @@
                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);
 



Home | Main Index | Thread Index | Old Index