Lines Matching refs:tty
134 struct tty *tty; member
189 static void cx_oproc (struct tty *tp);
190 static int cx_param (struct tty *tp, struct termios *t);
191 static void cx_stop (struct tty *tp, int flag);
300 if (d->atimeout == 1 && d->tty && d->tty->t_state & TS_BUSY) { in cx_timeout()
301 d->tty->t_state &= ~TS_BUSY; in cx_timeout()
302 if (d->tty->t_dev) { in cx_timeout()
851 d->tty = ttyalloc (); in cx_attach()
852 d->tty->t_open = cx_topen; in cx_attach()
853 d->tty->t_close = cx_tclose; in cx_attach()
854 d->tty->t_param = cx_param; in cx_attach()
855 d->tty->t_stop = cx_stop; in cx_attach()
856 d->tty->t_modem = cx_tmodem; in cx_attach()
857 d->tty->t_oproc = cx_oproc; in cx_attach()
858 d->tty->t_sc = d; in cx_attach()
867 ttycreate(d->tty, TS_CALLOUT, "x%r%r", b->num, c->num); in cx_attach()
899 if (c->mode == M_ASYNC && d->tty && (d->tty->t_state & TS_ISOPEN) && in cx_detach()
941 if (d->tty) { in cx_detach()
942 ttyfree (d->tty); in cx_detach()
943 d->tty = NULL; in cx_detach()
1241 if (c->mode == M_ASYNC && d->tty) { in cx_transmit()
1242 d->tty->t_state &= ~(TS_BUSY | TS_FLUSH); in cx_transmit()
1244 if (d->tty->t_dev) { in cx_transmit()
1274 if (c->mode == M_ASYNC && d->tty) { in cx_receive()
1275 if (d->tty->t_state & TS_ISOPEN) { in cx_receive()
1348 if (c->mode == M_ASYNC && d->tty && (d->tty->t_state & TS_ISOPEN) in cx_error()
1350 && (!CONDITION((&d->tty->t_termios), (d->tty)) in cx_error()
1351 || !(d->tty->t_iflag & (IGNPAR | PARMRK)))) { in cx_error()
1364 if (c->mode == M_ASYNC && d->tty && (d->tty->t_state & TS_ISOPEN) in cx_error()
1366 && (!CONDITION((&d->tty->t_termios), (d->tty)) in cx_error()
1367 || !(d->tty->t_iflag & INPCK) in cx_error()
1368 || !(d->tty->t_iflag & (IGNPAR | PARMRK)))) { in cx_error()
1382 if (c->mode == M_ASYNC && d->tty && (d->tty->t_state & TS_ISOPEN) in cx_error()
1384 && (!CONDITION((&d->tty->t_termios), (d->tty)))) { in cx_error()
1418 if (c->mode == M_ASYNC && d->tty && (d->tty->t_state & TS_ISOPEN) in cx_error()
1420 && (!CONDITION((&d->tty->t_termios), (d->tty)) in cx_error()
1421 || !(d->tty->t_iflag & (IGNBRK | BRKINT | PARMRK)))) { in cx_error()
1437 static int cx_topen (struct tty *tp, struct cdev *dev) in cx_topen()
1463 static void cx_tclose (struct tty *tp) in cx_tclose()
1479 static int cx_tmodem (struct tty *tp, int sigon, int sigoff) in cx_tmodem()
1545 if ((d->chan->mode == M_ASYNC && d->tty && (d->tty->t_state & TS_ISOPEN) && in cx_modem_status()
1699 if (c->mode == M_ASYNC && d->tty && (d->tty->t_state & TS_ISOPEN) && in cx_ioctl()
1977 || d->chan->mode != M_ASYNC || !d->tty in cx_softintr()
1978 || !d->tty->t_dev) in cx_softintr()
1985 if (d->tty->t_state & TS_CAN_BYPASS_L_RINT) { in cx_softintr()
1987 if (d->tty->t_rawq.c_cc + k > in cx_softintr()
1988 d->tty->t_ihiwat in cx_softintr()
1989 && (d->tty->t_cflag & CRTS_IFLOW in cx_softintr()
1990 || d->tty->t_iflag & IXOFF) in cx_softintr()
1991 && !(d->tty->t_state & TS_TBLOCK)) in cx_softintr()
1992 ttyblock(d->tty); in cx_softintr()
1993 d->tty->t_rawcc += k; in cx_softintr()
1999 putc (ic, &d->tty->t_rawq); in cx_softintr()
2003 ttwakeup(d->tty); in cx_softintr()
2004 if (d->tty->t_state & TS_TTSTOP in cx_softintr()
2005 && (d->tty->t_iflag & IXANY in cx_softintr()
2006 || d->tty->t_cc[VSTART] == in cx_softintr()
2007 d->tty->t_cc[VSTOP])) { in cx_softintr()
2008 d->tty->t_state &= ~TS_TTSTOP; in cx_softintr()
2009 d->tty->t_lflag &= ~FLUSHO; in cx_softintr()
2017 ttyld_rint (d->tty, ic); in cx_softintr()
2030 if (d->tty->t_line) in cx_softintr()
2031 ttyld_start (d->tty); in cx_softintr()
2033 cx_oproc (d->tty); in cx_softintr()
2046 static void cx_oproc (struct tty *tp) in cx_oproc()
2115 static int cx_param (struct tty *tp, struct termios *t) in cx_param()
2181 static void cx_stop (struct tty *tp, int flag) in cx_stop()
2220 if (d->tty) in cx_carrier()
2221 ttyld_modem(d->tty, 1); in cx_carrier()
2227 if (d->tty) in cx_carrier()
2228 ttyld_modem(d->tty, 0); in cx_carrier()