diff options
Diffstat (limited to 'sys/arch/mac68k/dev/z8530tty.c')
-rw-r--r-- | sys/arch/mac68k/dev/z8530tty.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/sys/arch/mac68k/dev/z8530tty.c b/sys/arch/mac68k/dev/z8530tty.c index 2ebf29f0465..3b09e9432e0 100644 --- a/sys/arch/mac68k/dev/z8530tty.c +++ b/sys/arch/mac68k/dev/z8530tty.c @@ -1,5 +1,5 @@ -/* $OpenBSD: z8530tty.c,v 1.3 1996/09/02 15:50:35 briggs Exp $ */ -/* $NetBSD: z8530tty.c,v 1.3 1996/06/01 00:13:41 scottr Exp $ */ +/* $OpenBSD: z8530tty.c,v 1.4 1996/10/13 15:29:08 briggs Exp $ */ +/* $NetBSD: z8530tty.c,v 1.7 1996/10/13 03:21:30 christos Exp $ */ /* * Copyright (c) 1994 Gordon W. Ross @@ -615,13 +615,14 @@ zsstart(tp) selwakeup(&tp->t_wsel); } + (void) splzs(); + nch = ndqb(&tp->t_outq, 0); /* XXX */ if (nch) { register char *p = tp->t_outq.c_cf; /* mark busy, enable tx done interrupts, & send first byte */ tp->t_state |= TS_BUSY; - (void) splzs(); cs->cs_preg[1] |= ZSWR1_TIE; cs->cs_creg[1] = cs->cs_preg[1]; @@ -634,7 +635,6 @@ zsstart(tp) * Nothing to send, turn off transmit done interrupts. * This is useful if something is doing polled output. */ - (void) splzs(); cs->cs_preg[1] &= ~ZSWR1_TIE; cs->cs_creg[1] = cs->cs_preg[1]; zs_write_reg(cs, 1, cs->cs_creg[1]); @@ -646,7 +646,7 @@ out: /* * Stop output, e.g., for ^S or output flush. */ -int +void zsstop(tp, flag) struct tty *tp; int flag; @@ -669,7 +669,6 @@ zsstop(tp, flag) tp->t_state |= TS_FLUSH; } splx(s); - return (0); } #ifndef ZS_TOLERANCE @@ -1238,8 +1237,7 @@ zstty_stint(cs) * Check here for console break, so that we can abort * even when interrupts are locking up the machine. */ - if ((rr0 & ZSRR0_BREAK) && - (zst->zst_hwflags & ZS_HWFLAG_CONABRT)) + if ((rr0 & ZSRR0_BREAK)) { zs_abort(zst); return; @@ -1258,7 +1256,8 @@ zstty_stint(cs) zst->zst_tx_stopped = 1; } - cs->cs_rr0_new = rr0; + cs->cs_rr0_changes |= cs->cs_rr0 ^ rr0; + cs->cs_rr0 = rr0; zst->zst_st_check = 1; /* Ask for softint() call. */ @@ -1380,9 +1379,9 @@ zstty_softint(cs) if (zst->zst_st_check) { zst->zst_st_check = 0; - rr0 = cs->cs_rr0_new; - delta = rr0 ^ cs->cs_rr0; - cs->cs_rr0 = rr0; + rr0 = cs->cs_rr0; + delta = cs->cs_rr0_changes; + cs->cs_rr0_changes = 0; if ((delta & ZSRR0_DCD) && ~(zst->zst_hwflags & ZS_HWFLAG_IGDCD)) { c = ((rr0 & ZSRR0_DCD) != 0); |