Lines Matching refs:cmdq
58 struct bnxt_qplib_cmdq_ctx *cmdq; in __wait_for_resp() local
62 cmdq = &rcfw->cmdq; in __wait_for_resp()
64 rc = wait_event_timeout(cmdq->waitq, in __wait_for_resp()
65 !test_bit(cbit, cmdq->cmdq_bitmap), in __wait_for_resp()
73 struct bnxt_qplib_cmdq_ctx *cmdq; in __block_for_resp() local
76 cmdq = &rcfw->cmdq; in __block_for_resp()
78 if (!test_bit(cbit, cmdq->cmdq_bitmap)) in __block_for_resp()
83 } while (test_bit(cbit, cmdq->cmdq_bitmap) && --count); in __block_for_resp()
91 struct bnxt_qplib_cmdq_ctx *cmdq = &rcfw->cmdq; in __send_message() local
92 struct bnxt_qplib_hwq *hwq = &cmdq->hwq; in __send_message()
105 if (!test_bit(FIRMWARE_INITIALIZED_FLAG, &cmdq->flags) && in __send_message()
114 if (test_bit(FIRMWARE_INITIALIZED_FLAG, &cmdq->flags) && in __send_message()
120 if (test_bit(FIRMWARE_TIMED_OUT, &cmdq->flags)) in __send_message()
134 cookie = cmdq->seq_num & RCFW_MAX_COOKIE_VALUE; in __send_message()
139 set_bit(cbit, cmdq->cmdq_bitmap); in __send_message()
182 cmdq->seq_num++; in __send_message()
185 if (test_bit(FIRMWARE_FIRST_FLAG, &cmdq->flags)) { in __send_message()
192 clear_bit(FIRMWARE_FIRST_FLAG, &cmdq->flags); in __send_message()
197 writel(cmdq_prod, cmdq->cmdq_mbox.prod); in __send_message()
198 writel(RCFW_CMDQ_TRIG_VAL, cmdq->cmdq_mbox.db); in __send_message()
216 if (test_bit(ERR_DEVICE_DETACHED, &rcfw->cmdq.flags)) in bnxt_qplib_rcfw_send_message()
244 set_bit(FIRMWARE_TIMED_OUT, &rcfw->cmdq.flags); in bnxt_qplib_rcfw_send_message()
305 struct bnxt_qplib_hwq *hwq = &rcfw->cmdq.hwq; in bnxt_qplib_process_qp_event()
363 if (!test_and_clear_bit(cbit, rcfw->cmdq.cmdq_bitmap)) in bnxt_qplib_process_qp_event()
370 wake_up(&rcfw->cmdq.waitq); in bnxt_qplib_process_qp_event()
466 clear_bit(FIRMWARE_INITIALIZED_FLAG, &rcfw->cmdq.flags); in bnxt_qplib_deinit_rcfw()
552 set_bit(FIRMWARE_INITIALIZED_FLAG, &rcfw->cmdq.flags); in bnxt_qplib_init_rcfw()
558 bitmap_free(rcfw->cmdq.cmdq_bitmap); in bnxt_qplib_free_rcfw_channel()
561 bnxt_qplib_free_hwq(rcfw->res, &rcfw->cmdq.hwq); in bnxt_qplib_free_rcfw_channel()
573 struct bnxt_qplib_cmdq_ctx *cmdq; in bnxt_qplib_alloc_rcfw_channel() local
577 cmdq = &rcfw->cmdq; in bnxt_qplib_alloc_rcfw_channel()
604 if (bnxt_qplib_alloc_init_hwq(&cmdq->hwq, &hwq_attr)) { in bnxt_qplib_alloc_rcfw_channel()
610 rcfw->crsqe_tbl = kcalloc(cmdq->hwq.max_elements, in bnxt_qplib_alloc_rcfw_channel()
615 cmdq->cmdq_bitmap = bitmap_zalloc(rcfw->cmdq_depth, GFP_KERNEL); in bnxt_qplib_alloc_rcfw_channel()
616 if (!cmdq->cmdq_bitmap) in bnxt_qplib_alloc_rcfw_channel()
655 struct bnxt_qplib_cmdq_ctx *cmdq; in bnxt_qplib_disable_rcfw_channel() local
659 cmdq = &rcfw->cmdq; in bnxt_qplib_disable_rcfw_channel()
663 iounmap(cmdq->cmdq_mbox.reg.bar_reg); in bnxt_qplib_disable_rcfw_channel()
666 indx = find_first_bit(cmdq->cmdq_bitmap, rcfw->cmdq_depth); in bnxt_qplib_disable_rcfw_channel()
671 cmdq->cmdq_mbox.reg.bar_reg = NULL; in bnxt_qplib_disable_rcfw_channel()
713 mbox = &rcfw->cmdq.cmdq_mbox; in bnxt_qplib_map_cmdq_mbox()
776 struct bnxt_qplib_cmdq_ctx *cmdq; in bnxt_qplib_start_rcfw() local
781 cmdq = &rcfw->cmdq; in bnxt_qplib_start_rcfw()
783 mbox = &cmdq->cmdq_mbox; in bnxt_qplib_start_rcfw()
785 init.cmdq_pbl = cpu_to_le64(cmdq->hwq.pbl[PBL_LVL_0].pg_map_arr[0]); in bnxt_qplib_start_rcfw()
790 ((cmdq->hwq.level << in bnxt_qplib_start_rcfw()
803 struct bnxt_qplib_cmdq_ctx *cmdq; in bnxt_qplib_enable_rcfw_channel() local
807 cmdq = &rcfw->cmdq; in bnxt_qplib_enable_rcfw_channel()
812 cmdq->seq_num = 0; in bnxt_qplib_enable_rcfw_channel()
813 set_bit(FIRMWARE_FIRST_FLAG, &cmdq->flags); in bnxt_qplib_enable_rcfw_channel()
814 init_waitqueue_head(&cmdq->waitq); in bnxt_qplib_enable_rcfw_channel()