Lines Matching refs:tp
213 struct tty *tp;
298 tp = rc->rc_tp = ttyalloc();
299 tp->t_sc = rc;
300 tp->t_oproc = rc_start;
301 tp->t_param = rc_param;
302 tp->t_modem = rc_modem;
303 tp->t_break = rc_break;
304 tp->t_close = rc_close;
305 tp->t_stop = rc_stop;
306 ttycreate(tp, TS_CALLOUT, "m%d", chan + base);
588 rc_start(struct tty *tp)
594 rc = tp->t_sc;
601 if (tp->t_state & TS_TTSTOP)
607 && (tp->t_state & TS_TBLOCK)
617 if (tp->t_state & (TS_TIMEOUT|TS_TTSTOP))
622 ttwwakeup(tp);
625 tp->t_outq.c_cc, rc->rc_obufend - rc->rc_optr);
627 if (tp->t_state & TS_BUSY)
630 if (tp->t_outq.c_cc > 0) {
633 tp->t_state |= TS_BUSY;
634 ocnt = q_to_b(&tp->t_outq, rc->rc_obuf, sizeof rc->rc_obuf);
659 struct tty *tp;
669 tp = rc->rc_tp;
697 ttyld_modem(tp, !!(rc->rc_msvr & MSVR_CD));
720 && (tp->t_state & TS_ISOPEN)
721 && !(tp->t_state & TS_TBLOCK)
732 if (icnt <= 0 || !(tp->t_state & TS_ISOPEN))
735 if ( (tp->t_state & TS_CAN_BYPASS_L_RINT)
736 && !(tp->t_state & TS_LOCAL)) {
737 if ((tp->t_rawq.c_cc + icnt) >= RB_I_HIGH_WATER
738 && ((rc->rc_flags & RC_RTSFLOW) || (tp->t_iflag & IXOFF))
739 && !(tp->t_state & TS_TBLOCK))
740 ttyblock(tp);
743 tp->t_rawcc += icnt;
744 if (b_to_q(tptr, icnt, &tp->t_rawq))
748 ttwakeup(tp);
749 if ((tp->t_state & TS_TTSTOP) && ((tp->t_iflag & IXANY)
750 || (tp->t_cc[VSTART] == tp->t_cc[VSTOP]))) {
751 tp->t_state &= ~TS_TTSTOP;
752 tp->t_lflag &= ~FLUSHO;
753 rc_start(tp);
757 ttyld_rint(tp,
769 ttyld_start(tp);
778 rc_stop(struct tty *tp, int rw)
784 rc = tp->t_sc;
805 if (tp->t_state & TS_TTSTOP)
813 rc_close(struct tty *tp)
819 rc = tp->t_sc;
826 if ( (tp->t_cflag & HUPCL)
829 && !(tp->t_cflag & CLOCAL))
830 || !(tp->t_state & TS_ISOPEN)
834 (void) rc_modem(tp, SER_RTS, 0);
835 ttydtrwaitstart(tp);
839 wakeup(TSA_CARR_ON(tp));
870 rc_param(struct tty *tp, struct termios *ts)
885 rc = tp->t_sc;
896 (void) rc_modem(tp, 0, SER_DTR);
899 tp->t_state &= ~TS_CAN_BYPASS_L_RINT;
967 if (tp->t_state & TS_TTSTOP)
989 ttyldoptim(tp);
1012 if (tp->t_state & TS_BUSY)
1015 rc_modem(tp, SER_DTR, 0);
1039 rc_modem(struct tty *tp, int biton, int bitoff)
1046 rc = tp->t_sc;
1086 rc_break(struct tty *tp, int brk)
1090 rc = tp->t_sc;