Lines Matching defs:mp
146 static void consmsioctl(queue_t *q, mblk_t *mp);
380 consmsuwput(q, mp)
382 register mblk_t *mp;
384 struct iocblk *iocbp = (struct iocblk *)mp->b_rptr;
388 switch (mp->b_datap->db_type) {
391 consmsioctl(q, mp);
395 if (*mp->b_rptr & FLUSHW)
397 if (*mp->b_rptr & FLUSHR)
400 consms_mux_disp_data(mp);
405 *mp->b_rptr &= ~FLUSHW;
406 if (*mp->b_rptr & FLUSHR)
407 qreply(q, mp);
409 freemsg(mp);
415 consms_mux_disp_data(mp);
417 freemsg(mp);
423 consms_mux_iocdata(msg, mp);
438 mp->b_datap->db_type = M_ERROR;
439 if (mp->b_cont) {
440 freemsg(mp->b_cont);
441 mp->b_cont = NULL;
443 mp->b_rptr = mp->b_datap->db_base;
444 mp->b_wptr = mp->b_rptr + sizeof (char);
445 *mp->b_rptr = (char)error;
446 qreply(q, mp);
451 consmsioctl(q, mp)
453 register mblk_t *mp;
459 iocp = (struct iocblk *)mp->b_rptr;
466 consms_plink(q, mp);
473 if ((error = consms_punlink(q, mp)) != 0) {
475 miocnak(q, mp, 0, error);
485 miocnak(q, mp, 0, ENOMEM);
490 if (mp->b_cont) {
491 freemsg(mp->b_cont);
493 mp->b_cont = datap;
503 miocnak(q, mp, 0, EINVAL);
506 if ((error = consms_mux_disp_ioctl(q, mp)) != 0)
507 miocnak(q, mp, 0, error);
516 miocack(q, mp, iocp->ioc_count, 0);
527 register mblk_t *mp;
529 while (canput(q->q_next) && (mp = getq(q)) != NULL)
530 putnext(q, mp);
537 consmslrput(q, mp)
539 register mblk_t *mp;
541 struct iocblk *iocbp = (struct iocblk *)mp->b_rptr;
542 struct copyreq *copyreq = (struct copyreq *)mp->b_rptr;
548 switch (mp->b_datap->db_type) {
550 if (*mp->b_rptr & FLUSHW)
552 if (*mp->b_rptr & FLUSHR)
555 putnext(upperqueue, mp); /* pass it through */
560 *mp->b_rptr &= ~FLUSHR;
561 if (*mp->b_rptr & FLUSHW)
562 qreply(q, mp);
564 freemsg(mp);
570 putnext(upperqueue, mp);
572 freemsg(mp);
584 lq->lq_ioc_reply_func(lq, mp);
586 freemsg(mp);
594 consms_mux_ack(msg, mp);
596 freemsg(mp);
604 consms_mux_copyreq(q, msg, mp);
606 freemsg(mp);
613 freemsg(mp); /* anything useful here? */
631 consms_punlink(queue_t *q, mblk_t *mp)
639 linkp = (struct linkblk *)mp->b_cont->b_rptr;
669 consms_plink(queue_t *q, mblk_t *mp)
677 linkp = (struct linkblk *)mp->b_cont->b_rptr;
685 lq->lq_pending_plink = mp;
707 consms_lqs_ack_complete(consms_lq_t *lq, mblk_t *mp)
745 if (!skipped && mp && mp->b_cont &&
746 (mp->b_datap->db_type == M_IOCACK))
748 *(int *)mp->b_cont->b_rptr;
766 if (!skipped && mp && mp->b_cont &&
767 (mp->b_datap->db_type == M_IOCACK))
769 *(int *)mp->b_cont->b_rptr;
919 mblk_t *mp;
938 if ((mp = consms_new_firm_event(
941 putnext(upperqueue, mp);
954 if ((mp = consms_new_firm_event(
957 putnext(upperqueue, mp);
998 * The id of each msg is taken from stream's mp,
1066 consms_mux_ack(consms_msg_t *msg, mblk_t *mp)
1073 if (mp->b_datap->db_type == M_IOCACK) {
1085 msg->msg_ack_mp = mp;
1086 mp = NULL;
1100 ack_mp = mp;
1101 mp = NULL;
1136 if (mp) {
1137 freemsg(mp);
1152 consms_mux_copyreq(queue_t *q, consms_msg_t *msg, mblk_t *mp)
1157 rsp->rsp_mp = mp;
1173 * request with the mp of M_IOCDATA, then put it
1177 consms_mux_disp_iocdata(consms_response_t *rsp, mblk_t *mp)
1180 struct copyresp *copyresp = (struct copyresp *)mp->b_rptr;
1191 down_mp->b_datap->db_type = mp->b_datap->db_type;
1200 if (mp->b_cont != NULL) {
1201 down_mp->b_cont = copymsg(mp->b_cont);
1218 consms_mux_iocdata(consms_msg_t *msg, mblk_t *mp)
1234 copyresp = (struct copyresp *)mp->b_rptr;
1238 msg->msg_request = copymsg(mp);
1250 * in the msg_rsp_list to reply upper layer, the mp
1260 consms_mux_disp_iocdata(tmp, mp);
1269 (void) putq(WR(first->rsp_queue), mp);
1279 consms_mux_max_wheel_report(mblk_t *mp)
1284 if (mp == NULL || mp->b_cont == NULL)
1287 iocp = (struct iocblk *)mp->b_rptr;
1290 (mp->b_datap->db_type == M_COPYOUT)) {
1291 num_wheels = *(int *)mp->b_cont->b_rptr;
1293 *(int *)mp->b_cont->b_rptr =
1307 consms_mux_cache_states(mblk_t *mp)
1314 if (mp == NULL || mp->b_cont == NULL)
1317 iocp = (struct iocblk *)mp->b_rptr;
1320 consms_state.consms_vuid_format = *(int *)mp->b_cont->b_rptr;
1324 parms = (Ms_parms *)mp->b_cont->b_rptr;
1329 sr = (Ms_screen_resolution *)mp->b_cont->b_rptr;
1334 ws = (wheel_state *)mp->b_cont->b_rptr;
1343 * Dispatch ioctl mp (non-transparent and transparent)
1346 * First, create a pending message for this mp, link it into
1352 consms_mux_disp_ioctl(queue_t *q, mblk_t *mp)
1360 iocp = (struct iocblk *)mp->b_rptr;
1363 msg->msg_request = mp;
1369 if ((copy_mp = copymsg(mp)) != NULL) {
1398 * for them. Here we just copy the mp and then
1402 consms_mux_disp_data(mblk_t *mp)
1408 if ((copy_mp = copymsg(mp)) != NULL) {
1413 freemsg(mp);