partial merge with NetBSD
authorkstailey <kstailey@openbsd.org>
Tue, 3 Dec 1996 07:36:29 +0000 (07:36 +0000)
committerkstailey <kstailey@openbsd.org>
Tue, 3 Dec 1996 07:36:29 +0000 (07:36 +0000)
sys/dev/sun/kbd.c
sys/dev/sun/ms.c

index 51fc79a..3ec2444 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: kbd.c,v 1.4 1996/05/26 00:27:49 deraadt Exp $ */
+/*     $OpenBSD: kbd.c,v 1.5 1996/12/03 07:36:32 kstailey Exp $        */
 /*     $NetBSD: kbd.c,v 1.8 1996/05/17 19:32:06 gwr Exp $      */
 
 /*
@@ -1034,7 +1034,7 @@ kbd_stint(cs)
 
        k = cs->cs_private;
 
-       cs->cs_rr0_new = zs_read_csr(cs);
+       rr0 = zs_read_csr(cs);
        zs_write_csr(cs, ZSWR0_RESET_STATUS);
 
 #if 0
@@ -1045,7 +1045,10 @@ kbd_stint(cs)
        }
 #endif
 
+       cs->cs_rr0_delta |= (cs->cs_rr0 ^ rr0);
+       cs->cs_rr0 = rr0;
        k->k_intr_flags |= INTR_ST_CHECK;
+
        /* Ask for softint() call. */
        cs->cs_softreq = 1;
 }
@@ -1126,7 +1129,7 @@ kbd_softint(cs)
                 */
                log(LOG_ERR, "%s: status interrupt?\n",
                    k->k_dev.dv_xname);
-               cs->cs_rr0 = cs->cs_rr0_new;
+               cs->cs_rr0_delta = 0;
        }
 
        splx(s);
index cf28bde..1ea4fb9 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: ms.c,v 1.4 1996/05/26 00:27:50 deraadt Exp $  */
+/*     $OpenBSD: ms.c,v 1.5 1996/12/03 07:36:29 kstailey Exp $ */
 /*     $NetBSD: ms.c,v 1.6 1996/05/17 19:32:09 gwr Exp $       */
 
 /*
@@ -544,10 +544,13 @@ ms_stint(cs)
 
        ms = cs->cs_private;
 
-       cs->cs_rr0_new = zs_read_csr(cs);
+       rr0 = zs_read_csr(cs);
        zs_write_csr(cs, ZSWR0_RESET_STATUS);
 
+       cs->cs_rr0_delta |= (cs->cs_rr0 ^ rr0);
+       cs->cs_rr0 = rr0;
        ms->ms_intr_flags |= INTR_ST_CHECK;
+
        /* Ask for softint() call. */
        cs->cs_softreq = 1;
 }
@@ -615,7 +618,7 @@ ms_softint(cs)
                 */
                log(LOG_ERR, "%s: status interrupt?\n",
                    ms->ms_dev.dv_xname);
-               cs->cs_rr0 = cs->cs_rr0_new;
+               cs->cs_rr0_delta = 0;
        }
 
        splx(s);