1/*
2 * Copyright (C) 1995 by Pavel Antonov, Moscow, Russia.
3 * Copyright (C) 1995 by Andrey A. Chernov, Moscow, Russia.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
--- 84 unchanged lines hidden (view full) ---
93static d_open_t rcopen;
94static d_close_t rcclose;
95static d_read_t rcread;
96static d_write_t rcwrite;
97static d_ioctl_t rcioctl;
98static d_stop_t rcstop;
99static d_devtotty_t rcdevtotty;
100
101#define CDEV_MAJOR 63
102static struct cdevsw rc_cdevsw =
103 { rcopen, rcclose, rcread, rcwrite, /*63*/
104 rcioctl, rcstop, noreset, rcdevtotty,/* rc */
105 ttpoll, nommap, NULL, "rc", NULL, -1 };
106
107/* Per-board structure */
108static struct rc_softc {
109 u_int rcb_probed; /* 1 - probed, 2 - attached */
110 u_int rcb_addr; /* Base I/O addr */
111 u_int rcb_unit; /* unit # */
112 u_char rcb_dtr; /* DTR status */
113 struct rc_chans *rcb_baserc; /* base rc ptr */
--- 658 unchanged lines hidden (view full) ---
772 else
773 tp->t_cflag &= ~CLOCAL;
774
775 error = rc_param(tp, &tp->t_termios);
776 if (error)
777 goto out;
778 (void) rc_modctl(rc, TIOCM_RTS|TIOCM_DTR, DMSET);
779
780 ttsetwater(tp);
781
782 if ((rc->rc_msvr & MSVR_CD) || CALLOUT(dev))
783 (*linesw[tp->t_line].l_modem)(tp, 1);
784 }
785 if (!(tp->t_state & TS_CARR_ON) && !CALLOUT(dev)
786 && !(tp->t_cflag & CLOCAL) && !(flag & O_NONBLOCK)) {
787 rc->rc_dcdwaits++;
788 error = tsleep(TSA_CARR_ON(tp), TTIPRI | PCATCH, "rcdcd", 0);
789 rc->rc_dcdwaits--;
--- 718 unchanged lines hidden ---
2 * Copyright (C) 1995 by Pavel Antonov, Moscow, Russia.
3 * Copyright (C) 1995 by Andrey A. Chernov, Moscow, Russia.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
--- 84 unchanged lines hidden (view full) ---
93static d_open_t rcopen;
94static d_close_t rcclose;
95static d_read_t rcread;
96static d_write_t rcwrite;
97static d_ioctl_t rcioctl;
98static d_stop_t rcstop;
99static d_devtotty_t rcdevtotty;
100
101#define CDEV_MAJOR 63
102static struct cdevsw rc_cdevsw =
103 { rcopen, rcclose, rcread, rcwrite, /*63*/
104 rcioctl, rcstop, noreset, rcdevtotty,/* rc */
105 ttpoll, nommap, NULL, "rc", NULL, -1 };
106
107/* Per-board structure */
108static struct rc_softc {
109 u_int rcb_probed; /* 1 - probed, 2 - attached */
110 u_int rcb_addr; /* Base I/O addr */
111 u_int rcb_unit; /* unit # */
112 u_char rcb_dtr; /* DTR status */
113 struct rc_chans *rcb_baserc; /* base rc ptr */
--- 658 unchanged lines hidden (view full) ---
772 else
773 tp->t_cflag &= ~CLOCAL;
774
775 error = rc_param(tp, &tp->t_termios);
776 if (error)
777 goto out;
778 (void) rc_modctl(rc, TIOCM_RTS|TIOCM_DTR, DMSET);
779
780 ttsetwater(tp);
781
782 if ((rc->rc_msvr & MSVR_CD) || CALLOUT(dev))
783 (*linesw[tp->t_line].l_modem)(tp, 1);
784 }
785 if (!(tp->t_state & TS_CARR_ON) && !CALLOUT(dev)
786 && !(tp->t_cflag & CLOCAL) && !(flag & O_NONBLOCK)) {
787 rc->rc_dcdwaits++;
788 error = tsleep(TSA_CARR_ON(tp), TTIPRI | PCATCH, "rcdcd", 0);
789 rc->rc_dcdwaits--;
--- 718 unchanged lines hidden ---