Lines Matching refs:q

352 	queue_t *q,  in timodopen()  argument
362 ASSERT(q != NULL); in timodopen()
364 if (q->q_ptr) { in timodopen()
378 q->q_ptr = (caddr_t)tp; in timodopen()
379 WR(q)->q_ptr = (caddr_t)tp; in timodopen()
382 tilogp("timodopen: Allocated for q %lx\n", (uintptr_t)q); in timodopen()
385 qprocson(q); in timodopen()
387 tp->tim_provinfo = tpi_findprov(q); in timodopen()
413 driverq = WR(q); in timodopen()
438 putnext(q, bp); in timodopen()
446 queue_t *q = arg; in tim_timer() local
447 struct tim_tim *tp = (struct tim_tim *)q->q_ptr; in tim_timer()
451 if (q->q_flag & QREADR) { in tim_timer()
458 enableok(q); in tim_timer()
459 qenable(q); in tim_timer()
465 queue_t *q = arg; in tim_buffer() local
466 struct tim_tim *tp = (struct tim_tim *)q->q_ptr; in tim_buffer()
470 if (q->q_flag & QREADR) { in tim_buffer()
477 enableok(q); in tim_buffer()
478 qenable(q); in tim_buffer()
488 queue_t *q, in timodclose() argument
496 ASSERT(q != NULL); in timodclose()
498 tp = (struct tim_tim *)q->q_ptr; in timodclose()
499 q->q_ptr = NULL; in timodclose()
504 tilogp("timodclose: Entered for q %lx\n", (uintptr_t)q); in timodclose()
506 qprocsoff(q); in timodclose()
514 qunbufcall(q, tp->tim_wbufcid); in timodclose()
518 qunbufcall(q, tp->tim_rbufcid); in timodclose()
522 (void) quntimeout(q, tp->tim_wtimoutid); in timodclose()
526 (void) quntimeout(q, tp->tim_rtimoutid); in timodclose()
531 (void) quntimeout(q, tp->tim_tcap_timoutid); in timodclose()
551 q->q_ptr = WR(q)->q_ptr = NULL; in timodclose()
571 timodrput(queue_t *q, mblk_t *mp) in timodrput() argument
579 if (q->q_first != 0 && mp->b_datap->db_type < QPCTL) { in timodrput()
580 (void) putq(q, mp); in timodrput()
591 if (bcanputnext(q, mp->b_band)) in timodrput()
592 putnext(q, mp); in timodrput()
594 (void) putq(q, mp); in timodrput()
600 bcanputnext(q, mp->b_band)) { in timodrput()
601 putnext(q, mp); in timodrput()
603 (void) putq(q, mp); in timodrput()
612 if (bcanputnext(q, mp->b_band)) in timodrput()
613 putnext(q, mp); in timodrput()
615 (void) putq(q, mp); in timodrput()
618 (void) timodrproc(q, mp); in timodrput()
623 (void) timodrproc(q, mp); in timodrput()
641 timodrsrv(queue_t *q) in timodrsrv() argument
646 ASSERT(q != NULL); in timodrsrv()
648 tp = (struct tim_tim *)q->q_ptr; in timodrsrv()
652 while ((mp = getq(q)) != NULL) { in timodrsrv()
653 if (timodrproc(q, mp)) { in timodrsrv()
670 timodprocessinfo(queue_t *q, struct tim_tim *tp, struct T_info_ack *tia) in timodprocessinfo() argument
673 (void) strqset(q, QMAXPSZ, 0, tia->TIDU_size); in timodprocessinfo()
674 (void) strqset(OTHERQ(q), QMAXPSZ, 0, tia->TIDU_size); in timodprocessinfo()
683 timodrproc(queue_t *q, mblk_t *mp) in timodrproc() argument
692 tp = (struct tim_tim *)q->q_ptr; in timodrproc()
696 putnext(q, mp); in timodrproc()
731 (void) quntimeout(q, tp->tim_tcap_timoutid); in timodrproc()
735 putnext(q, mp); in timodrproc()
738 if (!bcanputnext(q, mp->b_band)) { in timodrproc()
739 (void) putbq(q, mp); in timodrproc()
742 putnext(q, mp); in timodrproc()
763 !bcanputnext(q, mp->b_band)) { in timodrproc()
764 (void) putbq(q, mp); in timodrproc()
767 putnext(q, mp); in timodrproc()
776 audit_sock(T_UNITDATA_IND, q, mp, TIMOD_ID); in timodrproc()
777 putnext(q, mp); in timodrproc()
784 putnext(q, mp); in timodrproc()
798 putnext(q, mp); in timodrproc()
800 tim_send_ioc_error_ack(q, tp, mp); in timodrproc()
802 putnext(q, mp); in timodrproc()
809 putnext(q, mp); in timodrproc()
860 tim_recover(q, mp, in timodrproc()
885 tim_send_reply(q, mp, tp, pptr->ok_ack.CORRECT_prim); in timodrproc()
895 putnext(q, mp); in timodrproc()
905 putnext(q, mp); in timodrproc()
916 putnext(q, mp); in timodrproc()
927 tim_recover(q, mp, in timodrproc()
943 tim_ioctl_send_reply(q, tp->tim_iocsave, mp); in timodrproc()
961 putnext(q, mp); in timodrproc()
964 tim_ioctl_send_reply(q, tp->tim_iocsave, mp); in timodrproc()
980 putnext(q, mp); in timodrproc()
987 timodprocessinfo(q, tp, tia); in timodrproc()
1002 putnext(q, mp); in timodrproc()
1025 putnext(q, mp); in timodrproc()
1054 tim_ioctl_send_reply(q, tp->tim_iocsave, mp); in timodrproc()
1077 putnext(q, mp); in timodrproc()
1109 tim_send_ioc_error_ack(q, tp, mp); in timodrproc()
1152 if (ti_expind_on_rdqueues(q)) { in timodrproc()
1166 tim_ioctl_send_reply(q, tp->tim_iocsave, mp); in timodrproc()
1175 putnext(q, mp); in timodrproc()
1180 tim_send_reply(q, mp, tp, T_ADDR_REQ); in timodrproc()
1196 tim_recover(q, mp, in timodrproc()
1202 audit_sock(T_CONN_IND, q, mp, TIMOD_ID); in timodrproc()
1203 putnext(q, mp); in timodrproc()
1219 putnext(q, mp); in timodrproc()
1227 if (q->q_first != 0) in timodrproc()
1231 putnext(q, mp); in timodrproc()
1256 putnext(q, mp); in timodrproc()
1270 putnext(q, mp); in timodrproc()
1279 if (!bcanputnext(q, mp->b_band)) { in timodrproc()
1280 (void) putbq(q, mp); in timodrproc()
1283 putnext(q, mp); in timodrproc()
1290 putnext(q, mp); in timodrproc()
1304 (void) quntimeout(q, tp->tim_tcap_timoutid); in timodrproc()
1311 timodprocessinfo(q, tp, &tca->INFO_ack); in timodrproc()
1313 tim_send_reply(q, mp, tp, T_CAPABILITY_REQ); in timodrproc()
1325 flushband(q, *(mp->b_rptr + 1), FLUSHDATA); in timodrproc()
1327 flushq(q, FLUSHDATA); in timodrproc()
1329 putnext(q, mp); in timodrproc()
1403 putnext(q, mp); in timodrproc()
1430 if (ti_doname(WR(q), mp) != DONAME_CONT) { in timodrproc()
1436 putnext(q, mp); in timodrproc()
1452 timodwput(queue_t *q, mblk_t *mp) in timodwput() argument
1464 if (q->q_first != 0 && mp->b_datap->db_type < QPCTL) { in timodwput()
1469 (void) putq(q, mp); in timodwput()
1478 (void) putq(q, mp); in timodwput()
1489 tp = (struct tim_tim *)q->q_ptr; in timodwput()
1494 if ((tmp = tim_filladdr(q, mp, B_FALSE)) == NULL) { in timodwput()
1495 (void) putq(q, mp); in timodwput()
1501 if (bcanputnext(q, mp->b_band)) in timodwput()
1502 putnext(q, mp); in timodwput()
1504 (void) putq(q, mp); in timodwput()
1511 tp = (struct tim_tim *)q->q_ptr; in timodwput()
1516 tmp = tim_filladdr(q, mp, B_FALSE); in timodwput()
1518 (void) putq(q, mp); in timodwput()
1524 if (bcanputnext(q, mp->b_band)) in timodwput()
1525 putnext(q, mp); in timodwput()
1527 (void) putq(q, mp); in timodwput()
1532 if (bcanputnext(q, mp->b_band)) in timodwput()
1533 putnext(q, mp); in timodwput()
1535 (void) putq(q, mp); in timodwput()
1538 (void) timodwproc(q, mp); in timodwput()
1543 (void) timodwproc(q, mp); in timodwput()
1559 timodwsrv(queue_t *q) in timodwsrv() argument
1563 ASSERT(q != NULL); in timodwsrv()
1564 if (q->q_ptr == NULL) in timodwsrv()
1567 while ((mp = getq(q)) != NULL) { in timodwsrv()
1568 if (timodwproc(q, mp)) { in timodwsrv()
1584 timodwproc(queue_t *q, mblk_t *mp) in timodwproc() argument
1593 tp = (struct tim_tim *)q->q_ptr; in timodwproc()
1597 putnext(q, mp); in timodwproc()
1602 if ((tmp = tim_filladdr(q, mp, B_TRUE)) == NULL) { in timodwproc()
1608 if (!bcanputnext(q, mp->b_band)) { in timodwproc()
1609 (void) putbq(q, mp); in timodwproc()
1612 putnext(q, mp); in timodwproc()
1633 (void) putbq(q, mp); in timodwproc()
1635 if (!(q->q_flag & QWANTR)) in timodwproc()
1636 tim_ioctl_retry(q); in timodwproc()
1642 putnext(q, mp); in timodwproc()
1647 miocnak(q, mp, 0, ENOTSUP); in timodwproc()
1666 miocack(q, mp, sizeof (*kp), 0); in timodwproc()
1668 miocnak(q, mp, 0, ENOTCONN); in timodwproc()
1685 miocnak(q, mp, 0, error); in timodwproc()
1688 tim_send_ioctl_tpi_msg(q, mp, tp, iocbp); in timodwproc()
1695 miocnak(q, mp, 0, error); in timodwproc()
1699 tim_send_ioctl_tpi_msg(q, mp, tp, iocbp); in timodwproc()
1709 miocnak(q, mp, 0, error); in timodwproc()
1732 miocnak(q, mp, 0, ENOMEM); in timodwproc()
1734 tim_answer_ti_sync(q, mp, tp, in timodwproc()
1768 tim_send_ioctl_tpi_msg(q, mp, tp, iocbp); in timodwproc()
1778 miocnak(q, mp, 0, error); in timodwproc()
1790 miocnak(q, mp, 0, EPROTO); in timodwproc()
1797 tim_send_ioctl_tpi_msg(q, mp, tp, iocbp); in timodwproc()
1815 tp->tim_tcap_timoutid = qtimeout(q, in timodwproc()
1816 tim_tcap_timer, q, tim_tcap_wait * hz); in timodwproc()
1817 tim_send_ioctl_tpi_msg(q, mp, tp, iocbp); in timodwproc()
1841 tim_send_ioctl_tpi_msg(q, mp, tp, in timodwproc()
1858 miocnak(q, mp, 0, ENOMEM); in timodwproc()
1866 tim_ioctl_send_reply(q, mp, tcsr_mp); in timodwproc()
1893 putnext(q, mp); in timodwproc()
1903 putnext(q, mp); in timodwproc()
1908 tim_recover(q, mp, msgsize(mp)); in timodwproc()
1918 putnext(q, tmp); in timodwproc()
1926 if (ti_doname(q, mp) != DONAME_CONT) { in timodwproc()
1930 putnext(q, mp); in timodwproc()
1936 merror(q, mp, EPROTO); in timodwproc()
1943 putnext(q, mp); in timodwproc()
1951 if (!bcanputnext(q, mp->b_band)) { in timodwproc()
1952 (void) putbq(q, mp); in timodwproc()
1955 putnext(q, mp); in timodwproc()
1960 tmp = tim_filladdr(q, mp, B_TRUE); in timodwproc()
1968 audit_sock(T_UNITDATA_REQ, q, mp, TIMOD_ID); in timodwproc()
1969 if (!bcanputnext(q, mp->b_band)) { in timodwproc()
1970 (void) putbq(q, mp); in timodwproc()
1973 putnext(q, mp); in timodwproc()
1984 merror(q, mp, EPROTO); in timodwproc()
1991 merror(q, mp, EPROTO); in timodwproc()
2004 tim_recover(q, mp, in timodwproc()
2022 audit_sock(T_CONN_REQ, q, mp, TIMOD_ID); in timodwproc()
2023 putnext(q, mp); in timodwproc()
2036 merror(q, mp, EPROTO); in timodwproc()
2053 tim_recover(q, mp, msgsize(mp)); in timodwproc()
2079 putnext(q, mp); in timodwproc()
2089 merror(q, mp, EPROTO); in timodwproc()
2115 putnext(q, mp); in timodwproc()
2126 putnext(q, mp); in timodwproc()
2136 putnext(q, mp); in timodwproc()
2146 flushband(q, *(mp->b_rptr + 1), FLUSHDATA); in timodwproc()
2148 flushq(q, FLUSHDATA); in timodwproc()
2150 putnext(q, mp); in timodwproc()
2218 queue_t *q, /* queue message arrived at */ in ti_doname() argument
2227 struct tim_tim *tp = q->q_ptr; in ti_doname()
2236 miocnak(q, mp, 0, EINVAL); in ti_doname()
2241 miocnak(q, mp, 0, EINVAL); in ti_doname()
2254 qreply(q, mp); in ti_doname()
2265 miocnak(q, mp, 0, EINVAL); in ti_doname()
2290 miocnak(q, mp, 0, ENAMETOOLONG); in ti_doname()
2304 miocnak(q, mp, 0, ENAMETOOLONG); in ti_doname()
2334 tim_ioctl_send_reply(q, mp, NULL); in ti_doname()
2345 miocnak(q, mp, 0, EAGAIN); in ti_doname()
2359 qreply(q, mp); in ti_doname()
2376 miocnak(q, mp, 0, EAGAIN); in ti_doname()
2394 qreply(q, mp); in ti_doname()
2414 tim_filladdr(queue_t *q, mblk_t *mp, boolean_t dorecover) in tim_filladdr() argument
2422 tp = (struct tim_tim *)q->q_ptr; in tim_filladdr()
2483 tim_recover(q, mp, in tim_filladdr()
2542 tim_recover(queue_t *q, mblk_t *mp, t_scalar_t size) in tim_recover() argument
2548 tp = (struct tim_tim *)q->q_ptr; in tim_recover()
2555 noenable(q); in tim_recover()
2556 (void) putbq(q, mp); in tim_recover()
2561 if (q->q_flag & QREADR) { in tim_recover()
2568 if (!(bid = qbufcall(RD(q), (size_t)size, BPRI_MED, tim_buffer, q))) { in tim_recover()
2569 tid = qtimeout(RD(q), tim_timer, q, TIMWAIT); in tim_recover()
2570 if (q->q_flag & QREADR) in tim_recover()
2575 if (q->q_flag & QREADR) in tim_recover()
2588 tim_ioctl_retry(queue_t *q) in tim_ioctl_retry() argument
2592 tp = (struct tim_tim *)q->q_ptr; in tim_ioctl_retry()
2600 tp->tim_wtimoutid = qtimeout(RD(q), tim_timer, q, TIMIOCWAIT); in tim_ioctl_retry()
2613 queue_t *q; in ti_expind_on_rdqueues() local
2615 q = rq; in ti_expind_on_rdqueues()
2620 claimstr(q); in ti_expind_on_rdqueues()
2639 releasestr(q); /* decrement sd_refcnt */ in ti_expind_on_rdqueues()
2647 releasestr(q); in ti_expind_on_rdqueues()
2654 queue_t *q = (queue_t *)q_ptr; in tim_tcap_timer() local
2655 struct tim_tim *tp = (struct tim_tim *)q->q_ptr; in tim_tcap_timer()
2662 tim_tcap_genreply(q, tp); in tim_tcap_timer()
2671 tim_tcap_genreply(queue_t *q, struct tim_tim *tp) in tim_tcap_genreply() argument
2678 ASSERT(tp == (struct tim_tim *)q->q_ptr); in tim_tcap_genreply()
2694 (void) quntimeout(q, tp->tim_tcap_timoutid); in tim_tcap_genreply()
2707 putnext(WR(q), tirmp); in tim_tcap_genreply()
2715 miocnak(q, mp, 0, ENOMEM); in tim_tcap_genreply()
2728 tim_ioctl_send_reply(q, mp, ackmp); in tim_tcap_genreply()
2740 miocnak(q, mp, 0, ENOMEM); in tim_tcap_genreply()
2747 tim_ioctl_send_reply(queue_t *q, mblk_t *ioc_mp, mblk_t *mp) in tim_ioctl_send_reply() argument
2751 ASSERT(q != NULL && ioc_mp != NULL); in tim_ioctl_send_reply()
2780 putnext(RD(q), ioc_mp); in tim_ioctl_send_reply()
2787 tim_send_ioc_error_ack(queue_t *q, struct tim_tim *tp, mblk_t *mp) in tim_send_ioc_error_ack() argument
2800 q = RD(q); in tim_send_ioc_error_ack()
2805 putnext(q, mp); in tim_send_ioc_error_ack()
2810 tim_tcap_genreply(q, tp); in tim_send_ioc_error_ack()
2824 putnext(q, mp); in tim_send_ioc_error_ack()
2847 putnext(q, tp->tim_iocsave); in tim_send_ioc_error_ack()
2862 tim_send_reply(queue_t *q, mblk_t *mp, struct tim_tim *tp, t_scalar_t prim) in tim_send_reply() argument
2864 ASSERT(mp != NULL && q != NULL && tp != NULL); in tim_send_reply()
2865 ASSERT(q == RD(q)); in tim_send_reply()
2871 putnext(q, mp); in tim_send_reply()
2874 tim_ioctl_send_reply(q, tp->tim_iocsave, mp); in tim_send_reply()
2886 tim_answer_ti_sync(queue_t *q, mblk_t *mp, struct tim_tim *tp, in tim_answer_ti_sync() argument
2891 ASSERT(q != NULL && q == WR(q) && ackmp != NULL); in tim_answer_ti_sync()
2906 miocnak(q, mp, 0, EINVAL); in tim_answer_ti_sync()
2914 ti_expind_on_rdqueues(RD(q))) { in tim_answer_ti_sync()
2922 tim_ioctl_send_reply(q, mp, ackmp); in tim_answer_ti_sync()
2934 tim_send_ioctl_tpi_msg(queue_t *q, mblk_t *mp, struct tim_tim *tp, in tim_send_ioctl_tpi_msg() argument
2940 ASSERT(q != NULL && mp != NULL && tp != NULL); in tim_send_ioctl_tpi_msg()
2941 ASSERT(q == WR(q)); in tim_send_ioctl_tpi_msg()
2973 putnext(q, tmp); in tim_send_ioctl_tpi_msg()