Lines Matching +full:x +full:- +full:rc
1 // SPDX-License-Identifier: GPL-2.0
27 return ap_test_bit(&aq->card->functions, AP_FUNC_EP11) || in ap_q_supports_bind()
28 ap_test_bit(&aq->card->functions, AP_FUNC_ACCEL); in ap_q_supports_bind()
33 return ap_test_bit(&aq->card->functions, AP_FUNC_EP11); in ap_q_supports_assoc()
52 status = ap_aqic(aq->qid, qirqctrl, virt_to_phys(ind)); in ap_queue_enable_irq()
54 return -EPERM; in ap_queue_enable_irq()
63 pr_err("Registering adapter interrupts for AP device %02x.%04x failed\n", in ap_queue_enable_irq()
64 AP_QID_CARD(aq->qid), in ap_queue_enable_irq()
65 AP_QID_QUEUE(aq->qid)); in ap_queue_enable_irq()
66 return -EOPNOTSUPP; in ap_queue_enable_irq()
70 return -EBUSY; in ap_queue_enable_irq()
123 * and the receiver of the msg is informed with a msg rc code in ap_sm_recv()
127 status = ap_dqap(aq->qid, &aq->reply->psmid, in ap_sm_recv()
128 aq->reply->msg, aq->reply->bufsize, in ap_sm_recv()
129 &aq->reply->len, &reslen, &resgr0); in ap_sm_recv()
135 aq->queue_count = max_t(int, 0, aq->queue_count - 1); in ap_sm_recv()
136 if (!status.queue_empty && !aq->queue_count) in ap_sm_recv()
137 aq->queue_count++; in ap_sm_recv()
138 if (aq->queue_count > 0) in ap_sm_recv()
139 mod_timer(&aq->timeout, in ap_sm_recv()
140 jiffies + aq->request_timeout); in ap_sm_recv()
141 list_for_each_entry(ap_msg, &aq->pendingq, list) { in ap_sm_recv()
142 if (ap_msg->psmid != aq->reply->psmid) in ap_sm_recv()
144 list_del_init(&ap_msg->list); in ap_sm_recv()
145 aq->pendingq_count--; in ap_sm_recv()
147 ap_msg->rc = -EMSGSIZE; in ap_sm_recv()
148 ap_msg->receive(aq, ap_msg, NULL); in ap_sm_recv()
150 ap_msg->receive(aq, ap_msg, aq->reply); in ap_sm_recv()
156 AP_DBF_WARN("%s unassociated reply psmid=0x%016lx on 0x%02x.%04x\n", in ap_sm_recv()
157 __func__, aq->reply->psmid, in ap_sm_recv()
158 AP_QID_CARD(aq->qid), AP_QID_QUEUE(aq->qid)); in ap_sm_recv()
162 if (!status.queue_empty || aq->queue_count <= 0) in ap_sm_recv()
165 aq->queue_count = 0; in ap_sm_recv()
166 list_splice_init(&aq->pendingq, &aq->requestq); in ap_sm_recv()
167 aq->requestq_count += aq->pendingq_count; in ap_sm_recv()
168 aq->pendingq_count = 0; in ap_sm_recv()
186 if (!aq->reply) in ap_sm_read()
193 if (aq->queue_count > 0) { in ap_sm_read()
194 aq->sm_state = AP_SM_STATE_WORKING; in ap_sm_read()
197 aq->sm_state = AP_SM_STATE_IDLE; in ap_sm_read()
200 if (aq->queue_count > 0) in ap_sm_read()
201 return aq->interrupt ? in ap_sm_read()
203 aq->sm_state = AP_SM_STATE_IDLE; in ap_sm_read()
206 aq->dev_state = AP_DEV_STATE_ERROR; in ap_sm_read()
207 aq->last_err_rc = status.response_code; in ap_sm_read()
208 AP_DBF_WARN("%s RC 0x%02x on 0x%02x.%04x -> AP_DEV_STATE_ERROR\n", in ap_sm_read()
210 AP_QID_CARD(aq->qid), AP_QID_QUEUE(aq->qid)); in ap_sm_read()
225 ap_qid_t qid = aq->qid; in ap_sm_write()
227 if (aq->requestq_count <= 0) in ap_sm_write()
231 ap_msg = list_entry(aq->requestq.next, struct ap_message, list); in ap_sm_write()
232 status = __ap_send(qid, ap_msg->psmid, in ap_sm_write()
233 ap_msg->msg, ap_msg->len, in ap_sm_write()
234 ap_msg->flags & AP_MSG_FLAG_SPECIAL); in ap_sm_write()
239 aq->queue_count = max_t(int, 1, aq->queue_count + 1); in ap_sm_write()
240 if (aq->queue_count == 1) in ap_sm_write()
241 mod_timer(&aq->timeout, jiffies + aq->request_timeout); in ap_sm_write()
242 list_move_tail(&ap_msg->list, &aq->pendingq); in ap_sm_write()
243 aq->requestq_count--; in ap_sm_write()
244 aq->pendingq_count++; in ap_sm_write()
245 if (aq->queue_count < aq->card->queue_depth) { in ap_sm_write()
246 aq->sm_state = AP_SM_STATE_WORKING; in ap_sm_write()
251 aq->sm_state = AP_SM_STATE_QUEUE_FULL; in ap_sm_write()
252 return aq->interrupt ? in ap_sm_write()
255 aq->sm_state = AP_SM_STATE_RESET_WAIT; in ap_sm_write()
262 list_del_init(&ap_msg->list); in ap_sm_write()
263 aq->requestq_count--; in ap_sm_write()
264 ap_msg->rc = -EINVAL; in ap_sm_write()
265 ap_msg->receive(aq, ap_msg, NULL); in ap_sm_write()
268 aq->dev_state = AP_DEV_STATE_ERROR; in ap_sm_write()
269 aq->last_err_rc = status.response_code; in ap_sm_write()
270 AP_DBF_WARN("%s RC 0x%02x on 0x%02x.%04x -> AP_DEV_STATE_ERROR\n", in ap_sm_write()
272 AP_QID_CARD(aq->qid), AP_QID_QUEUE(aq->qid)); in ap_sm_write()
298 status = ap_rapq(aq->qid, aq->rapq_fbit); in ap_sm_reset()
304 aq->sm_state = AP_SM_STATE_RESET_WAIT; in ap_sm_reset()
305 aq->interrupt = false; in ap_sm_reset()
306 aq->rapq_fbit = 0; in ap_sm_reset()
309 aq->dev_state = AP_DEV_STATE_ERROR; in ap_sm_reset()
310 aq->last_err_rc = status.response_code; in ap_sm_reset()
311 AP_DBF_WARN("%s RC 0x%02x on 0x%02x.%04x -> AP_DEV_STATE_ERROR\n", in ap_sm_reset()
313 AP_QID_CARD(aq->qid), AP_QID_QUEUE(aq->qid)); in ap_sm_reset()
329 if (aq->queue_count > 0 && aq->reply) in ap_sm_reset_wait()
334 status = ap_tapq(aq->qid, NULL); in ap_sm_reset_wait()
340 aq->sm_state = AP_SM_STATE_SETIRQ_WAIT; in ap_sm_reset_wait()
342 aq->sm_state = (aq->queue_count > 0) ? in ap_sm_reset_wait()
352 aq->dev_state = AP_DEV_STATE_ERROR; in ap_sm_reset_wait()
353 aq->last_err_rc = status.response_code; in ap_sm_reset_wait()
354 AP_DBF_WARN("%s RC 0x%02x on 0x%02x.%04x -> AP_DEV_STATE_ERROR\n", in ap_sm_reset_wait()
356 AP_QID_CARD(aq->qid), AP_QID_QUEUE(aq->qid)); in ap_sm_reset_wait()
371 if (aq->queue_count > 0 && aq->reply) in ap_sm_setirq_wait()
376 status = ap_tapq(aq->qid, NULL); in ap_sm_setirq_wait()
380 aq->interrupt = true; in ap_sm_setirq_wait()
381 aq->sm_state = (aq->queue_count > 0) ? in ap_sm_setirq_wait()
387 if (aq->queue_count > 0) in ap_sm_setirq_wait()
393 aq->dev_state = AP_DEV_STATE_ERROR; in ap_sm_setirq_wait()
394 aq->last_err_rc = status.response_code; in ap_sm_setirq_wait()
395 AP_DBF_WARN("%s RC 0x%02x on 0x%02x.%04x -> AP_DEV_STATE_ERROR\n", in ap_sm_setirq_wait()
397 AP_QID_CARD(aq->qid), AP_QID_QUEUE(aq->qid)); in ap_sm_setirq_wait()
412 status = ap_test_queue(aq->qid, 1, &info); in ap_sm_assoc_wait()
415 aq->dev_state = AP_DEV_STATE_ERROR; in ap_sm_assoc_wait()
416 aq->last_err_rc = status.response_code; in ap_sm_assoc_wait()
417 AP_DBF_WARN("%s asynch RC 0x%02x on 0x%02x.%04x -> AP_DEV_STATE_ERROR\n", in ap_sm_assoc_wait()
419 AP_QID_CARD(aq->qid), AP_QID_QUEUE(aq->qid)); in ap_sm_assoc_wait()
423 aq->dev_state = AP_DEV_STATE_ERROR; in ap_sm_assoc_wait()
424 aq->last_err_rc = status.response_code; in ap_sm_assoc_wait()
425 AP_DBF_WARN("%s RC 0x%02x on 0x%02x.%04x -> AP_DEV_STATE_ERROR\n", in ap_sm_assoc_wait()
427 AP_QID_CARD(aq->qid), AP_QID_QUEUE(aq->qid)); in ap_sm_assoc_wait()
435 aq->sm_state = AP_SM_STATE_IDLE; in ap_sm_assoc_wait()
436 AP_DBF_DBG("%s queue 0x%02x.%04x associated with %u\n", in ap_sm_assoc_wait()
437 __func__, AP_QID_CARD(aq->qid), in ap_sm_assoc_wait()
438 AP_QID_QUEUE(aq->qid), aq->assoc_idx); in ap_sm_assoc_wait()
445 aq->assoc_idx = ASSOC_IDX_INVALID; in ap_sm_assoc_wait()
446 aq->dev_state = AP_DEV_STATE_ERROR; in ap_sm_assoc_wait()
447 aq->last_err_rc = status.response_code; in ap_sm_assoc_wait()
448 AP_DBF_WARN("%s bs 0x%02x on 0x%02x.%04x -> AP_DEV_STATE_ERROR\n", in ap_sm_assoc_wait()
450 AP_QID_CARD(aq->qid), AP_QID_QUEUE(aq->qid)); in ap_sm_assoc_wait()
491 if (aq->config && !aq->chkstop && in ap_sm_event()
492 aq->dev_state > AP_DEV_STATE_UNINITIATED) in ap_sm_event()
493 return ap_jumptable[aq->sm_state][event](aq); in ap_sm_event()
518 spin_lock_bh(&aq->lock); in request_count_show()
519 if (aq->dev_state > AP_DEV_STATE_UNINITIATED) { in request_count_show()
520 req_cnt = aq->total_request_count; in request_count_show()
523 spin_unlock_bh(&aq->lock); in request_count_show()
528 return sysfs_emit(buf, "-\n"); in request_count_show()
537 spin_lock_bh(&aq->lock); in request_count_store()
538 aq->total_request_count = 0; in request_count_store()
539 spin_unlock_bh(&aq->lock); in request_count_store()
552 spin_lock_bh(&aq->lock); in requestq_count_show()
553 if (aq->dev_state > AP_DEV_STATE_UNINITIATED) in requestq_count_show()
554 reqq_cnt = aq->requestq_count; in requestq_count_show()
555 spin_unlock_bh(&aq->lock); in requestq_count_show()
567 spin_lock_bh(&aq->lock); in pendingq_count_show()
568 if (aq->dev_state > AP_DEV_STATE_UNINITIATED) in pendingq_count_show()
569 penq_cnt = aq->pendingq_count; in pendingq_count_show()
570 spin_unlock_bh(&aq->lock); in pendingq_count_show()
580 int rc = 0; in reset_show() local
582 spin_lock_bh(&aq->lock); in reset_show()
583 switch (aq->sm_state) { in reset_show()
586 rc = sysfs_emit(buf, "Reset in progress.\n"); in reset_show()
590 rc = sysfs_emit(buf, "Reset Timer armed.\n"); in reset_show()
593 rc = sysfs_emit(buf, "No Reset Timer set.\n"); in reset_show()
595 spin_unlock_bh(&aq->lock); in reset_show()
596 return rc; in reset_show()
605 spin_lock_bh(&aq->lock); in reset_store()
607 aq->sm_state = AP_SM_STATE_RESET_START; in reset_store()
609 spin_unlock_bh(&aq->lock); in reset_store()
611 AP_DBF_INFO("%s reset queue=%02x.%04x triggered by user\n", in reset_store()
612 __func__, AP_QID_CARD(aq->qid), AP_QID_QUEUE(aq->qid)); in reset_store()
623 int rc = 0; in interrupt_show() local
625 spin_lock_bh(&aq->lock); in interrupt_show()
626 if (aq->sm_state == AP_SM_STATE_SETIRQ_WAIT) in interrupt_show()
627 rc = sysfs_emit(buf, "Enable Interrupt pending.\n"); in interrupt_show()
628 else if (aq->interrupt) in interrupt_show()
629 rc = sysfs_emit(buf, "Interrupts enabled.\n"); in interrupt_show()
631 rc = sysfs_emit(buf, "Interrupts disabled.\n"); in interrupt_show()
632 spin_unlock_bh(&aq->lock); in interrupt_show()
633 return rc; in interrupt_show()
642 int rc; in config_show() local
644 spin_lock_bh(&aq->lock); in config_show()
645 rc = sysfs_emit(buf, "%d\n", aq->config ? 1 : 0); in config_show()
646 spin_unlock_bh(&aq->lock); in config_show()
647 return rc; in config_show()
656 int rc; in chkstop_show() local
658 spin_lock_bh(&aq->lock); in chkstop_show()
659 rc = sysfs_emit(buf, "%d\n", aq->chkstop ? 1 : 0); in chkstop_show()
660 spin_unlock_bh(&aq->lock); in chkstop_show()
661 return rc; in chkstop_show()
673 status = ap_test_queue(aq->qid, 1, &info); in ap_functions_show()
675 AP_DBF_DBG("%s RC 0x%02x on tapq(0x%02x.%04x)\n", in ap_functions_show()
677 AP_QID_CARD(aq->qid), AP_QID_QUEUE(aq->qid)); in ap_functions_show()
678 return -EIO; in ap_functions_show()
681 return sysfs_emit(buf, "0x%08X\n", info.fac); in ap_functions_show()
691 int rc = 0; in states_show() local
693 spin_lock_bh(&aq->lock); in states_show()
695 switch (aq->dev_state) { in states_show()
697 rc = sysfs_emit(buf, "UNINITIATED\n"); in states_show()
700 rc = sysfs_emit(buf, "OPERATING"); in states_show()
703 rc = sysfs_emit(buf, "SHUTDOWN"); in states_show()
706 rc = sysfs_emit(buf, "ERROR"); in states_show()
709 rc = sysfs_emit(buf, "UNKNOWN"); in states_show()
712 if (aq->dev_state) { in states_show()
713 switch (aq->sm_state) { in states_show()
715 rc += sysfs_emit_at(buf, rc, " [RESET_START]\n"); in states_show()
718 rc += sysfs_emit_at(buf, rc, " [RESET_WAIT]\n"); in states_show()
721 rc += sysfs_emit_at(buf, rc, " [SETIRQ_WAIT]\n"); in states_show()
724 rc += sysfs_emit_at(buf, rc, " [IDLE]\n"); in states_show()
727 rc += sysfs_emit_at(buf, rc, " [WORKING]\n"); in states_show()
730 rc += sysfs_emit_at(buf, rc, " [FULL]\n"); in states_show()
733 rc += sysfs_emit_at(buf, rc, " [ASSOC_WAIT]\n"); in states_show()
736 rc += sysfs_emit_at(buf, rc, " [UNKNOWN]\n"); in states_show()
739 spin_unlock_bh(&aq->lock); in states_show()
741 return rc; in states_show()
749 int rc; in last_err_rc_show() local
751 spin_lock_bh(&aq->lock); in last_err_rc_show()
752 rc = aq->last_err_rc; in last_err_rc_show()
753 spin_unlock_bh(&aq->lock); in last_err_rc_show()
755 switch (rc) { in last_err_rc_show()
783 return sysfs_emit(buf, "response code %d\n", rc); in last_err_rc_show()
827 return sysfs_emit(buf, "-\n"); in se_bind_show()
829 status = ap_test_queue(aq->qid, 1, &info); in se_bind_show()
831 AP_DBF_DBG("%s RC 0x%02x on tapq(0x%02x.%04x)\n", in se_bind_show()
833 AP_QID_CARD(aq->qid), AP_QID_QUEUE(aq->qid)); in se_bind_show()
834 return -EIO; in se_bind_show()
852 int rc; in se_bind_store() local
855 return -EINVAL; in se_bind_store()
858 rc = kstrtobool(buf, &value); in se_bind_store()
859 if (rc) in se_bind_store()
860 return rc; in se_bind_store()
864 spin_lock_bh(&aq->lock); in se_bind_store()
865 if (aq->sm_state < AP_SM_STATE_IDLE) { in se_bind_store()
866 spin_unlock_bh(&aq->lock); in se_bind_store()
867 return -EBUSY; in se_bind_store()
869 status = ap_bapq(aq->qid); in se_bind_store()
870 spin_unlock_bh(&aq->lock); in se_bind_store()
872 AP_DBF_WARN("%s RC 0x%02x on bapq(0x%02x.%04x)\n", in se_bind_store()
874 AP_QID_CARD(aq->qid), in se_bind_store()
875 AP_QID_QUEUE(aq->qid)); in se_bind_store()
876 return -EIO; in se_bind_store()
880 spin_lock_bh(&aq->lock); in se_bind_store()
882 aq->rapq_fbit = 1; in se_bind_store()
883 aq->assoc_idx = ASSOC_IDX_INVALID; in se_bind_store()
884 aq->sm_state = AP_SM_STATE_RESET_START; in se_bind_store()
886 spin_unlock_bh(&aq->lock); in se_bind_store()
902 return sysfs_emit(buf, "-\n"); in se_associate_show()
904 status = ap_test_queue(aq->qid, 1, &info); in se_associate_show()
906 AP_DBF_DBG("%s RC 0x%02x on tapq(0x%02x.%04x)\n", in se_associate_show()
908 AP_QID_CARD(aq->qid), AP_QID_QUEUE(aq->qid)); in se_associate_show()
909 return -EIO; in se_associate_show()
914 if (aq->assoc_idx == ASSOC_IDX_INVALID) { in se_associate_show()
916 return -EIO; in se_associate_show()
918 return sysfs_emit(buf, "associated %u\n", aq->assoc_idx); in se_associate_show()
920 if (aq->assoc_idx != ASSOC_IDX_INVALID) in se_associate_show()
935 int rc; in se_associate_store() local
938 return -EINVAL; in se_associate_store()
941 rc = kstrtouint(buf, 0, &value); in se_associate_store()
942 if (rc) in se_associate_store()
943 return rc; in se_associate_store()
945 return -EINVAL; in se_associate_store()
947 spin_lock_bh(&aq->lock); in se_associate_store()
950 if (aq->sm_state != AP_SM_STATE_IDLE) { in se_associate_store()
951 spin_unlock_bh(&aq->lock); in se_associate_store()
952 return -EBUSY; in se_associate_store()
956 if (aq->assoc_idx != ASSOC_IDX_INVALID) { in se_associate_store()
957 spin_unlock_bh(&aq->lock); in se_associate_store()
958 return -EINVAL; in se_associate_store()
962 status = ap_aapq(aq->qid, value); in se_associate_store()
966 aq->sm_state = AP_SM_STATE_ASSOC_WAIT; in se_associate_store()
967 aq->assoc_idx = value; in se_associate_store()
969 spin_unlock_bh(&aq->lock); in se_associate_store()
972 spin_unlock_bh(&aq->lock); in se_associate_store()
973 AP_DBF_WARN("%s RC 0x%02x on aapq(0x%02x.%04x)\n", in se_associate_store()
975 AP_QID_CARD(aq->qid), AP_QID_QUEUE(aq->qid)); in se_associate_store()
976 return -EIO; in se_associate_store()
1004 hash_del(&aq->hnode); in ap_queue_device_release()
1017 aq->ap_dev.device.release = ap_queue_device_release; in ap_queue_create()
1018 aq->ap_dev.device.type = &ap_queue_type; in ap_queue_create()
1019 aq->ap_dev.device_type = device_type; in ap_queue_create()
1022 aq->ap_dev.device.groups = ap_queue_dev_sb_attr_groups; in ap_queue_create()
1023 aq->qid = qid; in ap_queue_create()
1024 aq->interrupt = false; in ap_queue_create()
1025 spin_lock_init(&aq->lock); in ap_queue_create()
1026 INIT_LIST_HEAD(&aq->pendingq); in ap_queue_create()
1027 INIT_LIST_HEAD(&aq->requestq); in ap_queue_create()
1028 timer_setup(&aq->timeout, ap_request_timeout, 0); in ap_queue_create()
1035 aq->reply = reply; in ap_queue_init_reply()
1037 spin_lock_bh(&aq->lock); in ap_queue_init_reply()
1039 spin_unlock_bh(&aq->lock); in ap_queue_init_reply()
1050 int rc = 0; in ap_queue_message() local
1052 /* msg needs to have a valid receive-callback */ in ap_queue_message()
1053 BUG_ON(!ap_msg->receive); in ap_queue_message()
1055 spin_lock_bh(&aq->lock); in ap_queue_message()
1058 if (aq->dev_state == AP_DEV_STATE_OPERATING) { in ap_queue_message()
1059 list_add_tail(&ap_msg->list, &aq->requestq); in ap_queue_message()
1060 aq->requestq_count++; in ap_queue_message()
1061 aq->total_request_count++; in ap_queue_message()
1062 atomic64_inc(&aq->card->total_request_count); in ap_queue_message()
1064 rc = -ENODEV; in ap_queue_message()
1070 spin_unlock_bh(&aq->lock); in ap_queue_message()
1072 return rc; in ap_queue_message()
1090 spin_lock_bh(&aq->lock); in ap_cancel_message()
1091 if (!list_empty(&ap_msg->list)) { in ap_cancel_message()
1092 list_for_each_entry(tmp, &aq->pendingq, list) in ap_cancel_message()
1093 if (tmp->psmid == ap_msg->psmid) { in ap_cancel_message()
1094 aq->pendingq_count--; in ap_cancel_message()
1097 aq->requestq_count--; in ap_cancel_message()
1099 list_del_init(&ap_msg->list); in ap_cancel_message()
1101 spin_unlock_bh(&aq->lock); in ap_cancel_message()
1115 list_for_each_entry_safe(ap_msg, next, &aq->pendingq, list) { in __ap_flush_queue()
1116 list_del_init(&ap_msg->list); in __ap_flush_queue()
1117 aq->pendingq_count--; in __ap_flush_queue()
1118 ap_msg->rc = -EAGAIN; in __ap_flush_queue()
1119 ap_msg->receive(aq, ap_msg, NULL); in __ap_flush_queue()
1121 list_for_each_entry_safe(ap_msg, next, &aq->requestq, list) { in __ap_flush_queue()
1122 list_del_init(&ap_msg->list); in __ap_flush_queue()
1123 aq->requestq_count--; in __ap_flush_queue()
1124 ap_msg->rc = -EAGAIN; in __ap_flush_queue()
1125 ap_msg->receive(aq, ap_msg, NULL); in __ap_flush_queue()
1127 aq->queue_count = 0; in __ap_flush_queue()
1132 spin_lock_bh(&aq->lock); in ap_flush_queue()
1134 spin_unlock_bh(&aq->lock); in ap_flush_queue()
1140 spin_lock_bh(&aq->lock); in ap_queue_prepare_remove()
1144 aq->dev_state = AP_DEV_STATE_SHUTDOWN; in ap_queue_prepare_remove()
1145 spin_unlock_bh(&aq->lock); in ap_queue_prepare_remove()
1146 del_timer_sync(&aq->timeout); in ap_queue_prepare_remove()
1157 spin_lock_bh(&aq->lock); in ap_queue_remove()
1158 ap_zapq(aq->qid, 0); in ap_queue_remove()
1159 aq->dev_state = AP_DEV_STATE_UNINITIATED; in ap_queue_remove()
1160 spin_unlock_bh(&aq->lock); in ap_queue_remove()
1165 spin_lock_bh(&aq->lock); in ap_queue_init_state()
1166 aq->dev_state = AP_DEV_STATE_OPERATING; in ap_queue_init_state()
1167 aq->sm_state = AP_SM_STATE_RESET_START; in ap_queue_init_state()
1168 aq->last_err_rc = 0; in ap_queue_init_state()
1169 aq->assoc_idx = ASSOC_IDX_INVALID; in ap_queue_init_state()
1171 spin_unlock_bh(&aq->lock); in ap_queue_init_state()