Lines Matching refs:za
228 if (!za->za_rstandby[n]) { \
229 if ((za->za_rstandby[n] = allocb(ZSA_RCV_SIZE, \
231 if (za->za_bufcid == 0) { \
232 za->za_bufcid = bufcall(ZSA_RCV_SIZE, \
241 if (za->za_ttycommon.t_cflag & CRTSXOFF) { \
246 if (!za->za_rstandby[n]) \
249 zslowat[SPEED(za->za_ttycommon.t_cflag)]) \
263 if ((mp = za->za_rstandby[n]) != NULL) { \
264 za->za_rstandby[n] = NULL; \
268 if (za->za_ttycommon.t_cflag & CRTSXOFF) { \
273 UNIT(za->za_dev)); \
277 if (!za->za_rstandby[n]) \
280 zshiwat[SPEED(za->za_ttycommon.t_cflag)])) \
303 wptr = za->za_rdone_wptr; \
304 rptr = za->za_rdone_rptr; \
305 za->za_rdone[wptr] = mp; \
307 za->za_rdone_wptr = wptr = 0; \
309 za->za_rdone_wptr = ++wptr; \
313 UNIT(za->za_dev)); \
322 register mblk_t *mp = za->za_rcvblk; \
329 za->za_rcvblk = NULL; \
337 if (za->za_rdone_rptr != za->za_rdone_wptr) { \
338 mp = za->za_rdone[za->za_rdone_rptr]; \
350 if (za->za_rdone_rptr != za->za_rdone_wptr) { \
351 mp = za->za_rdone[za->za_rdone_rptr]; \
352 za->za_rdone[za->za_rdone_rptr++] = NULL; \
353 if (za->za_rdone_rptr == zsa_rdone) \
354 za->za_rdone_rptr = 0; \
540 static void zsa_ioctl(struct asyncline *za, queue_t *q, mblk_t *mp);
541 static void zsa_program(struct asyncline *za, int setibaud);
545 static void zsa_set_za_rcv_flags_mask(struct asyncline *za);
718 register struct asyncline *za; in zsa_open() local
745 za = (struct asyncline *)&zs->zs_priv_str; in zsa_open()
759 bzero(za, sizeof (zs->zs_priv_str)); in zsa_open()
760 za->za_common = zs; in zsa_open()
762 za->za_ttycommon.t_flags |= TS_SOFTCAR; in zsa_open()
765 za->za_rdone_wptr = 0; in zsa_open()
766 za->za_rdone_rptr = 0; in zsa_open()
769 zs->zs_priv = (caddr_t)za; in zsa_open()
776 if (!(za->za_flags & ZAS_ISOPEN)) { in zsa_open()
788 za->za_ttycommon.t_cflag = termiosp->c_cflag; in zsa_open()
801 za->za_ttycommon.t_cflag &= ~(CBAUD); in zsa_open()
803 za->za_ttycommon.t_cflag |= CBAUDEXT; in zsa_open()
804 za->za_ttycommon.t_cflag |= in zsa_open()
807 za->za_ttycommon.t_cflag &= ~CBAUDEXT; in zsa_open()
808 za->za_ttycommon.t_cflag |= (speed & CBAUD); in zsa_open()
811 za->za_overrun = 0; in zsa_open()
812 za->za_ttycommon.t_iflag = 0; in zsa_open()
813 za->za_ttycommon.t_iocpending = NULL; in zsa_open()
814 za->za_ttycommon.t_size.ws_row = 0; in zsa_open()
815 za->za_ttycommon.t_size.ws_col = 0; in zsa_open()
816 za->za_ttycommon.t_size.ws_xpixel = 0; in zsa_open()
817 za->za_ttycommon.t_size.ws_ypixel = 0; in zsa_open()
818 za->za_dev = *dev; in zsa_open()
819 za->za_wbufcid = 0; in zsa_open()
820 zsa_program(za, za->za_ttycommon.t_cflag & (CIBAUDEXT|CIBAUD)); in zsa_open()
821 zsa_set_za_rcv_flags_mask(za); in zsa_open()
822 } else if ((za->za_ttycommon.t_flags & TS_XCLUDE) && in zsa_open()
825 if (set_zsoptinit && !(za->za_flags & ISOPEN)) in zsa_open()
830 } else if ((*dev & OUTLINE) && !(za->za_flags & ZAS_OUT)) { in zsa_open()
832 if (set_zsoptinit && !(za->za_flags & ISOPEN)) in zsa_open()
840 za->za_flags |= ZAS_OUT; in zsa_open()
846 if ((za->za_ttycommon.t_flags & TS_SOFTCAR) || in zsa_open()
848 za->za_flags |= ZAS_CARR_ON; in zsa_open()
856 !(za->za_ttycommon.t_cflag & CLOCAL)) { in zsa_open()
857 if (!(za->za_flags & (ZAS_CARR_ON|ZAS_OUT)) || in zsa_open()
858 ((za->za_flags & ZAS_OUT) && !(*dev & OUTLINE))) { in zsa_open()
859 za->za_flags |= ZAS_WOPEN; in zsa_open()
871 za->za_flags &= ~ZAS_WOPEN; in zsa_open()
872 if (set_zsoptinit && !(za->za_flags & ISOPEN)) in zsa_open()
879 za->za_flags &= ~ZAS_WOPEN; in zsa_open()
884 if (set_zsoptinit && !(za->za_flags & ISOPEN)) in zsa_open()
891 } else if ((za->za_flags & ZAS_OUT) && !(*dev & OUTLINE)) { in zsa_open()
892 if (set_zsoptinit && !(za->za_flags & ISOPEN)) in zsa_open()
899 za->za_ttycommon.t_readq = rq; in zsa_open()
900 za->za_ttycommon.t_writeq = WR(rq); in zsa_open()
901 rq->q_ptr = WR(rq)->q_ptr = (caddr_t)za; in zsa_open()
903 za->za_flags |= ZAS_ISOPEN; in zsa_open()
914 struct asyncline *za = arg; in zs_progress_check() local
915 struct zscom *zs = za->za_common; in zs_progress_check()
925 !(za->za_flags & (ZAS_BREAK|ZAS_DELAY))) { in zs_progress_check()
926 za->za_flags &= ~ZAS_BUSY; in zs_progress_check()
928 za->za_rcv_flags_mask &= ~DO_RETRANSMIT; in zs_progress_check()
931 bp = za->za_xmitblk; in zs_progress_check()
932 za->za_xmitblk = NULL; in zs_progress_check()
944 flushq(za->za_ttycommon.t_writeq, FLUSHALL); in zs_progress_check()
948 zs->zs_timer = timeout(zs_progress_check, za, in zs_progress_check()
967 struct asyncline *za; in zsa_close() local
975 za = q->q_ptr; in zsa_close()
976 ASSERT(za != NULL); in zsa_close()
978 zs = za->za_common; in zsa_close()
992 if (!(za->za_flags & ZAS_BREAK) && (zs->zs_wreg[5] & ZSWR5_BREAK)) in zsa_close()
1005 if ((flag & (FNDELAY|FNONBLOCK)) || (za->za_flags & ZAS_STOPPED)) in zsa_close()
1028 zs->zs_timer = timeout(zs_progress_check, za, in zsa_close()
1033 za->za_ttycommon.t_writeq->q_first != NULL || in zsa_close()
1034 (za->za_flags & (ZAS_BUSY|ZAS_DELAY|ZAS_BREAK))) { in zsa_close()
1051 za->za_flags &= ~ZAS_BREAK; in zsa_close()
1054 za_wbufcid = za->za_wbufcid; in zsa_close()
1055 za_bufcid = za->za_bufcid; in zsa_close()
1056 za_zsa_restart_id = za->za_zsa_restart_id; in zsa_close()
1057 za_kick_rcv_id = za->za_kick_rcv_id; in zsa_close()
1059 za->za_wbufcid = za->za_bufcid = 0; in zsa_close()
1060 za->za_zsa_restart_id = za->za_kick_rcv_id = 0; in zsa_close()
1076 if ((za->za_dev != rconsdev) && (za->za_dev != kbddev) && in zsa_close()
1077 (za->za_dev != stdindev) && in zsa_close()
1078 (((za->za_flags & (ZAS_WOPEN|ZAS_ISOPEN)) != ZAS_ISOPEN) || in zsa_close()
1079 (za->za_ttycommon.t_cflag & HUPCL))) { in zsa_close()
1084 if (zsasoftdtr && (za->za_ttycommon.t_flags & TS_SOFTCAR)) in zsa_close()
1109 if ((za->za_flags & (ZAS_ISOPEN|ZAS_WOPEN)) == 0) in zsa_close()
1117 ttycommon_close(&za->za_ttycommon); in zsa_close()
1119 za->za_ttycommon.t_readq = NULL; in zsa_close()
1120 za->za_ttycommon.t_writeq = NULL; in zsa_close()
1123 za->za_rcv_flags_mask &= ~DO_RETRANSMIT; in zsa_close()
1126 bp = za->za_xmitblk; in zsa_close()
1127 za->za_xmitblk = NULL; in zsa_close()
1135 bp = za->za_rcvblk; in zsa_close()
1136 za->za_rcvblk = NULL; in zsa_close()
1143 bp = za->za_rstandby[i]; in zsa_close()
1144 za->za_rstandby[i] = NULL; in zsa_close()
1150 if (za->za_soft_active || za->za_kick_active) { in zsa_close()
1152 while (za->za_soft_active || za->za_kick_active) in zsa_close()
1162 bzero(za, sizeof (struct asyncline)); in zsa_close()
1206 register struct asyncline *za; in zsa_wput() local
1213 za = (struct asyncline *)q->q_ptr; in zsa_wput()
1214 zs = za->za_common; in zsa_wput()
1229 za->za_flags |= ZAS_STOPPED; in zsa_wput()
1231 za->za_flags &= ~ZAS_BUSY; in zsa_wput()
1232 za->za_rcv_flags_mask &= ~DO_RETRANSMIT; in zsa_wput()
1233 bp = za->za_xmitblk; in zsa_wput()
1237 za->za_xmitblk = NULL; in zsa_wput()
1248 if (za->za_flags & ZAS_STOPPED) { in zsa_wput()
1249 za->za_flags &= ~ZAS_STOPPED; in zsa_wput()
1281 if (za->za_pps) in zsa_wput()
1303 za->za_pps = (*(int *)mp->b_cont->b_rptr != 0); in zsa_wput()
1322 if (za->za_pps == NULL) { in zsa_wput()
1378 zsa_ioctl(za, q, mp); in zsa_wput()
1446 if (za->za_flags & ZAS_BUSY) { in zsa_wput()
1447 za->za_flags &= ~ZAS_BUSY; in zsa_wput()
1449 za->za_rcv_flags_mask &= ~DO_RETRANSMIT; in zsa_wput()
1452 bp = za->za_xmitblk; in zsa_wput()
1453 za->za_xmitblk = NULL; in zsa_wput()
1469 if ((za->za_ttycommon.t_flags & TS_SOFTCAR) || in zsa_wput()
1481 za->za_ttycommon.t_cflag))/3 + 1); in zsa_wput()
1531 za->za_flowc = za->za_ttycommon.t_stopc; in zsa_wput()
1533 za->za_rcv_flags_mask &= ~DO_RETRANSMIT; in zsa_wput()
1534 bp = za->za_xmitblk; in zsa_wput()
1538 za->za_xmitblk = NULL; in zsa_wput()
1552 za->za_flowc = za->za_ttycommon.t_startc; in zsa_wput()
1554 za->za_rcv_flags_mask &= ~DO_RETRANSMIT; in zsa_wput()
1555 bp = za->za_xmitblk; in zsa_wput()
1559 za->za_xmitblk = NULL; in zsa_wput()
1588 za->za_flags |= ZAS_SERVICEIMM; in zsa_wput()
1594 za->za_flags &= ~ZAS_SERVICEIMM; in zsa_wput()
1619 struct asyncline *za; in zsa_rsrv() local
1622 if (((za = (struct asyncline *)q->q_ptr) != NULL) && in zsa_rsrv()
1623 (za->za_ttycommon.t_cflag & CRTSXOFF)) { in zsa_rsrv()
1624 zs = za->za_common; in zsa_rsrv()
1641 register struct asyncline *za = (struct asyncline *)&zs->zs_priv_str; in zsa_txint() local
1649 if ((za->za_ttycommon.t_cflag & CRTSCTS) && in zsa_txint()
1652 za->za_rcv_flags_mask |= DO_RETRANSMIT; in zsa_txint()
1657 za->za_wr++; in zsa_txint()
1669 za->za_rcv_flags_mask |= DO_TRANSMIT; in zsa_txint()
1676 if (za->za_flowc != '\0' && (!(za->za_flags & ZAS_DRAINING))) { in zsa_txint()
1677 if ((za->za_ttycommon.t_cflag & CRTSCTS) && in zsa_txint()
1682 SCC_WRITEDATA(za->za_flowc); in zsa_txint()
1683 za->za_flowc = '\0'; in zsa_txint()
1692 za->za_rcv_flags_mask |= DO_TRANSMIT; in zsa_txint()
1702 register struct asyncline *za = (struct asyncline *)&zs->zs_priv_str; in zsa_xsint() local
1707 x0 = s0 ^ za->za_rr0; in zsa_xsint()
1708 za->za_rr0 = s0; in zsa_xsint()
1714 if (za->za_pps && (x0 & ZSRR0_CD) && (s0 & ZSRR0_CD)) { in zsa_xsint()
1773 za->za_breakoff = 1; in zsa_xsint()
1800 if ((za->za_dev == kbddev) || in zsa_xsint()
1801 ((za->za_dev == rconsdev) || (za->za_dev == stdindev)) && in zsa_xsint()
1812 za->za_break = 1; in zsa_xsint()
1819 if ((za->za_ttycommon.t_cflag & CRTSCTS) && in zsa_xsint()
1821 (za->za_rcv_flags_mask & DO_RETRANSMIT)) in zsa_xsint()
1822 za->za_rcv_flags_mask |= DO_TRANSMIT; in zsa_xsint()
1824 za->za_ext = 1; in zsa_xsint()
1834 register struct asyncline *za = (struct asyncline *)&zs->zs_priv_str; in zsa_rxint() local
1839 register uint_t fm = za->za_rcv_flags_mask; in zsa_rxint()
1843 za->za_rd++; in zsa_rxint()
1850 if ((abort_enable == KIOCABORTALTERNATE) && (za->za_dev == rconsdev)) { in zsa_rxint()
1863 if (za->za_slav_break) { in zsa_rxint()
1864 za->za_slav_break = 0; in zsa_rxint()
1865 za->za_rr0 |= ZSRR0_BREAK; in zsa_rxint()
1871 if (c == 0 && (za->za_rr0 & ZSRR0_BREAK)) { in zsa_rxint()
1889 if (c == 0 && za->za_breakoff) { in zsa_rxint()
1901 za->za_breakoff = 0; in zsa_rxint()
1907 za->za_sw_overrun++; in zsa_rxint()
1911 za->za_rcvblk = bp; in zsa_rxint()
1914 if (za->za_kick_rcv_id == 0) in zsa_rxint()
1922 za->za_sw_overrun++; in zsa_rxint()
1925 za->za_rcvblk = bp; in zsa_rxint()
1939 za->za_do_kick_rcv_in_softint = 1; in zsa_rxint()
1943 if ((za->za_flags & ZAS_SERVICEIMM) || g_nocluster) { in zsa_rxint()
1957 register struct asyncline *za = (struct asyncline *)&zs->zs_priv_str; in zsa_srint() local
1961 register mblk_t *bp = za->za_rcvblk; in zsa_srint()
1995 if (za->za_ttycommon.t_cflag & PARENB) { in zsa_srint()
1996 switch (za->za_ttycommon.t_cflag & CSIZE) { in zsa_srint()
2011 if ((za->za_ttycommon.t_cflag & PARODD) && in zsa_srint()
2014 else if (!(za->za_ttycommon.t_cflag & PARODD) && in zsa_srint()
2026 za->za_slav_break = 1; in zsa_srint()
2048 za->za_sw_overrun++; in zsa_srint()
2051 za->za_rcvblk = bp; in zsa_srint()
2059 za->za_do_kick_rcv_in_softint = 1; in zsa_srint()
2066 za->za_hw_overrun++; in zsa_srint()
2081 register struct asyncline *za = (struct asyncline *)&zs->zs_priv_str; in zsa_softint() local
2098 q = za->za_ttycommon.t_readq; in zsa_softint()
2099 if (za->za_flags & ZAS_WOPEN && !q) { in zsa_softint()
2100 if (za->za_ext) { in zsa_softint()
2103 za->za_ext = 0; in zsa_softint()
2109 (za->za_ttycommon.t_flags & TS_SOFTCAR)) { in zsa_softint()
2113 if ((za->za_flags & ZAS_CARR_ON) == 0) { in zsa_softint()
2114 za->za_flags |= ZAS_CARR_ON; in zsa_softint()
2124 q = za->za_ttycommon.t_readq; in zsa_softint()
2130 m_error = za->za_m_error; in zsa_softint()
2131 za->za_m_error = 0; in zsa_softint()
2133 if (za->za_do_kick_rcv_in_softint) { in zsa_softint()
2136 za->za_do_kick_rcv_in_softint = 0; in zsa_softint()
2140 za_kick_active = za->za_kick_active; in zsa_softint()
2151 if (za->za_grace_flow_control >= in zsa_softint()
2153 if (za->za_ttycommon.t_cflag & in zsa_softint()
2163 za->za_grace_flow_control++; in zsa_softint()
2165 za->za_grace_flow_control = 0; in zsa_softint()
2181 if (za->za_ext) { in zsa_softint()
2184 za->za_ext = 0; in zsa_softint()
2189 (za->za_ttycommon.t_flags & TS_SOFTCAR)) { in zsa_softint()
2193 if ((za->za_flags & ZAS_CARR_ON) == 0) { in zsa_softint()
2194 za->za_flags |= ZAS_CARR_ON; in zsa_softint()
2199 if ((za->za_flags & ZAS_CARR_ON) && in zsa_softint()
2200 !(za->za_ttycommon.t_cflag & CLOCAL)) { in zsa_softint()
2208 if ((za->za_flags & ZAS_BUSY) && in zsa_softint()
2215 za->za_flags &= ~(ZAS_STOPPED | ZAS_CARR_ON | in zsa_softint()
2217 za->za_rcv_flags_mask &= ~(DO_TRANSMIT | in zsa_softint()
2222 if (hangup && (bp = za->za_xmitblk) != NULL) { in zsa_softint()
2223 za->za_xmitblk = NULL; in zsa_softint()
2228 if (za->za_break != 0) { in zsa_softint()
2233 za->za_break = 0; in zsa_softint()
2244 if (za->za_rcv_flags_mask & DO_TRANSMIT) { in zsa_softint()
2245 za->za_rcv_flags_mask &= ~DO_TRANSMIT; in zsa_softint()
2246 za->za_flags &= ~ZAS_BUSY; in zsa_softint()
2248 if ((za->za_ttycommon.t_cflag & CRTSCTS) && in zsa_softint()
2249 (za->za_rcv_flags_mask & DO_RETRANSMIT) && in zsa_softint()
2253 za->za_rcv_flags_mask &= ~DO_RETRANSMIT; in zsa_softint()
2254 bp = za->za_xmitblk; in zsa_softint()
2255 za->za_xmitblk = 0; in zsa_softint()
2262 if (!(za->za_flags & ZAS_BUSY)) in zsa_softint()
2276 if ((!za->za_kick_rcv_id) && (zs->zs_rd_cur || za_kick_active)) { in zsa_softint()
2278 za->za_kick_rcv_id = timeout(zsa_kick_rcv, zs, in zsa_softint()
2281 za->za_kick_rcv_id = timeout(zsa_kick_rcv, zs, in zsa_softint()
2282 zsticks[SPEED(za->za_ttycommon.t_cflag)]); in zsa_softint()
2283 za->za_kick_rcv_count = ZA_KICK_RCV_COUNT; in zsa_softint()
2285 za->za_soft_active = 1; in zsa_softint()
2289 ttycommon_qfull(&za->za_ttycommon, q); in zsa_softint()
2295 if (za->za_hw_overrun > 10) { in zsa_softint()
2296 cmn_err(CE_NOTE, "zs%d: silo overflow\n", UNIT(za->za_dev)); in zsa_softint()
2297 za->za_hw_overrun = 0; in zsa_softint()
2300 if (za->za_sw_overrun > 10) { in zsa_softint()
2302 UNIT(za->za_dev)); in zsa_softint()
2303 za->za_sw_overrun = 0; in zsa_softint()
2331 flushq(za->za_ttycommon.t_writeq, flushflag); in zsa_softint()
2338 za->za_soft_active = 0; in zsa_softint()
2352 register struct asyncline *za = (struct asyncline *)&zs->zs_priv_str; in zsa_start() local
2363 if ((za->za_flags & (ZAS_BREAK|ZAS_BUSY|ZAS_DRAINING)) || in zsa_start()
2367 if (za->za_ttycommon.t_cflag & CRTSCTS) { in zsa_start()
2369 if (za->za_rcv_flags_mask & DO_RETRANSMIT) { in zsa_start()
2381 if (za->za_flowc != '\0') { in zsa_start()
2383 if (za->za_ttycommon.t_cflag & CRTSCTS) { in zsa_start()
2395 SCC_WRITEDATA(za->za_flowc); in zsa_start()
2396 za->za_flowc = '\0'; in zsa_start()
2405 if (za->za_flags & ZAS_DELAY) in zsa_start()
2408 if ((q = za->za_ttycommon.t_writeq) == NULL) in zsa_start()
2434 if (!za->za_zsa_restart_id) { in zsa_start()
2435 za->za_zsa_restart_id = in zsa_start()
2438 za->za_flags |= ZAS_BREAK; in zsa_start()
2448 if (! za->za_zsa_restart_id) { in zsa_start()
2449 za->za_zsa_restart_id = timeout(zsa_restart, in zsa_start()
2453 za->za_flags |= ZAS_DELAY; in zsa_start()
2463 zsa_ioctl(za, q, bp); in zsa_start()
2475 if (za->za_flags & ZAS_STOPPED) { in zsa_start()
2480 za->za_xmitblk = bp; in zsa_start()
2486 za->za_xmitblk->b_cont = NULL; in zsa_start()
2491 freeb(za->za_xmitblk); in zsa_start()
2492 za->za_xmitblk = NULL; in zsa_start()
2501 if ((za->za_ttycommon.t_cflag & CSIZE) == CS5) { in zsa_start()
2518 za->za_rcv_flags_mask &= ~DO_TRANSMIT; in zsa_start()
2519 if (za->za_ttycommon.t_cflag & CRTSCTS) { in zsa_start()
2522 za->za_rcv_flags_mask |= DO_RETRANSMIT; in zsa_start()
2523 za->za_flags |= ZAS_BUSY; in zsa_start()
2527 za->za_rcv_flags_mask &= ~DO_RETRANSMIT; in zsa_start()
2530 za->za_flags |= ZAS_BUSY; in zsa_start()
2542 za->za_wr++; in zsa_start()
2545 za->za_flags |= ZAS_BUSY; in zsa_start()
2557 struct asyncline *za = (struct asyncline *)&zs->zs_priv_str; in zsa_restart() local
2563 if (!za->za_zsa_restart_id) { in zsa_restart()
2567 za->za_zsa_restart_id = 0; in zsa_restart()
2568 if (za->za_flags & ZAS_BREAK) { in zsa_restart()
2573 za->za_flags &= ~(ZAS_DELAY|ZAS_BREAK); in zsa_restart()
2574 if (za->za_ttycommon.t_writeq != NULL) in zsa_restart()
2587 struct asyncline *za = (struct asyncline *)&zs->zs_priv_str; in zsa_kick_rcv() local
2597 if (za->za_kick_rcv_id == 0 || (zs->zs_flags & ZS_CLOSED)) { in zsa_kick_rcv()
2601 za_soft_active = za->za_soft_active; in zsa_kick_rcv()
2602 za_kick_active = za->za_kick_active; in zsa_kick_rcv()
2603 q = za->za_ttycommon.t_readq; in zsa_kick_rcv()
2611 za->za_kick_rcv_count = tmp = ZA_KICK_RCV_COUNT; in zsa_kick_rcv()
2613 tmp = --za->za_kick_rcv_count; in zsa_kick_rcv()
2617 za->za_kick_rcv_id = timeout(zsa_kick_rcv, in zsa_kick_rcv()
2620 za->za_kick_rcv_id = timeout(zsa_kick_rcv, in zsa_kick_rcv()
2621 zs, zsticks[SPEED(za->za_ttycommon.t_cflag)]); in zsa_kick_rcv()
2627 za->za_kick_rcv_id = 0; in zsa_kick_rcv()
2641 if (za->za_grace_flow_control >= in zsa_kick_rcv()
2643 if (za->za_ttycommon.t_cflag & in zsa_kick_rcv()
2653 za->za_grace_flow_control++; in zsa_kick_rcv()
2655 za->za_grace_flow_control = 0; in zsa_kick_rcv()
2671 za->za_kick_active = 1; in zsa_kick_rcv()
2675 ttycommon_qfull(&za->za_ttycommon, q); in zsa_kick_rcv()
2692 za->za_kick_active = 0; in zsa_kick_rcv()
2705 struct asyncline *za = arg; in zsa_reioctl() local
2706 struct zscom *zs = za->za_common; in zsa_reioctl()
2714 if (!za->za_wbufcid) { in zsa_reioctl()
2718 za->za_wbufcid = 0; in zsa_reioctl()
2719 if ((q = za->za_ttycommon.t_writeq) == NULL) { in zsa_reioctl()
2723 if ((mp = za->za_ttycommon.t_iocpending) != NULL) { in zsa_reioctl()
2727 za->za_ttycommon.t_iocpending = NULL; in zsa_reioctl()
2728 zsa_ioctl(za, q, mp); in zsa_reioctl()
2740 zsa_ioctl(struct asyncline *za, queue_t *wq, mblk_t *mp) in zsa_ioctl() argument
2742 register struct zscom *zs = za->za_common; in zsa_ioctl()
2748 if (za->za_ttycommon.t_iocpending != NULL) { in zsa_ioctl()
2755 freemsg(za->za_ttycommon.t_iocpending); in zsa_ioctl()
2756 za->za_ttycommon.t_iocpending = NULL; in zsa_ioctl()
2772 datasize = ttycommon_ioctl(&za->za_ttycommon, wq, mp, &error); in zsa_ioctl()
2774 if (za->za_ttycommon.t_flags & TS_SOFTCAR) in zsa_ioctl()
2779 if (za->za_wbufcid) in zsa_ioctl()
2780 unbufcall(za->za_wbufcid); in zsa_ioctl()
2781 za->za_wbufcid = bufcall(datasize, BPRI_HI, zsa_reioctl, za); in zsa_ioctl()
2800 zsa_program(za, 1); in zsa_ioctl()
2801 zsa_set_za_rcv_flags_mask(za); in zsa_ioctl()
2824 delay(ztdelay(SPEED(za->za_ttycommon.t_cflag))); in zsa_ioctl()
2835 if (!za->za_zsa_restart_id) { in zsa_ioctl()
2837 za->za_zsa_restart_id = in zsa_ioctl()
2841 za->za_flags |= ZAS_BREAK; in zsa_ioctl()
2971 zsa_program(struct asyncline *za, int setibaud) in zsa_program() argument
2973 register struct zscom *zs = za->za_common; in zsa_program()
2977 if ((baudrate = SPEED(za->za_ttycommon.t_cflag)) == 0) { in zsa_program()
2989 za->za_ttycommon.t_cflag &= ~(CIBAUD); in zsa_program()
2991 za->za_ttycommon.t_cflag |= CIBAUDEXT; in zsa_program()
2992 za->za_ttycommon.t_cflag |= in zsa_program()
2995 za->za_ttycommon.t_cflag &= ~CIBAUDEXT; in zsa_program()
2996 za->za_ttycommon.t_cflag |= in zsa_program()
3006 if ((za->za_dev == rconsdev) || (za->za_dev == kbddev) || in zsa_program()
3007 (za->za_dev == stdindev) || (za->za_ttycommon.t_cflag & CREAD)) in zsa_program()
3026 switch (za->za_ttycommon.t_cflag & CSIZE) { in zsa_program()
3049 if (za->za_ttycommon.t_cflag & PARENB) { in zsa_program()
3055 if (za->za_ttycommon.t_iflag & INPCK) in zsa_program()
3058 if (!(za->za_ttycommon.t_cflag & PARODD)) in zsa_program()
3061 wr4 |= (za->za_ttycommon.t_cflag & CSTOPB) ? in zsa_program()
3075 if (za->za_ttycommon.t_cflag & CRTSCTS) in zsa_program()
3078 if (za->za_ttycommon.t_cflag & CRTSCTS) in zsa_program()
3104 za->za_flags |= ZAS_DRAINING; in zsa_program()
3119 za->za_flags &= ~ZAS_DRAINING; in zsa_program()
3154 struct asyncline *za = (struct asyncline *)&zs->zs_priv_str; in zsa_callback() local
3158 if (za->za_bufcid) { in zsa_callback()
3159 za->za_bufcid = 0; in zsa_callback()
3169 zsa_set_za_rcv_flags_mask(struct asyncline *za) in zsa_set_za_rcv_flags_mask() argument
3173 za->za_rcv_flags_mask &= ~0xFF; in zsa_set_za_rcv_flags_mask()
3174 switch (za->za_ttycommon.t_cflag & CSIZE) { in zsa_set_za_rcv_flags_mask()
3188 za->za_rcv_flags_mask &= ~(0xFF << 16); in zsa_set_za_rcv_flags_mask()
3189 za->za_rcv_flags_mask |= mask << 16; in zsa_set_za_rcv_flags_mask()
3191 if ((za->za_ttycommon.t_iflag & PARMRK) && in zsa_set_za_rcv_flags_mask()
3192 !(za->za_ttycommon.t_iflag & (IGNPAR|ISTRIP))) { in zsa_set_za_rcv_flags_mask()
3193 za->za_rcv_flags_mask |= DO_ESC; in zsa_set_za_rcv_flags_mask()
3195 za->za_rcv_flags_mask &= ~DO_ESC; in zsa_set_za_rcv_flags_mask()
3196 if (za->za_ttycommon.t_iflag & IXON) { in zsa_set_za_rcv_flags_mask()
3197 za->za_rcv_flags_mask |= DO_STOPC; in zsa_set_za_rcv_flags_mask()
3198 za->za_rcv_flags_mask &= ~0xFF; in zsa_set_za_rcv_flags_mask()
3199 za->za_rcv_flags_mask |= za->za_ttycommon.t_stopc; in zsa_set_za_rcv_flags_mask()
3201 za->za_rcv_flags_mask &= ~DO_STOPC; in zsa_set_za_rcv_flags_mask()
3207 struct asyncline *za; in zsa_suspend() local
3213 za = (struct asyncline *)&zs->zs_priv_str; in zsa_suspend()
3227 restart_id = za->za_zsa_restart_id; in zsa_suspend()
3228 za->za_zsa_restart_id = 0; in zsa_suspend()
3229 kick_rcv_id = za->za_kick_rcv_id; in zsa_suspend()
3230 za->za_kick_rcv_id = 0; in zsa_suspend()
3247 delay(ztdelay(za->za_ttycommon.t_cflag & CBAUD)); in zsa_suspend()
3253 if ((q = za->za_ttycommon.t_writeq) != NULL) { in zsa_suspend()
3256 za->za_flags &= ~ZAS_BUSY; in zsa_suspend()
3257 za->za_rcv_flags_mask &= ~DO_RETRANSMIT; in zsa_suspend()
3258 bp = za->za_xmitblk; in zsa_suspend()
3262 za->za_xmitblk = NULL; in zsa_suspend()
3275 za->za_flags &= ~ZAS_BREAK; in zsa_suspend()
3304 register struct asyncline *za; in zsa_resume() local
3307 za = (struct asyncline *)&zs->zs_priv_str; in zsa_resume()
3331 za->za_rcv_flags_mask |= DO_TRANSMIT; in zsa_resume()
3332 za->za_ext = 1; in zsa_resume()
3344 register struct asyncline *za = (struct asyncline *)&zs->zs_priv_str; in zsa_print_info() local
3345 register queue_t *q = za->za_ttycommon.t_writeq; in zsa_print_info()
3350 if (za->za_ttycommon.t_flags & TS_SOFTCAR) printf(" t_fl:TS_SOFTCAR"); in zsa_print_info()
3351 if (za->za_ttycommon.t_flags & TS_XCLUDE) printf(" t_fl:TS_XCLUDE"); in zsa_print_info()
3352 if (za->za_ttycommon.t_iflag & IGNBRK) printf(" t_ifl:IGNBRK"); in zsa_print_info()
3353 if (za->za_ttycommon.t_iflag & BRKINT) printf(" t_ifl:BRKINT"); in zsa_print_info()
3354 if (za->za_ttycommon.t_iflag & IGNPAR) printf(" t_ifl:IGNPAR"); in zsa_print_info()
3355 if (za->za_ttycommon.t_iflag & PARMRK) printf(" t_ifl:PARMRK"); in zsa_print_info()
3356 if (za->za_ttycommon.t_iflag & INPCK) printf(" t_ifl:INPCK"); in zsa_print_info()
3357 if (za->za_ttycommon.t_iflag & ISTRIP) printf(" t_ifl:ISTRIP"); in zsa_print_info()
3358 if (za->za_ttycommon.t_iflag & INLCR) printf(" t_ifl:INLCR"); in zsa_print_info()
3359 if (za->za_ttycommon.t_iflag & IGNCR) printf(" t_ifl:IGNCR"); in zsa_print_info()
3360 if (za->za_ttycommon.t_iflag & ICRNL) printf(" t_ifl:ICRNL"); in zsa_print_info()
3361 if (za->za_ttycommon.t_iflag & IUCLC) printf(" t_ifl:IUCLC"); in zsa_print_info()
3362 if (za->za_ttycommon.t_iflag & IXON) printf(" t_ifl:IXON"); in zsa_print_info()
3363 if (za->za_ttycommon.t_iflag & IXOFF) printf(" t_ifl:IXOFF"); in zsa_print_info()
3368 if (za->za_ttycommon.t_cflag & CSIZE == CS5) printf(" t_cfl:CS5"); in zsa_print_info()
3369 if (za->za_ttycommon.t_cflag & CSIZE == CS6) printf(" t_cfl:CS6"); in zsa_print_info()
3370 if (za->za_ttycommon.t_cflag & CSIZE == CS7) printf(" t_cfl:CS7"); in zsa_print_info()
3371 if (za->za_ttycommon.t_cflag & CSIZE == CS8) printf(" t_cfl:CS8"); in zsa_print_info()
3372 if (za->za_ttycommon.t_cflag & CSTOPB) printf(" t_cfl:CSTOPB"); in zsa_print_info()
3373 if (za->za_ttycommon.t_cflag & CREAD) printf(" t_cfl:CREAD"); in zsa_print_info()
3374 if (za->za_ttycommon.t_cflag & PARENB) printf(" t_cfl:PARENB"); in zsa_print_info()
3375 if (za->za_ttycommon.t_cflag & PARODD) printf(" t_cfl:PARODD"); in zsa_print_info()
3376 if (za->za_ttycommon.t_cflag & HUPCL) printf(" t_cfl:HUPCL"); in zsa_print_info()
3377 if (za->za_ttycommon.t_cflag & CLOCAL) printf(" t_cfl:CLOCAL"); in zsa_print_info()
3378 printf(" t_stopc=%x", za->za_ttycommon.t_stopc); in zsa_print_info()