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()
640 timodrsrv(queue_t *q) in timodrsrv() argument
645 ASSERT(q != NULL); in timodrsrv()
647 tp = (struct tim_tim *)q->q_ptr; in timodrsrv()
651 while ((mp = getq(q)) != NULL) { in timodrsrv()
652 if (timodrproc(q, mp)) { in timodrsrv()
668 timodprocessinfo(queue_t *q, struct tim_tim *tp, struct T_info_ack *tia) in timodprocessinfo() argument
671 (void) strqset(q, QMAXPSZ, 0, tia->TIDU_size); in timodprocessinfo()
672 (void) strqset(OTHERQ(q), QMAXPSZ, 0, tia->TIDU_size); in timodprocessinfo()
681 timodrproc(queue_t *q, mblk_t *mp) in timodrproc() argument
690 tp = (struct tim_tim *)q->q_ptr; in timodrproc()
694 putnext(q, mp); in timodrproc()
729 (void) quntimeout(q, tp->tim_tcap_timoutid); in timodrproc()
733 putnext(q, mp); in timodrproc()
736 if (!bcanputnext(q, mp->b_band)) { in timodrproc()
737 (void) putbq(q, mp); in timodrproc()
740 putnext(q, mp); in timodrproc()
761 !bcanputnext(q, mp->b_band)) { in timodrproc()
762 (void) putbq(q, mp); in timodrproc()
765 putnext(q, mp); in timodrproc()
774 audit_sock(T_UNITDATA_IND, q, mp, TIMOD_ID); in timodrproc()
775 putnext(q, mp); in timodrproc()
782 putnext(q, mp); in timodrproc()
796 putnext(q, mp); in timodrproc()
798 tim_send_ioc_error_ack(q, tp, mp); in timodrproc()
800 putnext(q, mp); in timodrproc()
807 putnext(q, mp); in timodrproc()
858 tim_recover(q, mp, in timodrproc()
883 tim_send_reply(q, mp, tp, pptr->ok_ack.CORRECT_prim); in timodrproc()
893 putnext(q, mp); in timodrproc()
903 putnext(q, mp); in timodrproc()
914 putnext(q, mp); in timodrproc()
925 tim_recover(q, mp, in timodrproc()
941 tim_ioctl_send_reply(q, tp->tim_iocsave, mp); in timodrproc()
959 putnext(q, mp); in timodrproc()
962 tim_ioctl_send_reply(q, tp->tim_iocsave, mp); in timodrproc()
978 putnext(q, mp); in timodrproc()
985 timodprocessinfo(q, tp, tia); in timodrproc()
1000 putnext(q, mp); in timodrproc()
1023 putnext(q, mp); in timodrproc()
1052 tim_ioctl_send_reply(q, tp->tim_iocsave, mp); in timodrproc()
1075 putnext(q, mp); in timodrproc()
1107 tim_send_ioc_error_ack(q, tp, mp); in timodrproc()
1150 if (ti_expind_on_rdqueues(q)) { in timodrproc()
1164 tim_ioctl_send_reply(q, tp->tim_iocsave, mp); in timodrproc()
1173 putnext(q, mp); in timodrproc()
1178 tim_send_reply(q, mp, tp, T_ADDR_REQ); in timodrproc()
1194 tim_recover(q, mp, in timodrproc()
1200 audit_sock(T_CONN_IND, q, mp, TIMOD_ID); in timodrproc()
1201 putnext(q, mp); in timodrproc()
1217 putnext(q, mp); in timodrproc()
1225 if (q->q_first != 0) in timodrproc()
1229 putnext(q, mp); in timodrproc()
1254 putnext(q, mp); in timodrproc()
1268 putnext(q, mp); in timodrproc()
1277 if (!bcanputnext(q, mp->b_band)) { in timodrproc()
1278 (void) putbq(q, mp); in timodrproc()
1281 putnext(q, mp); in timodrproc()
1288 putnext(q, mp); in timodrproc()
1302 (void) quntimeout(q, tp->tim_tcap_timoutid); in timodrproc()
1309 timodprocessinfo(q, tp, &tca->INFO_ack); in timodrproc()
1311 tim_send_reply(q, mp, tp, T_CAPABILITY_REQ); in timodrproc()
1323 flushband(q, *(mp->b_rptr + 1), FLUSHDATA); in timodrproc()
1325 flushq(q, FLUSHDATA); in timodrproc()
1327 putnext(q, mp); in timodrproc()
1401 putnext(q, mp); in timodrproc()
1428 if (ti_doname(WR(q), mp) != DONAME_CONT) { in timodrproc()
1434 putnext(q, mp); in timodrproc()
1450 timodwput(queue_t *q, mblk_t *mp) in timodwput() argument
1462 if (q->q_first != 0 && mp->b_datap->db_type < QPCTL) { in timodwput()
1467 (void) putq(q, mp); in timodwput()
1476 (void) putq(q, mp); in timodwput()
1487 tp = (struct tim_tim *)q->q_ptr; in timodwput()
1492 if ((tmp = tim_filladdr(q, mp, B_FALSE)) == NULL) { in timodwput()
1493 (void) putq(q, mp); in timodwput()
1499 if (bcanputnext(q, mp->b_band)) in timodwput()
1500 putnext(q, mp); in timodwput()
1502 (void) putq(q, mp); in timodwput()
1509 tp = (struct tim_tim *)q->q_ptr; in timodwput()
1514 tmp = tim_filladdr(q, mp, B_FALSE); in timodwput()
1516 (void) putq(q, mp); in timodwput()
1522 if (bcanputnext(q, mp->b_band)) in timodwput()
1523 putnext(q, mp); in timodwput()
1525 (void) putq(q, mp); in timodwput()
1530 if (bcanputnext(q, mp->b_band)) in timodwput()
1531 putnext(q, mp); in timodwput()
1533 (void) putq(q, mp); in timodwput()
1536 (void) timodwproc(q, mp); in timodwput()
1541 (void) timodwproc(q, mp); in timodwput()
1556 timodwsrv(queue_t *q) in timodwsrv() argument
1560 ASSERT(q != NULL); in timodwsrv()
1561 if (q->q_ptr == NULL) in timodwsrv()
1564 while ((mp = getq(q)) != NULL) { in timodwsrv()
1565 if (timodwproc(q, mp)) { in timodwsrv()
1580 timodwproc(queue_t *q, mblk_t *mp) in timodwproc() argument
1589 tp = (struct tim_tim *)q->q_ptr; in timodwproc()
1593 putnext(q, mp); in timodwproc()
1598 if ((tmp = tim_filladdr(q, mp, B_TRUE)) == NULL) { in timodwproc()
1604 if (!bcanputnext(q, mp->b_band)) { in timodwproc()
1605 (void) putbq(q, mp); in timodwproc()
1608 putnext(q, mp); in timodwproc()
1629 (void) putbq(q, mp); in timodwproc()
1631 if (!(q->q_flag & QWANTR)) in timodwproc()
1632 tim_ioctl_retry(q); in timodwproc()
1638 putnext(q, mp); in timodwproc()
1643 miocnak(q, mp, 0, ENOTSUP); in timodwproc()
1662 miocack(q, mp, sizeof (*kp), 0); in timodwproc()
1664 miocnak(q, mp, 0, ENOTCONN); in timodwproc()
1681 miocnak(q, mp, 0, error); in timodwproc()
1684 tim_send_ioctl_tpi_msg(q, mp, tp, iocbp); in timodwproc()
1691 miocnak(q, mp, 0, error); in timodwproc()
1695 tim_send_ioctl_tpi_msg(q, mp, tp, iocbp); in timodwproc()
1705 miocnak(q, mp, 0, error); in timodwproc()
1728 miocnak(q, mp, 0, ENOMEM); in timodwproc()
1730 tim_answer_ti_sync(q, mp, tp, in timodwproc()
1764 tim_send_ioctl_tpi_msg(q, mp, tp, iocbp); in timodwproc()
1774 miocnak(q, mp, 0, error); in timodwproc()
1786 miocnak(q, mp, 0, EPROTO); in timodwproc()
1793 tim_send_ioctl_tpi_msg(q, mp, tp, iocbp); in timodwproc()
1811 tp->tim_tcap_timoutid = qtimeout(q, in timodwproc()
1812 tim_tcap_timer, q, tim_tcap_wait * hz); in timodwproc()
1813 tim_send_ioctl_tpi_msg(q, mp, tp, iocbp); in timodwproc()
1837 tim_send_ioctl_tpi_msg(q, mp, tp, in timodwproc()
1854 miocnak(q, mp, 0, ENOMEM); in timodwproc()
1862 tim_ioctl_send_reply(q, mp, tcsr_mp); in timodwproc()
1889 putnext(q, mp); in timodwproc()
1899 putnext(q, mp); in timodwproc()
1904 tim_recover(q, mp, msgsize(mp)); in timodwproc()
1914 putnext(q, tmp); in timodwproc()
1922 if (ti_doname(q, mp) != DONAME_CONT) { in timodwproc()
1926 putnext(q, mp); in timodwproc()
1932 merror(q, mp, EPROTO); in timodwproc()
1939 putnext(q, mp); in timodwproc()
1947 if (!bcanputnext(q, mp->b_band)) { in timodwproc()
1948 (void) putbq(q, mp); in timodwproc()
1951 putnext(q, mp); in timodwproc()
1956 tmp = tim_filladdr(q, mp, B_TRUE); in timodwproc()
1964 audit_sock(T_UNITDATA_REQ, q, mp, TIMOD_ID); in timodwproc()
1965 if (!bcanputnext(q, mp->b_band)) { in timodwproc()
1966 (void) putbq(q, mp); in timodwproc()
1969 putnext(q, mp); in timodwproc()
1980 merror(q, mp, EPROTO); in timodwproc()
1987 merror(q, mp, EPROTO); in timodwproc()
2000 tim_recover(q, mp, in timodwproc()
2018 audit_sock(T_CONN_REQ, q, mp, TIMOD_ID); in timodwproc()
2019 putnext(q, mp); in timodwproc()
2032 merror(q, mp, EPROTO); in timodwproc()
2049 tim_recover(q, mp, msgsize(mp)); in timodwproc()
2075 putnext(q, mp); in timodwproc()
2085 merror(q, mp, EPROTO); in timodwproc()
2111 putnext(q, mp); in timodwproc()
2122 putnext(q, mp); in timodwproc()
2132 putnext(q, mp); in timodwproc()
2142 flushband(q, *(mp->b_rptr + 1), FLUSHDATA); in timodwproc()
2144 flushq(q, FLUSHDATA); in timodwproc()
2146 putnext(q, mp); in timodwproc()
2214 queue_t *q, /* queue message arrived at */ in ti_doname() argument
2223 struct tim_tim *tp = q->q_ptr; in ti_doname()
2232 miocnak(q, mp, 0, EINVAL); in ti_doname()
2237 miocnak(q, mp, 0, EINVAL); in ti_doname()
2250 qreply(q, mp); in ti_doname()
2261 miocnak(q, mp, 0, EINVAL); in ti_doname()
2286 miocnak(q, mp, 0, ENAMETOOLONG); in ti_doname()
2300 miocnak(q, mp, 0, ENAMETOOLONG); in ti_doname()
2330 tim_ioctl_send_reply(q, mp, NULL); in ti_doname()
2341 miocnak(q, mp, 0, EAGAIN); in ti_doname()
2355 qreply(q, mp); in ti_doname()
2372 miocnak(q, mp, 0, EAGAIN); in ti_doname()
2390 qreply(q, mp); in ti_doname()
2410 tim_filladdr(queue_t *q, mblk_t *mp, boolean_t dorecover) in tim_filladdr() argument
2418 tp = (struct tim_tim *)q->q_ptr; in tim_filladdr()
2479 tim_recover(q, mp, in tim_filladdr()
2538 tim_recover(queue_t *q, mblk_t *mp, t_scalar_t size) in tim_recover() argument
2544 tp = (struct tim_tim *)q->q_ptr; in tim_recover()
2551 noenable(q); in tim_recover()
2552 (void) putbq(q, mp); in tim_recover()
2557 if (q->q_flag & QREADR) { in tim_recover()
2564 if (!(bid = qbufcall(RD(q), (size_t)size, BPRI_MED, tim_buffer, q))) { in tim_recover()
2565 tid = qtimeout(RD(q), tim_timer, q, TIMWAIT); in tim_recover()
2566 if (q->q_flag & QREADR) in tim_recover()
2571 if (q->q_flag & QREADR) in tim_recover()
2584 tim_ioctl_retry(queue_t *q) in tim_ioctl_retry() argument
2588 tp = (struct tim_tim *)q->q_ptr; in tim_ioctl_retry()
2596 tp->tim_wtimoutid = qtimeout(RD(q), tim_timer, q, TIMIOCWAIT); in tim_ioctl_retry()
2609 queue_t *q; in ti_expind_on_rdqueues() local
2611 q = rq; in ti_expind_on_rdqueues()
2616 claimstr(q); in ti_expind_on_rdqueues()
2635 releasestr(q); /* decrement sd_refcnt */ in ti_expind_on_rdqueues()
2643 releasestr(q); in ti_expind_on_rdqueues()
2650 queue_t *q = (queue_t *)q_ptr; in tim_tcap_timer() local
2651 struct tim_tim *tp = (struct tim_tim *)q->q_ptr; in tim_tcap_timer()
2658 tim_tcap_genreply(q, tp); in tim_tcap_timer()
2667 tim_tcap_genreply(queue_t *q, struct tim_tim *tp) in tim_tcap_genreply() argument
2674 ASSERT(tp == (struct tim_tim *)q->q_ptr); in tim_tcap_genreply()
2690 (void) quntimeout(q, tp->tim_tcap_timoutid); in tim_tcap_genreply()
2703 putnext(WR(q), tirmp); in tim_tcap_genreply()
2711 miocnak(q, mp, 0, ENOMEM); in tim_tcap_genreply()
2724 tim_ioctl_send_reply(q, mp, ackmp); in tim_tcap_genreply()
2736 miocnak(q, mp, 0, ENOMEM); in tim_tcap_genreply()
2743 tim_ioctl_send_reply(queue_t *q, mblk_t *ioc_mp, mblk_t *mp) in tim_ioctl_send_reply() argument
2747 ASSERT(q != NULL && ioc_mp != NULL); in tim_ioctl_send_reply()
2776 putnext(RD(q), ioc_mp); in tim_ioctl_send_reply()
2783 tim_send_ioc_error_ack(queue_t *q, struct tim_tim *tp, mblk_t *mp) in tim_send_ioc_error_ack() argument
2796 q = RD(q); in tim_send_ioc_error_ack()
2801 putnext(q, mp); in tim_send_ioc_error_ack()
2806 tim_tcap_genreply(q, tp); in tim_send_ioc_error_ack()
2820 putnext(q, mp); in tim_send_ioc_error_ack()
2843 putnext(q, tp->tim_iocsave); in tim_send_ioc_error_ack()
2858 tim_send_reply(queue_t *q, mblk_t *mp, struct tim_tim *tp, t_scalar_t prim) in tim_send_reply() argument
2860 ASSERT(mp != NULL && q != NULL && tp != NULL); in tim_send_reply()
2861 ASSERT(q == RD(q)); in tim_send_reply()
2867 putnext(q, mp); in tim_send_reply()
2870 tim_ioctl_send_reply(q, tp->tim_iocsave, mp); in tim_send_reply()
2882 tim_answer_ti_sync(queue_t *q, mblk_t *mp, struct tim_tim *tp, in tim_answer_ti_sync() argument
2887 ASSERT(q != NULL && q == WR(q) && ackmp != NULL); in tim_answer_ti_sync()
2902 miocnak(q, mp, 0, EINVAL); in tim_answer_ti_sync()
2910 ti_expind_on_rdqueues(RD(q))) { in tim_answer_ti_sync()
2918 tim_ioctl_send_reply(q, mp, ackmp); in tim_answer_ti_sync()
2930 tim_send_ioctl_tpi_msg(queue_t *q, mblk_t *mp, struct tim_tim *tp, in tim_send_ioctl_tpi_msg() argument
2936 ASSERT(q != NULL && mp != NULL && tp != NULL); in tim_send_ioctl_tpi_msg()
2937 ASSERT(q == WR(q)); in tim_send_ioctl_tpi_msg()
2969 putnext(q, tmp); in tim_send_ioctl_tpi_msg()