summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/cx.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1995-10-07 20:07:18 +0000
committerbde <bde@FreeBSD.org>1995-10-07 20:07:18 +0000
commita04727abd8663f09834c64ef47ada72067e29c83 (patch)
treeeb074b08021c94338d4c1294138916a04cec2ab8 /sys/i386/isa/cx.c
parentbf6129211c1a1ff5fbcd16d2b72f52804fd85498 (diff)
downloadFreeBSD-src-a04727abd8663f09834c64ef47ada72067e29c83.zip
FreeBSD-src-a04727abd8663f09834c64ef47ada72067e29c83.tar.gz
Restore my changes from revisions 1.8, 1.9 and 1.10. They were blown away
be the previous commit. It didn't even compile.
Diffstat (limited to 'sys/i386/isa/cx.c')
-rw-r--r--sys/i386/isa/cx.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/i386/isa/cx.c b/sys/i386/isa/cx.c
index c01c157..d057219 100644
--- a/sys/i386/isa/cx.c
+++ b/sys/i386/isa/cx.c
@@ -56,9 +56,11 @@
# define t_out t_outq
# define RB_LEN(q) ((q).c_cc)
# define RB_GETC(q) getc(&q)
+#ifndef TSA_CARR_ON /* FreeBSD 2.x before not long after 2.0.5 */
# define TSA_CARR_ON(tp) tp
# define TSA_OLOWAT(q) ((caddr_t)&(q)->t_out)
#endif
+#endif
#include <machine/cronyx.h>
#include <i386/isa/cxreg.h>
@@ -197,7 +199,7 @@ int cxopen (dev_t dev, int flag, int mode, struct proc *p)
cx_chan_rts (c, 1);
}
if (cx_chan_cd (c))
- tp->t_state |= TS_CARR_ON;
+ (*linesw[tp->t_line].l_modem)(tp, 1);
if (! (flag & O_NONBLOCK)) {
/* Lock the channel against cxconfig while we are
* waiting for carrier. */
@@ -594,6 +596,9 @@ void cxoproc (struct tty *tp)
if (tp->t_state & (TS_SO_OCOMPLETE | TS_SO_OLOWAT) || tp->t_wsel)
ttwwakeup (tp);
#else /* FreeBSD 2.x and BSDI */
+#ifndef TS_ASLEEP /* FreeBSD some time after 2.0.5 */
+ ttwwakeup(tp);
+#else
if (RB_LEN (tp->t_out) <= tp->t_lowat) {
if (tp->t_state & TS_ASLEEP) {
tp->t_state &= ~TS_ASLEEP;
@@ -602,6 +607,7 @@ void cxoproc (struct tty *tp)
selwakeup(&tp->t_wsel);
}
#endif
+#endif
splx (s);
}
OpenPOWER on IntegriCloud