Subject: Re: zs driver still broken?
To: Andreas Eltrich <elchy@dahoam.de>
From: Dr. Bill Studenmund <wrstuden@loki.stanford.edu>
List: tech-kern
Date: 01/31/1999 13:30:56
On Sat, 30 Jan 1999, Andreas Eltrich wrote:

> I built a kernel from friday's sup (NetBSD serva 1.3I NetBSD 1.3I (SERVA) #0: 
> Sat Jan 30 15:04:49 CET 1999 elchy@serva:/usr/src/sys/arch/sparc/compile/SERVA 
> sparc). Mgetty immediately drops the incoming call with this kernel as long
> as "ignore-carrier true" is missing in "mgetty.config". So revision 1.55 of
> sys/dev/ic/z8530tty.c still has the same problem with DCD signal.

Just so everyone else can get in on the fun, I think 1.55 needs this
patch. I sent it to Andreas yesterday. Can anyone else who is having
problems try it?

Index: z8530tty.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/z8530tty.c,v
retrieving revision 1.55
diff -u -r1.55 z8530tty.c
--- z8530tty.c  1999/01/25 17:53:13     1.55
+++ z8530tty.c  1999/01/25 18:51:21
@@ -928,6 +928,12 @@
                zst->zst_r_lowat = zstty_rbuf_lowat;
        }
 
+       /*
+        * Fetch current state of rr0 - it might have changed if
interrupts
+        * were off.
+        */
+       cs->cs_rr0 = zs_read_csr(cs);
+
        splx(s);
 
        /*
@@ -935,8 +941,7 @@
         * CLOCAL or MDMBUF.  We don't hang up here; we only do that by
         * explicit request.
         */
-       (void) (*linesw[tp->t_line].l_modem)(tp,
-                       ISSET(cs->cs_rr0, ZSRR0_DCD));
+       (void) (*linesw[tp->t_line].l_modem)(tp, ISSET(cs->cs_rr0,
ZSRR0_DCD));
 
        if (!ISSET(cflag, CHWFLOW)) {
                if (zst->zst_tx_stopped) {