Lines Matching refs:ap_msg
137 struct ap_message *ap_msg; in ap_sm_recv() local
147 list_for_each_entry(ap_msg, &aq->pendingq, list) { in ap_sm_recv()
148 if (ap_msg->psmid != aq->reply->psmid) in ap_sm_recv()
150 list_del_init(&ap_msg->list); in ap_sm_recv()
152 ap_msg->receive(aq, ap_msg, aq->reply); in ap_sm_recv()
237 struct ap_message *ap_msg; in ap_sm_write() local
242 ap_msg = list_entry(aq->requestq.next, struct ap_message, list); in ap_sm_write()
243 status = __ap_send(aq->qid, ap_msg->psmid, in ap_sm_write()
244 ap_msg->message, ap_msg->length, ap_msg->special); in ap_sm_write()
250 list_move_tail(&ap_msg->list, &aq->pendingq); in ap_sm_write()
266 list_del_init(&ap_msg->list); in ap_sm_write()
268 ap_msg->rc = -EINVAL; in ap_sm_write()
269 ap_msg->receive(aq, ap_msg, NULL); in ap_sm_write()
667 void ap_queue_message(struct ap_queue *aq, struct ap_message *ap_msg) in ap_queue_message() argument
672 BUG_ON(!ap_msg->receive); in ap_queue_message()
676 list_add_tail(&ap_msg->list, &aq->requestq); in ap_queue_message()
696 void ap_cancel_message(struct ap_queue *aq, struct ap_message *ap_msg) in ap_cancel_message() argument
701 if (!list_empty(&ap_msg->list)) { in ap_cancel_message()
703 if (tmp->psmid == ap_msg->psmid) { in ap_cancel_message()
709 list_del_init(&ap_msg->list); in ap_cancel_message()
723 struct ap_message *ap_msg, *next; in __ap_flush_queue() local
725 list_for_each_entry_safe(ap_msg, next, &aq->pendingq, list) { in __ap_flush_queue()
726 list_del_init(&ap_msg->list); in __ap_flush_queue()
728 ap_msg->rc = -EAGAIN; in __ap_flush_queue()
729 ap_msg->receive(aq, ap_msg, NULL); in __ap_flush_queue()
731 list_for_each_entry_safe(ap_msg, next, &aq->requestq, list) { in __ap_flush_queue()
732 list_del_init(&ap_msg->list); in __ap_flush_queue()
734 ap_msg->rc = -EAGAIN; in __ap_flush_queue()
735 ap_msg->receive(aq, ap_msg, NULL); in __ap_flush_queue()