Lines Matching refs:ap_msg

137 	struct ap_message *ap_msg;  in ap_sm_recv()  local
165 list_for_each_entry(ap_msg, &aq->pendingq, list) { in ap_sm_recv()
166 if (ap_msg->psmid != aq->reply->psmid) in ap_sm_recv()
168 list_del_init(&ap_msg->list); in ap_sm_recv()
171 ap_msg->rc = -EMSGSIZE; in ap_sm_recv()
172 ap_msg->receive(aq, ap_msg, NULL); in ap_sm_recv()
174 ap_msg->receive(aq, ap_msg, aq->reply); in ap_sm_recv()
246 struct ap_message *ap_msg; in ap_sm_write() local
253 ap_msg = list_entry(aq->requestq.next, struct ap_message, list); in ap_sm_write()
255 if (ap_msg->fi.action == AP_FI_ACTION_NQAP_QID_INVAL) { in ap_sm_write()
257 __func__, ap_msg->fi.cmd); in ap_sm_write()
261 status = __ap_send(qid, ap_msg->psmid, in ap_sm_write()
262 ap_msg->msg, ap_msg->len, in ap_sm_write()
263 ap_msg->flags & AP_MSG_FLAG_SPECIAL); in ap_sm_write()
269 list_move_tail(&ap_msg->list, &aq->pendingq); in ap_sm_write()
289 list_del_init(&ap_msg->list); in ap_sm_write()
291 ap_msg->rc = -EINVAL; in ap_sm_write()
292 ap_msg->receive(aq, ap_msg, NULL); in ap_sm_write()
799 int ap_queue_message(struct ap_queue *aq, struct ap_message *ap_msg) in ap_queue_message() argument
804 BUG_ON(!ap_msg->receive); in ap_queue_message()
810 list_add_tail(&ap_msg->list, &aq->requestq); in ap_queue_message()
836 void ap_cancel_message(struct ap_queue *aq, struct ap_message *ap_msg) in ap_cancel_message() argument
841 if (!list_empty(&ap_msg->list)) { in ap_cancel_message()
843 if (tmp->psmid == ap_msg->psmid) { in ap_cancel_message()
849 list_del_init(&ap_msg->list); in ap_cancel_message()
863 struct ap_message *ap_msg, *next; in __ap_flush_queue() local
865 list_for_each_entry_safe(ap_msg, next, &aq->pendingq, list) { in __ap_flush_queue()
866 list_del_init(&ap_msg->list); in __ap_flush_queue()
868 ap_msg->rc = -EAGAIN; in __ap_flush_queue()
869 ap_msg->receive(aq, ap_msg, NULL); in __ap_flush_queue()
871 list_for_each_entry_safe(ap_msg, next, &aq->requestq, list) { in __ap_flush_queue()
872 list_del_init(&ap_msg->list); in __ap_flush_queue()
874 ap_msg->rc = -EAGAIN; in __ap_flush_queue()
875 ap_msg->receive(aq, ap_msg, NULL); in __ap_flush_queue()