Lines Matching refs:za
230 if (!za->za_rstandby[n]) { \
231 if ((za->za_rstandby[n] = allocb(ZSA_RCV_SIZE, \
233 if (za->za_bufcid == 0) { \
234 za->za_bufcid = bufcall(ZSA_RCV_SIZE, \
243 if (za->za_ttycommon.t_cflag & CRTSXOFF) { \
248 if (!za->za_rstandby[n]) \
251 zslowat[SPEED(za->za_ttycommon.t_cflag)]) \
265 if ((mp = za->za_rstandby[n]) != NULL) { \
266 za->za_rstandby[n] = NULL; \
270 if (za->za_ttycommon.t_cflag & CRTSXOFF) { \
275 UNIT(za->za_dev)); \
279 if (!za->za_rstandby[n]) \
282 zshiwat[SPEED(za->za_ttycommon.t_cflag)])) \
305 wptr = za->za_rdone_wptr; \
306 rptr = za->za_rdone_rptr; \
307 za->za_rdone[wptr] = mp; \
309 za->za_rdone_wptr = wptr = 0; \
311 za->za_rdone_wptr = ++wptr; \
315 UNIT(za->za_dev)); \
324 mblk_t *mp = za->za_rcvblk; \
331 za->za_rcvblk = NULL; \
339 if (za->za_rdone_rptr != za->za_rdone_wptr) { \
340 mp = za->za_rdone[za->za_rdone_rptr]; \
352 if (za->za_rdone_rptr != za->za_rdone_wptr) { \
353 mp = za->za_rdone[za->za_rdone_rptr]; \
354 za->za_rdone[za->za_rdone_rptr++] = NULL; \
355 if (za->za_rdone_rptr == zsa_rdone) \
356 za->za_rdone_rptr = 0; \
541 static void zsa_ioctl(struct asyncline *za, queue_t *q, mblk_t *mp);
542 static void zsa_program(struct asyncline *za, int setibaud);
546 static void zsa_set_za_rcv_flags_mask(struct asyncline *za);
719 struct asyncline *za; in zsa_open() local
746 za = (struct asyncline *)&zs->zs_priv_str; in zsa_open()
760 bzero(za, sizeof (zs->zs_priv_str)); in zsa_open()
761 za->za_common = zs; in zsa_open()
763 za->za_ttycommon.t_flags |= TS_SOFTCAR; in zsa_open()
766 za->za_rdone_wptr = 0; in zsa_open()
767 za->za_rdone_rptr = 0; in zsa_open()
770 zs->zs_priv = (caddr_t)za; in zsa_open()
777 if (!(za->za_flags & ZAS_ISOPEN)) { in zsa_open()
789 za->za_ttycommon.t_cflag = termiosp->c_cflag; in zsa_open()
802 za->za_ttycommon.t_cflag &= ~(CBAUD); in zsa_open()
804 za->za_ttycommon.t_cflag |= CBAUDEXT; in zsa_open()
805 za->za_ttycommon.t_cflag |= in zsa_open()
808 za->za_ttycommon.t_cflag &= ~CBAUDEXT; in zsa_open()
809 za->za_ttycommon.t_cflag |= (speed & CBAUD); in zsa_open()
812 za->za_overrun = 0; in zsa_open()
813 za->za_ttycommon.t_iflag = 0; in zsa_open()
814 za->za_ttycommon.t_iocpending = NULL; in zsa_open()
815 za->za_ttycommon.t_size.ws_row = 0; in zsa_open()
816 za->za_ttycommon.t_size.ws_col = 0; in zsa_open()
817 za->za_ttycommon.t_size.ws_xpixel = 0; in zsa_open()
818 za->za_ttycommon.t_size.ws_ypixel = 0; in zsa_open()
819 za->za_dev = *dev; in zsa_open()
820 za->za_wbufcid = 0; in zsa_open()
821 zsa_program(za, za->za_ttycommon.t_cflag & (CIBAUDEXT|CIBAUD)); in zsa_open()
822 zsa_set_za_rcv_flags_mask(za); in zsa_open()
823 } else if ((za->za_ttycommon.t_flags & TS_XCLUDE) && in zsa_open()
826 if (set_zsoptinit && !(za->za_flags & ISOPEN)) in zsa_open()
831 } else if ((*dev & OUTLINE) && !(za->za_flags & ZAS_OUT)) { in zsa_open()
833 if (set_zsoptinit && !(za->za_flags & ISOPEN)) in zsa_open()
841 za->za_flags |= ZAS_OUT; in zsa_open()
847 if ((za->za_ttycommon.t_flags & TS_SOFTCAR) || in zsa_open()
849 za->za_flags |= ZAS_CARR_ON; in zsa_open()
857 !(za->za_ttycommon.t_cflag & CLOCAL)) { in zsa_open()
858 if (!(za->za_flags & (ZAS_CARR_ON|ZAS_OUT)) || in zsa_open()
859 ((za->za_flags & ZAS_OUT) && !(*dev & OUTLINE))) { in zsa_open()
860 za->za_flags |= ZAS_WOPEN; in zsa_open()
872 za->za_flags &= ~ZAS_WOPEN; in zsa_open()
873 if (set_zsoptinit && !(za->za_flags & ISOPEN)) in zsa_open()
880 za->za_flags &= ~ZAS_WOPEN; in zsa_open()
885 if (set_zsoptinit && !(za->za_flags & ISOPEN)) in zsa_open()
892 } else if ((za->za_flags & ZAS_OUT) && !(*dev & OUTLINE)) { in zsa_open()
893 if (set_zsoptinit && !(za->za_flags & ISOPEN)) in zsa_open()
900 za->za_ttycommon.t_readq = rq; in zsa_open()
901 za->za_ttycommon.t_writeq = WR(rq); in zsa_open()
902 rq->q_ptr = WR(rq)->q_ptr = (caddr_t)za; in zsa_open()
904 za->za_flags |= ZAS_ISOPEN; in zsa_open()
915 struct asyncline *za = arg; in zs_progress_check() local
916 struct zscom *zs = za->za_common; in zs_progress_check()
926 !(za->za_flags & (ZAS_BREAK|ZAS_DELAY))) { in zs_progress_check()
927 za->za_flags &= ~ZAS_BUSY; in zs_progress_check()
929 za->za_rcv_flags_mask &= ~DO_RETRANSMIT; in zs_progress_check()
932 bp = za->za_xmitblk; in zs_progress_check()
933 za->za_xmitblk = NULL; in zs_progress_check()
945 flushq(za->za_ttycommon.t_writeq, FLUSHALL); in zs_progress_check()
949 zs->zs_timer = timeout(zs_progress_check, za, in zs_progress_check()
968 struct asyncline *za; in zsa_close() local
976 za = q->q_ptr; in zsa_close()
977 ASSERT(za != NULL); in zsa_close()
979 zs = za->za_common; in zsa_close()
993 if (!(za->za_flags & ZAS_BREAK) && (zs->zs_wreg[5] & ZSWR5_BREAK)) in zsa_close()
1006 if ((flag & (FNDELAY|FNONBLOCK)) || (za->za_flags & ZAS_STOPPED)) in zsa_close()
1029 zs->zs_timer = timeout(zs_progress_check, za, in zsa_close()
1034 za->za_ttycommon.t_writeq->q_first != NULL || in zsa_close()
1035 (za->za_flags & (ZAS_BUSY|ZAS_DELAY|ZAS_BREAK))) { in zsa_close()
1052 za->za_flags &= ~ZAS_BREAK; in zsa_close()
1055 za_wbufcid = za->za_wbufcid; in zsa_close()
1056 za_bufcid = za->za_bufcid; in zsa_close()
1057 za_zsa_restart_id = za->za_zsa_restart_id; in zsa_close()
1058 za_kick_rcv_id = za->za_kick_rcv_id; in zsa_close()
1060 za->za_wbufcid = za->za_bufcid = 0; in zsa_close()
1061 za->za_zsa_restart_id = za->za_kick_rcv_id = 0; in zsa_close()
1077 if ((za->za_dev != rconsdev) && (za->za_dev != kbddev) && in zsa_close()
1078 (za->za_dev != stdindev) && in zsa_close()
1079 (((za->za_flags & (ZAS_WOPEN|ZAS_ISOPEN)) != ZAS_ISOPEN) || in zsa_close()
1080 (za->za_ttycommon.t_cflag & HUPCL))) { in zsa_close()
1085 if (zsasoftdtr && (za->za_ttycommon.t_flags & TS_SOFTCAR)) in zsa_close()
1110 if ((za->za_flags & (ZAS_ISOPEN|ZAS_WOPEN)) == 0) in zsa_close()
1118 ttycommon_close(&za->za_ttycommon); in zsa_close()
1120 za->za_ttycommon.t_readq = NULL; in zsa_close()
1121 za->za_ttycommon.t_writeq = NULL; in zsa_close()
1124 za->za_rcv_flags_mask &= ~DO_RETRANSMIT; in zsa_close()
1127 bp = za->za_xmitblk; in zsa_close()
1128 za->za_xmitblk = NULL; in zsa_close()
1136 bp = za->za_rcvblk; in zsa_close()
1137 za->za_rcvblk = NULL; in zsa_close()
1144 bp = za->za_rstandby[i]; in zsa_close()
1145 za->za_rstandby[i] = NULL; in zsa_close()
1151 if (za->za_soft_active || za->za_kick_active) { in zsa_close()
1153 while (za->za_soft_active || za->za_kick_active) in zsa_close()
1163 bzero(za, sizeof (struct asyncline)); in zsa_close()
1207 struct asyncline *za; in zsa_wput() local
1214 za = (struct asyncline *)q->q_ptr; in zsa_wput()
1215 zs = za->za_common; in zsa_wput()
1230 za->za_flags |= ZAS_STOPPED; in zsa_wput()
1232 za->za_flags &= ~ZAS_BUSY; in zsa_wput()
1233 za->za_rcv_flags_mask &= ~DO_RETRANSMIT; in zsa_wput()
1234 bp = za->za_xmitblk; in zsa_wput()
1238 za->za_xmitblk = NULL; in zsa_wput()
1249 if (za->za_flags & ZAS_STOPPED) { in zsa_wput()
1250 za->za_flags &= ~ZAS_STOPPED; in zsa_wput()
1282 if (za->za_pps) in zsa_wput()
1304 za->za_pps = (*(int *)mp->b_cont->b_rptr != 0); in zsa_wput()
1323 if (za->za_pps == 0) { in zsa_wput()
1379 zsa_ioctl(za, q, mp); in zsa_wput()
1447 if (za->za_flags & ZAS_BUSY) { in zsa_wput()
1448 za->za_flags &= ~ZAS_BUSY; in zsa_wput()
1450 za->za_rcv_flags_mask &= ~DO_RETRANSMIT; in zsa_wput()
1453 bp = za->za_xmitblk; in zsa_wput()
1454 za->za_xmitblk = NULL; in zsa_wput()
1470 if ((za->za_ttycommon.t_flags & TS_SOFTCAR) || in zsa_wput()
1482 za->za_ttycommon.t_cflag))/3 + 1); in zsa_wput()
1532 za->za_flowc = za->za_ttycommon.t_stopc; in zsa_wput()
1534 za->za_rcv_flags_mask &= ~DO_RETRANSMIT; in zsa_wput()
1535 bp = za->za_xmitblk; in zsa_wput()
1539 za->za_xmitblk = NULL; in zsa_wput()
1553 za->za_flowc = za->za_ttycommon.t_startc; in zsa_wput()
1555 za->za_rcv_flags_mask &= ~DO_RETRANSMIT; in zsa_wput()
1556 bp = za->za_xmitblk; in zsa_wput()
1560 za->za_xmitblk = NULL; in zsa_wput()
1589 za->za_flags |= ZAS_SERVICEIMM; in zsa_wput()
1595 za->za_flags &= ~ZAS_SERVICEIMM; in zsa_wput()
1621 struct asyncline *za; in zsa_rsrv() local
1624 if (((za = (struct asyncline *)q->q_ptr) != NULL) && in zsa_rsrv()
1625 (za->za_ttycommon.t_cflag & CRTSXOFF)) { in zsa_rsrv()
1626 zs = za->za_common; in zsa_rsrv()
1644 struct asyncline *za = (struct asyncline *)&zs->zs_priv_str; in zsa_txint() local
1652 if ((za->za_ttycommon.t_cflag & CRTSCTS) && in zsa_txint()
1655 za->za_rcv_flags_mask |= DO_RETRANSMIT; in zsa_txint()
1660 za->za_wr++; in zsa_txint()
1672 za->za_rcv_flags_mask |= DO_TRANSMIT; in zsa_txint()
1679 if (za->za_flowc != '\0' && (!(za->za_flags & ZAS_DRAINING))) { in zsa_txint()
1680 if ((za->za_ttycommon.t_cflag & CRTSCTS) && in zsa_txint()
1685 SCC_WRITEDATA(za->za_flowc); in zsa_txint()
1686 za->za_flowc = '\0'; in zsa_txint()
1695 za->za_rcv_flags_mask |= DO_TRANSMIT; in zsa_txint()
1705 struct asyncline *za = (struct asyncline *)&zs->zs_priv_str; in zsa_xsint() local
1710 x0 = s0 ^ za->za_rr0; in zsa_xsint()
1711 za->za_rr0 = s0; in zsa_xsint()
1717 if (za->za_pps && (x0 & ZSRR0_CD) && (s0 & ZSRR0_CD)) { in zsa_xsint()
1776 za->za_breakoff = 1; in zsa_xsint()
1803 if ((za->za_dev == kbddev) || in zsa_xsint()
1804 ((za->za_dev == rconsdev) || (za->za_dev == stdindev)) && in zsa_xsint()
1815 za->za_break = 1; in zsa_xsint()
1822 if ((za->za_ttycommon.t_cflag & CRTSCTS) && in zsa_xsint()
1824 (za->za_rcv_flags_mask & DO_RETRANSMIT)) in zsa_xsint()
1825 za->za_rcv_flags_mask |= DO_TRANSMIT; in zsa_xsint()
1827 za->za_ext = 1; in zsa_xsint()
1837 struct asyncline *za = (struct asyncline *)&zs->zs_priv_str; in zsa_rxint() local
1842 uint_t fm = za->za_rcv_flags_mask; in zsa_rxint()
1846 za->za_rd++; in zsa_rxint()
1853 if ((abort_enable == KIOCABORTALTERNATE) && (za->za_dev == rconsdev)) { in zsa_rxint()
1866 if (za->za_slav_break) { in zsa_rxint()
1867 za->za_slav_break = 0; in zsa_rxint()
1868 za->za_rr0 |= ZSRR0_BREAK; in zsa_rxint()
1874 if (c == 0 && (za->za_rr0 & ZSRR0_BREAK)) { in zsa_rxint()
1892 if (c == 0 && za->za_breakoff) { in zsa_rxint()
1904 za->za_breakoff = 0; in zsa_rxint()
1910 za->za_sw_overrun++; in zsa_rxint()
1914 za->za_rcvblk = bp; in zsa_rxint()
1917 if (za->za_kick_rcv_id == 0) in zsa_rxint()
1925 za->za_sw_overrun++; in zsa_rxint()
1928 za->za_rcvblk = bp; in zsa_rxint()
1942 za->za_do_kick_rcv_in_softint = 1; in zsa_rxint()
1946 if ((za->za_flags & ZAS_SERVICEIMM) || g_nocluster) { in zsa_rxint()
1960 struct asyncline *za = (struct asyncline *)&zs->zs_priv_str; in zsa_srint() local
1964 mblk_t *bp = za->za_rcvblk; in zsa_srint()
1998 if (za->za_ttycommon.t_cflag & PARENB) { in zsa_srint()
1999 switch (za->za_ttycommon.t_cflag & CSIZE) { in zsa_srint()
2014 if ((za->za_ttycommon.t_cflag & PARODD) && in zsa_srint()
2017 else if (!(za->za_ttycommon.t_cflag & PARODD) && in zsa_srint()
2029 za->za_slav_break = 1; in zsa_srint()
2051 za->za_sw_overrun++; in zsa_srint()
2054 za->za_rcvblk = bp; in zsa_srint()
2062 za->za_do_kick_rcv_in_softint = 1; in zsa_srint()
2069 za->za_hw_overrun++; in zsa_srint()
2084 struct asyncline *za = (struct asyncline *)&zs->zs_priv_str; in zsa_softint() local
2101 q = za->za_ttycommon.t_readq; in zsa_softint()
2102 if (za->za_flags & ZAS_WOPEN && !q) { in zsa_softint()
2103 if (za->za_ext) { in zsa_softint()
2106 za->za_ext = 0; in zsa_softint()
2112 (za->za_ttycommon.t_flags & TS_SOFTCAR)) { in zsa_softint()
2116 if ((za->za_flags & ZAS_CARR_ON) == 0) { in zsa_softint()
2117 za->za_flags |= ZAS_CARR_ON; in zsa_softint()
2127 q = za->za_ttycommon.t_readq; in zsa_softint()
2133 m_error = za->za_m_error; in zsa_softint()
2134 za->za_m_error = 0; in zsa_softint()
2136 if (za->za_do_kick_rcv_in_softint) { in zsa_softint()
2139 za->za_do_kick_rcv_in_softint = 0; in zsa_softint()
2143 za_kick_active = za->za_kick_active; in zsa_softint()
2154 if (za->za_grace_flow_control >= in zsa_softint()
2156 if (za->za_ttycommon.t_cflag & in zsa_softint()
2166 za->za_grace_flow_control++; in zsa_softint()
2168 za->za_grace_flow_control = 0; in zsa_softint()
2184 if (za->za_ext) { in zsa_softint()
2187 za->za_ext = 0; in zsa_softint()
2192 (za->za_ttycommon.t_flags & TS_SOFTCAR)) { in zsa_softint()
2196 if ((za->za_flags & ZAS_CARR_ON) == 0) { in zsa_softint()
2197 za->za_flags |= ZAS_CARR_ON; in zsa_softint()
2202 if ((za->za_flags & ZAS_CARR_ON) && in zsa_softint()
2203 !(za->za_ttycommon.t_cflag & CLOCAL)) { in zsa_softint()
2211 if ((za->za_flags & ZAS_BUSY) && in zsa_softint()
2218 za->za_flags &= ~(ZAS_STOPPED | ZAS_CARR_ON | in zsa_softint()
2220 za->za_rcv_flags_mask &= ~(DO_TRANSMIT | in zsa_softint()
2225 if (hangup && (bp = za->za_xmitblk) != NULL) { in zsa_softint()
2226 za->za_xmitblk = NULL; in zsa_softint()
2231 if (za->za_break != 0) { in zsa_softint()
2236 za->za_break = 0; in zsa_softint()
2247 if (za->za_rcv_flags_mask & DO_TRANSMIT) { in zsa_softint()
2248 za->za_rcv_flags_mask &= ~DO_TRANSMIT; in zsa_softint()
2249 za->za_flags &= ~ZAS_BUSY; in zsa_softint()
2251 if ((za->za_ttycommon.t_cflag & CRTSCTS) && in zsa_softint()
2252 (za->za_rcv_flags_mask & DO_RETRANSMIT) && in zsa_softint()
2256 za->za_rcv_flags_mask &= ~DO_RETRANSMIT; in zsa_softint()
2257 bp = za->za_xmitblk; in zsa_softint()
2258 za->za_xmitblk = 0; in zsa_softint()
2265 if (!(za->za_flags & ZAS_BUSY)) in zsa_softint()
2279 if ((!za->za_kick_rcv_id) && (zs->zs_rd_cur || za_kick_active)) { in zsa_softint()
2281 za->za_kick_rcv_id = timeout(zsa_kick_rcv, zs, in zsa_softint()
2284 za->za_kick_rcv_id = timeout(zsa_kick_rcv, zs, in zsa_softint()
2285 zsticks[SPEED(za->za_ttycommon.t_cflag)]); in zsa_softint()
2286 za->za_kick_rcv_count = ZA_KICK_RCV_COUNT; in zsa_softint()
2288 za->za_soft_active = 1; in zsa_softint()
2292 ttycommon_qfull(&za->za_ttycommon, q); in zsa_softint()
2298 if (za->za_hw_overrun > 10) { in zsa_softint()
2299 cmn_err(CE_NOTE, "zs%d: silo overflow\n", UNIT(za->za_dev)); in zsa_softint()
2300 za->za_hw_overrun = 0; in zsa_softint()
2303 if (za->za_sw_overrun > 10) { in zsa_softint()
2305 UNIT(za->za_dev)); in zsa_softint()
2306 za->za_sw_overrun = 0; in zsa_softint()
2334 flushq(za->za_ttycommon.t_writeq, flushflag); in zsa_softint()
2341 za->za_soft_active = 0; in zsa_softint()
2355 struct asyncline *za = (struct asyncline *)&zs->zs_priv_str; in zsa_start() local
2366 if ((za->za_flags & (ZAS_BREAK|ZAS_BUSY|ZAS_DRAINING)) || in zsa_start()
2370 if (za->za_ttycommon.t_cflag & CRTSCTS) { in zsa_start()
2372 if (za->za_rcv_flags_mask & DO_RETRANSMIT) { in zsa_start()
2384 if (za->za_flowc != '\0') { in zsa_start()
2386 if (za->za_ttycommon.t_cflag & CRTSCTS) { in zsa_start()
2398 SCC_WRITEDATA(za->za_flowc); in zsa_start()
2399 za->za_flowc = '\0'; in zsa_start()
2408 if (za->za_flags & ZAS_DELAY) in zsa_start()
2411 if ((q = za->za_ttycommon.t_writeq) == NULL) in zsa_start()
2437 if (!za->za_zsa_restart_id) { in zsa_start()
2438 za->za_zsa_restart_id = in zsa_start()
2441 za->za_flags |= ZAS_BREAK; in zsa_start()
2451 if (! za->za_zsa_restart_id) { in zsa_start()
2452 za->za_zsa_restart_id = timeout(zsa_restart, in zsa_start()
2456 za->za_flags |= ZAS_DELAY; in zsa_start()
2466 zsa_ioctl(za, q, bp); in zsa_start()
2478 if (za->za_flags & ZAS_STOPPED) { in zsa_start()
2483 za->za_xmitblk = bp; in zsa_start()
2489 za->za_xmitblk->b_cont = NULL; in zsa_start()
2494 freeb(za->za_xmitblk); in zsa_start()
2495 za->za_xmitblk = NULL; in zsa_start()
2504 if ((za->za_ttycommon.t_cflag & CSIZE) == CS5) { in zsa_start()
2521 za->za_rcv_flags_mask &= ~DO_TRANSMIT; in zsa_start()
2522 if (za->za_ttycommon.t_cflag & CRTSCTS) { in zsa_start()
2525 za->za_rcv_flags_mask |= DO_RETRANSMIT; in zsa_start()
2526 za->za_flags |= ZAS_BUSY; in zsa_start()
2530 za->za_rcv_flags_mask &= ~DO_RETRANSMIT; in zsa_start()
2533 za->za_flags |= ZAS_BUSY; in zsa_start()
2545 za->za_wr++; in zsa_start()
2548 za->za_flags |= ZAS_BUSY; in zsa_start()
2560 struct asyncline *za = (struct asyncline *)&zs->zs_priv_str; in zsa_restart() local
2566 if (!za->za_zsa_restart_id) { in zsa_restart()
2570 za->za_zsa_restart_id = 0; in zsa_restart()
2571 if (za->za_flags & ZAS_BREAK) { in zsa_restart()
2576 za->za_flags &= ~(ZAS_DELAY|ZAS_BREAK); in zsa_restart()
2577 if (za->za_ttycommon.t_writeq != NULL) in zsa_restart()
2590 struct asyncline *za = (struct asyncline *)&zs->zs_priv_str; in zsa_kick_rcv() local
2600 if (za->za_kick_rcv_id == 0 || (zs->zs_flags & ZS_CLOSED)) { in zsa_kick_rcv()
2604 za_soft_active = za->za_soft_active; in zsa_kick_rcv()
2605 za_kick_active = za->za_kick_active; in zsa_kick_rcv()
2606 q = za->za_ttycommon.t_readq; in zsa_kick_rcv()
2614 za->za_kick_rcv_count = tmp = ZA_KICK_RCV_COUNT; in zsa_kick_rcv()
2616 tmp = --za->za_kick_rcv_count; in zsa_kick_rcv()
2620 za->za_kick_rcv_id = timeout(zsa_kick_rcv, in zsa_kick_rcv()
2623 za->za_kick_rcv_id = timeout(zsa_kick_rcv, in zsa_kick_rcv()
2624 zs, zsticks[SPEED(za->za_ttycommon.t_cflag)]); in zsa_kick_rcv()
2630 za->za_kick_rcv_id = 0; in zsa_kick_rcv()
2644 if (za->za_grace_flow_control >= in zsa_kick_rcv()
2646 if (za->za_ttycommon.t_cflag & in zsa_kick_rcv()
2656 za->za_grace_flow_control++; in zsa_kick_rcv()
2658 za->za_grace_flow_control = 0; in zsa_kick_rcv()
2674 za->za_kick_active = 1; in zsa_kick_rcv()
2678 ttycommon_qfull(&za->za_ttycommon, q); in zsa_kick_rcv()
2695 za->za_kick_active = 0; in zsa_kick_rcv()
2708 struct asyncline *za = arg; in zsa_reioctl() local
2709 struct zscom *zs = za->za_common; in zsa_reioctl()
2717 if (!za->za_wbufcid) { in zsa_reioctl()
2721 za->za_wbufcid = 0; in zsa_reioctl()
2722 if ((q = za->za_ttycommon.t_writeq) == NULL) { in zsa_reioctl()
2726 if ((mp = za->za_ttycommon.t_iocpending) != NULL) { in zsa_reioctl()
2730 za->za_ttycommon.t_iocpending = NULL; in zsa_reioctl()
2731 zsa_ioctl(za, q, mp); in zsa_reioctl()
2743 zsa_ioctl(struct asyncline *za, queue_t *wq, mblk_t *mp) in zsa_ioctl() argument
2745 struct zscom *zs = za->za_common; in zsa_ioctl()
2751 if (za->za_ttycommon.t_iocpending != NULL) { in zsa_ioctl()
2758 freemsg(za->za_ttycommon.t_iocpending); in zsa_ioctl()
2759 za->za_ttycommon.t_iocpending = NULL; in zsa_ioctl()
2775 datasize = ttycommon_ioctl(&za->za_ttycommon, wq, mp, &error); in zsa_ioctl()
2777 if (za->za_ttycommon.t_flags & TS_SOFTCAR) in zsa_ioctl()
2782 if (za->za_wbufcid) in zsa_ioctl()
2783 unbufcall(za->za_wbufcid); in zsa_ioctl()
2784 za->za_wbufcid = bufcall(datasize, BPRI_HI, zsa_reioctl, za); in zsa_ioctl()
2803 zsa_program(za, 1); in zsa_ioctl()
2804 zsa_set_za_rcv_flags_mask(za); in zsa_ioctl()
2827 delay(ztdelay(SPEED(za->za_ttycommon.t_cflag))); in zsa_ioctl()
2838 if (!za->za_zsa_restart_id) { in zsa_ioctl()
2840 za->za_zsa_restart_id = in zsa_ioctl()
2844 za->za_flags |= ZAS_BREAK; in zsa_ioctl()
2974 zsa_program(struct asyncline *za, int setibaud) in zsa_program() argument
2976 struct zscom *zs = za->za_common; in zsa_program()
2980 if ((baudrate = SPEED(za->za_ttycommon.t_cflag)) == 0) { in zsa_program()
2992 za->za_ttycommon.t_cflag &= ~(CIBAUD); in zsa_program()
2994 za->za_ttycommon.t_cflag |= CIBAUDEXT; in zsa_program()
2995 za->za_ttycommon.t_cflag |= in zsa_program()
2998 za->za_ttycommon.t_cflag &= ~CIBAUDEXT; in zsa_program()
2999 za->za_ttycommon.t_cflag |= in zsa_program()
3009 if ((za->za_dev == rconsdev) || (za->za_dev == kbddev) || in zsa_program()
3010 (za->za_dev == stdindev) || (za->za_ttycommon.t_cflag & CREAD)) in zsa_program()
3029 switch (za->za_ttycommon.t_cflag & CSIZE) { in zsa_program()
3052 if (za->za_ttycommon.t_cflag & PARENB) { in zsa_program()
3058 if (za->za_ttycommon.t_iflag & INPCK) in zsa_program()
3061 if (!(za->za_ttycommon.t_cflag & PARODD)) in zsa_program()
3064 wr4 |= (za->za_ttycommon.t_cflag & CSTOPB) ? in zsa_program()
3078 if (za->za_ttycommon.t_cflag & CRTSCTS) in zsa_program()
3081 if (za->za_ttycommon.t_cflag & CRTSCTS) in zsa_program()
3107 za->za_flags |= ZAS_DRAINING; in zsa_program()
3122 za->za_flags &= ~ZAS_DRAINING; in zsa_program()
3157 struct asyncline *za = (struct asyncline *)&zs->zs_priv_str; in zsa_callback() local
3161 if (za->za_bufcid) { in zsa_callback()
3162 za->za_bufcid = 0; in zsa_callback()
3172 zsa_set_za_rcv_flags_mask(struct asyncline *za) in zsa_set_za_rcv_flags_mask() argument
3176 za->za_rcv_flags_mask &= ~0xFF; in zsa_set_za_rcv_flags_mask()
3177 switch (za->za_ttycommon.t_cflag & CSIZE) { in zsa_set_za_rcv_flags_mask()
3191 za->za_rcv_flags_mask &= ~(0xFF << 16); in zsa_set_za_rcv_flags_mask()
3192 za->za_rcv_flags_mask |= mask << 16; in zsa_set_za_rcv_flags_mask()
3194 if ((za->za_ttycommon.t_iflag & PARMRK) && in zsa_set_za_rcv_flags_mask()
3195 !(za->za_ttycommon.t_iflag & (IGNPAR|ISTRIP))) { in zsa_set_za_rcv_flags_mask()
3196 za->za_rcv_flags_mask |= DO_ESC; in zsa_set_za_rcv_flags_mask()
3198 za->za_rcv_flags_mask &= ~DO_ESC; in zsa_set_za_rcv_flags_mask()
3199 if (za->za_ttycommon.t_iflag & IXON) { in zsa_set_za_rcv_flags_mask()
3200 za->za_rcv_flags_mask |= DO_STOPC; in zsa_set_za_rcv_flags_mask()
3201 za->za_rcv_flags_mask &= ~0xFF; in zsa_set_za_rcv_flags_mask()
3202 za->za_rcv_flags_mask |= za->za_ttycommon.t_stopc; in zsa_set_za_rcv_flags_mask()
3204 za->za_rcv_flags_mask &= ~DO_STOPC; in zsa_set_za_rcv_flags_mask()
3210 struct asyncline *za; in zsa_suspend() local
3216 za = (struct asyncline *)&zs->zs_priv_str; in zsa_suspend()
3230 restart_id = za->za_zsa_restart_id; in zsa_suspend()
3231 za->za_zsa_restart_id = 0; in zsa_suspend()
3232 kick_rcv_id = za->za_kick_rcv_id; in zsa_suspend()
3233 za->za_kick_rcv_id = 0; in zsa_suspend()
3250 delay(ztdelay(za->za_ttycommon.t_cflag & CBAUD)); in zsa_suspend()
3256 if ((q = za->za_ttycommon.t_writeq) != NULL) { in zsa_suspend()
3259 za->za_flags &= ~ZAS_BUSY; in zsa_suspend()
3260 za->za_rcv_flags_mask &= ~DO_RETRANSMIT; in zsa_suspend()
3261 bp = za->za_xmitblk; in zsa_suspend()
3265 za->za_xmitblk = NULL; in zsa_suspend()
3278 za->za_flags &= ~ZAS_BREAK; in zsa_suspend()
3307 struct asyncline *za; in zsa_resume() local
3310 za = (struct asyncline *)&zs->zs_priv_str; in zsa_resume()
3334 za->za_rcv_flags_mask |= DO_TRANSMIT; in zsa_resume()
3335 za->za_ext = 1; in zsa_resume()
3347 struct asyncline *za = (struct asyncline *)&zs->zs_priv_str; in zsa_print_info() local
3348 queue_t *q = za->za_ttycommon.t_writeq; in zsa_print_info()
3353 if (za->za_ttycommon.t_flags & TS_SOFTCAR) printf(" t_fl:TS_SOFTCAR"); in zsa_print_info()
3354 if (za->za_ttycommon.t_flags & TS_XCLUDE) printf(" t_fl:TS_XCLUDE"); in zsa_print_info()
3355 if (za->za_ttycommon.t_iflag & IGNBRK) printf(" t_ifl:IGNBRK"); in zsa_print_info()
3356 if (za->za_ttycommon.t_iflag & BRKINT) printf(" t_ifl:BRKINT"); in zsa_print_info()
3357 if (za->za_ttycommon.t_iflag & IGNPAR) printf(" t_ifl:IGNPAR"); in zsa_print_info()
3358 if (za->za_ttycommon.t_iflag & PARMRK) printf(" t_ifl:PARMRK"); in zsa_print_info()
3359 if (za->za_ttycommon.t_iflag & INPCK) printf(" t_ifl:INPCK"); in zsa_print_info()
3360 if (za->za_ttycommon.t_iflag & ISTRIP) printf(" t_ifl:ISTRIP"); in zsa_print_info()
3361 if (za->za_ttycommon.t_iflag & INLCR) printf(" t_ifl:INLCR"); in zsa_print_info()
3362 if (za->za_ttycommon.t_iflag & IGNCR) printf(" t_ifl:IGNCR"); in zsa_print_info()
3363 if (za->za_ttycommon.t_iflag & ICRNL) printf(" t_ifl:ICRNL"); in zsa_print_info()
3364 if (za->za_ttycommon.t_iflag & IUCLC) printf(" t_ifl:IUCLC"); in zsa_print_info()
3365 if (za->za_ttycommon.t_iflag & IXON) printf(" t_ifl:IXON"); in zsa_print_info()
3366 if (za->za_ttycommon.t_iflag & IXOFF) printf(" t_ifl:IXOFF"); in zsa_print_info()
3371 if (za->za_ttycommon.t_cflag & CSIZE == CS5) printf(" t_cfl:CS5"); in zsa_print_info()
3372 if (za->za_ttycommon.t_cflag & CSIZE == CS6) printf(" t_cfl:CS6"); in zsa_print_info()
3373 if (za->za_ttycommon.t_cflag & CSIZE == CS7) printf(" t_cfl:CS7"); in zsa_print_info()
3374 if (za->za_ttycommon.t_cflag & CSIZE == CS8) printf(" t_cfl:CS8"); in zsa_print_info()
3375 if (za->za_ttycommon.t_cflag & CSTOPB) printf(" t_cfl:CSTOPB"); in zsa_print_info()
3376 if (za->za_ttycommon.t_cflag & CREAD) printf(" t_cfl:CREAD"); in zsa_print_info()
3377 if (za->za_ttycommon.t_cflag & PARENB) printf(" t_cfl:PARENB"); in zsa_print_info()
3378 if (za->za_ttycommon.t_cflag & PARODD) printf(" t_cfl:PARODD"); in zsa_print_info()
3379 if (za->za_ttycommon.t_cflag & HUPCL) printf(" t_cfl:HUPCL"); in zsa_print_info()
3380 if (za->za_ttycommon.t_cflag & CLOCAL) printf(" t_cfl:CLOCAL"); in zsa_print_info()
3381 printf(" t_stopc=%x", za->za_ttycommon.t_stopc); in zsa_print_info()