diff options
| author | mjacob <mjacob@NetBSD.org> | 1998-03-21 23:26:15 +0000 |
|---|---|---|
| committer | mjacob <mjacob@NetBSD.org> | 1998-03-21 23:26:15 +0000 |
| commit | 019508faee467a2e74783e3b034895d120f7165b (patch) | |
| tree | c08c827bcf0a2cafa397ffc28e5288e2a50be70c | |
| parent | 0dae91d9af8f3c444481acc87ce21a3eff895c9d (diff) | |
Well, I don't have a Cyclades board, but I needed the alpha kernels
to compile. I made the changes that seemed to make sense tracking the
shift from TS_WOPEN to tp->t_wopen- but they may be wrong. I wasn't
subscribed to tech-kern so I missed the discussion, and C. Hannum
was not particularly enlightening. Sorry if this isn't quite right.
| -rw-r--r-- | sys/dev/ic/cy.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/ic/cy.c b/sys/dev/ic/cy.c index 4e4beee2055..8b54feda4fc 100644 --- a/sys/dev/ic/cy.c +++ b/sys/dev/ic/cy.c @@ -1,4 +1,4 @@ -/* $NetBSD: cy.c,v 1.8 1998/01/12 09:23:20 thorpej Exp $ */ +/* $NetBSD: cy.c,v 1.9 1998/03/21 23:26:15 mjacob Exp $ */ /* * cy.c @@ -257,8 +257,7 @@ cyopen(dev, flag, mode, p) tp->t_param = cyparam; tp->t_dev = dev; - if (!ISSET(tp->t_state, TS_ISOPEN)) { - SET(tp->t_state, TS_WOPEN); + if (!ISSET(tp->t_state, TS_ISOPEN) && tp->t_wopen == 0) { ttychars(tp); tp->t_iflag = TTYDEF_IFLAG; tp->t_oflag = TTYDEF_OFLAG; @@ -338,9 +337,10 @@ cyopen(dev, flag, mode, p) if (!ISSET(flag, O_NONBLOCK)) { while (!ISSET(tp->t_cflag, CLOCAL) && !ISSET(tp->t_state, TS_CARR_ON)) { - SET(tp->t_state, TS_WOPEN); + tp->t_wopen++; error = ttysleep(tp, &tp->t_rawq, TTIPRI | PCATCH, "cydcd", 0); + tp->t_wopen--; if (error != 0) { splx(s); return error; @@ -919,7 +919,7 @@ cy_poll(arg) port++) { cy = &sc->sc_ports[port]; if ((tp = cy->cy_tty) == NULL || cy->cy_ibuf == NULL || - !ISSET(tp->t_state, TS_ISOPEN | TS_WOPEN)) + !ISSET(tp->t_state, TS_ISOPEN) || tp->t_wopen == 0) continue; /* |
