diff options
| author | mycroft <mycroft@NetBSD.org> | 1997-11-02 08:50:31 +0000 |
|---|---|---|
| committer | mycroft <mycroft@NetBSD.org> | 1997-11-02 08:50:31 +0000 |
| commit | acd97c6676917e5ea298e8b3301ffd2eada72dd3 (patch) | |
| tree | a65c74dbc976d1b40c09034091f5d467a0c2ba96 /sys/dev | |
| parent | 0e2ebc355974e126fd2a7638e39c73231f90d900 (diff) | |
Minimize some spl regions slightly.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/ic/com.c | 13 | ||||
| -rw-r--r-- | sys/dev/ic/z8530tty.c | 11 |
2 files changed, 13 insertions, 11 deletions
diff --git a/sys/dev/ic/com.c b/sys/dev/ic/com.c index bd1a042c45e..d5a2c668a3b 100644 --- a/sys/dev/ic/com.c +++ b/sys/dev/ic/com.c @@ -1,4 +1,4 @@ -/* $NetBSD: com.c,v 1.121 1997/11/01 20:40:38 mycroft Exp $ */ +/* $NetBSD: com.c,v 1.122 1997/11/02 08:50:33 mycroft Exp $ */ /*- * Copyright (c) 1993, 1994, 1995, 1996, 1997 @@ -600,8 +600,6 @@ comopen(dev, flag, mode, p) ttychars(tp); ttsetwater(tp); - s2 = splserial(); - /* * Turn on DTR. We must always do this, even if carrier is not * present, because otherwise we'd have to use TIOCSDTR @@ -611,6 +609,8 @@ comopen(dev, flag, mode, p) */ com_modem(sc, 1); + s2 = splserial(); + /* Clear the input ring, and unblock. */ sc->sc_rbput = sc->sc_rbget = 0; sc->sc_rbavail = RXBUFSIZE; @@ -678,11 +678,12 @@ comclose(dev, flag, mode, p) /* If we were asserting flow control, then deassert it. */ SET(sc->sc_rx_flags, RX_IBUF_BLOCKED); com_hwiflow(sc); - /* Clear any break condition set with TIOCSBRK. */ - com_break(sc, 0); splx(s); + /* Clear any break condition set with TIOCSBRK. */ + com_break(sc, 0); + /* * Hang up if necessary. Wait a bit, so the other side has time to * notice even if we immediately open the port again. @@ -696,7 +697,7 @@ comclose(dev, flag, mode, p) /* Turn off interrupts. */ #ifdef DDB - if(ISSET(sc->sc_hwflags, COM_HW_CONSOLE)) + if (ISSET(sc->sc_hwflags, COM_HW_CONSOLE)) sc->sc_ier = IER_ERXRDY; /* interrupt on break */ else #else diff --git a/sys/dev/ic/z8530tty.c b/sys/dev/ic/z8530tty.c index c69e8641128..27391dc1355 100644 --- a/sys/dev/ic/z8530tty.c +++ b/sys/dev/ic/z8530tty.c @@ -1,4 +1,4 @@ -/* $NetBSD: z8530tty.c,v 1.30 1997/11/02 08:29:51 mycroft Exp $ */ +/* $NetBSD: z8530tty.c,v 1.31 1997/11/02 08:50:31 mycroft Exp $ */ /*- * Copyright (c) 1993, 1994, 1995, 1996, 1997 @@ -448,8 +448,6 @@ zsopen(dev, flags, mode, p) ttychars(tp); ttsetwater(tp); - s2 = splzs(); - /* * Turn on DTR. We must always do this, even if carrier is not * present, because otherwise we'd have to use TIOCSDTR @@ -459,6 +457,8 @@ zsopen(dev, flags, mode, p) */ zs_modem(zst, 1); + s2 = splzs(); + /* Clear the input ring, and unblock. */ zst->zst_rbget = zst->zst_rbput; zs_iflush(cs); @@ -528,11 +528,12 @@ zsclose(dev, flags, mode, p) /* If we were asserting flow control, then deassert it. */ zst->zst_rx_blocked = 1; zs_hwiflow(zst); - /* Clear any break condition set with TIOCSBRK. */ - zs_break(cs, 0); splx(s); + /* Clear any break condition set with TIOCSBRK. */ + zs_break(cs, 0); + /* * Hang up if necessary. Wait a bit, so the other side has time to * notice even if we immediately open the port again. |
