Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x68k/dev Treat receiver overrun of MFP (clear the e...



details:   https://anonhg.NetBSD.org/src/rev/69cbae5a3214
branches:  trunk
changeset: 486540:69cbae5a3214
user:      itohy <itohy%NetBSD.org@localhost>
date:      Thu May 25 03:33:27 2000 +0000

description:
Treat receiver overrun of MFP (clear the error).
Although the keyboard hardware seems to be designed to avoid
overrun, the errors sometimes occur.

diffstat:

 sys/arch/x68k/dev/kbd.c |  12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 9aa281aa3d06 -r 69cbae5a3214 sys/arch/x68k/dev/kbd.c
--- a/sys/arch/x68k/dev/kbd.c   Thu May 25 03:30:19 2000 +0000
+++ b/sys/arch/x68k/dev/kbd.c   Thu May 25 03:33:27 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kbd.c,v 1.9 1999/12/03 00:14:06 itohy Exp $    */
+/*     $NetBSD: kbd.c,v 1.10 2000/05/25 03:33:27 itohy Exp $   */
 
 /*
  * Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@@ -326,12 +326,18 @@
 kbdintr(arg)
        void *arg;
 {
-       u_char c, in;
+       u_char c, st;
        struct kbd_softc *k = arg; /* XXX */
        struct firm_event *fe;
        int put;
 
-       c = in = mfp_get_udr();
+       /* clear receiver error if any */
+       st = mfp_get_rsr();
+
+       c = mfp_get_udr();
+
+       if ((st & MFP_RSR_BF) == 0)
+               return 0;       /* intr caused by an err -- no char received */
 
        /* if not in event mode, deliver straight to ite to process key stroke */
        if (! k->sc_event_mode) {



Home | Main Index | Thread Index | Old Index