Lines Matching refs:tp
227 struct tty *tp; /* cross reference */
259 static void combreak(struct tty *tp, int sig);
262 static void comclose(struct tty *tp);
263 static int comopen(struct tty *tp, struct cdev *dev);
267 static int commodem(struct tty *tp, int sigon, int sigoff);
268 static int comparam(struct tty *tp, struct termios *t);
272 static void comstart(struct tty *tp);
273 static void comstop(struct tty *tp, int rw);
335 struct tty *tp;
352 tp = com->tp;
353 if (tp == NULL)
361 tp->t_init_in.c_ispeed = tp->t_init_in.c_ospeed =
362 tp->t_lock_in.c_ispeed = tp->t_lock_in.c_ospeed =
363 tp->t_init_out.c_ispeed = tp->t_init_out.c_ospeed =
364 tp->t_lock_out.c_ispeed = tp->t_lock_out.c_ospeed = comdefaultrate;
366 if (tp->t_state & TS_ISOPEN) {
367 tp->t_termios.c_ispeed =
368 tp->t_termios.c_ospeed = comdefaultrate;
370 error = comparam(tp, &tp->t_termios);
404 if (com->tp)
405 ttyfree(com->tp);
885 struct tty *tp;
933 tp = com->tp = ttyalloc();
934 tp->t_oproc = comstart;
935 tp->t_param = comparam;
936 tp->t_stop = comstop;
937 tp->t_modem = commodem;
938 tp->t_break = combreak;
939 tp->t_close = comclose;
940 tp->t_open = comopen;
941 tp->t_sc = com;
948 ttyconsolemode(tp, comdefaultrate);
949 error = siosetwater(com, tp->t_init_in.c_ispeed);
1086 tp->t_pps = &com->pps;
1122 ttycreate(tp, TS_CALLOUT, "d%r", unit);
1128 comopen(struct tty *tp, struct cdev *dev)
1133 com = tp->t_sc;
1186 ttyld_modem(tp, 1);
1191 comclose(tp)
1192 struct tty *tp;
1198 com = tp->t_sc;
1213 if (tp->t_cflag & HUPCL
1221 || (!tp->t_actout
1223 && !(tp->t_init_in.c_cflag & CLOCAL))
1224 || !(tp->t_state & TS_ISOPEN)) {
1225 (void)commodem(tp, 0, SER_DTR);
1226 ttydtrwaitstart(tp);
1237 tp->t_actout = FALSE;
1238 wakeup(&tp->t_actout);
1239 wakeup(TSA_CARR_ON(tp)); /* restart any wopeners */
1266 com->tp->t_state &= ~TS_BUSY;
1267 ttwwakeup(com->tp);
1316 struct tty *tp;
1319 tp = com->tp;
1320 if (!(tp->t_state & TS_ISOPEN) || !(tp->t_cflag & CREAD)) {
1325 if (tp->t_state & TS_CAN_BYPASS_L_RINT) {
1341 if (tp->t_rawq.c_cc + incc > tp->t_ihiwat
1343 || tp->t_iflag & IXOFF)
1344 && !(tp->t_state & TS_TBLOCK))
1345 ttyblock(tp);
1347 += b_to_q((char *)buf, incc, &tp->t_rawq);
1351 tp->t_rawcc += incc;
1352 ttwakeup(tp);
1353 if (tp->t_state & TS_TTSTOP
1354 && (tp->t_iflag & IXANY
1355 || tp->t_cc[VSTART] == tp->t_cc[VSTOP])) {
1356 tp->t_state &= ~TS_TTSTOP;
1357 tp->t_lflag &= ~FLUSHO;
1358 comstart(tp);
1383 ttyld_rint(tp, recv_data);
1396 !(tp->t_state & TS_TBLOCK))
1547 if (com->tp == NULL
1548 || com->tp->t_iflag & IGNBRK)
1551 if (com->tp == NULL
1552 || com->tp->t_iflag & IGNPAR)
1555 if (com->tp->t_state & TS_CAN_BYPASS_L_RINT
1557 || com->tp->t_iflag & INPCK))
1561 if (com->tp != NULL &&
1562 com->tp->t_hotchar != 0 && recv_data == com->tp->t_hotchar)
1568 if (com->tp != NULL && com->tp->t_do_timestamp)
1569 microtime(&com->tp->t_timestamp);
1697 struct tty *tp;
1702 tp = com->tp;
1703 if (tp == NULL || com->gone) {
1735 ttyld_modem(tp,
1748 ttyld_start(tp);
1758 combreak(tp, sig)
1759 struct tty *tp;
1764 com = tp->t_sc;
1773 comparam(tp, t)
1774 struct tty *tp;
1786 com = tp->t_sc;
1791 if (t->c_ispeed != (t->c_ospeed != 0 ? t->c_ospeed : tp->t_ospeed))
1800 (void)commodem(tp, 0, SER_DTR); /* hang up line */
1802 (void)commodem(tp, SER_DTR, 0);
1918 ttyldoptim(tp);
1922 comstart(tp);
1942 struct tty *tp;
1971 tp = com->tp;
1972 if (tp != NULL) {
1973 tp->t_ififosize = 2 * ibufsize;
1974 tp->t_ispeedwat = (speed_t)-1;
1975 tp->t_ospeedwat = (speed_t)-1;
2005 comstart(tp)
2006 struct tty *tp;
2011 com = tp->t_sc;
2016 if (tp->t_state & TS_TTSTOP)
2020 if (tp->t_state & TS_TBLOCK) {
2029 if (tp->t_state & (TS_TIMEOUT | TS_TTSTOP)) {
2030 ttwwakeup(tp);
2034 if (tp->t_outq.c_cc != 0) {
2040 = com->obuf1 + q_to_b(&tp->t_outq, com->obuf1,
2058 if (tp->t_outq.c_cc != 0 && !com->obufs[1].l_queued) {
2060 = com->obuf2 + q_to_b(&tp->t_outq, com->obuf2,
2078 tp->t_state |= TS_BUSY;
2084 ttwwakeup(tp);
2089 comstop(tp, rw)
2090 struct tty *tp;
2095 com = tp->t_sc;
2112 com->tp->t_state &= ~TS_BUSY;
2126 comstart(tp);
2130 commodem(struct tty *tp, int sigon, int sigoff)
2135 com = tp->t_sc;
2193 if (com != NULL && com->tp != NULL
2194 && com->tp->t_state & TS_ISOPEN && !com->gone) {