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 kfree(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
578 cmdq = &rcfw->cmdq; in bnxt_qplib_alloc_rcfw_channel()
605 if (bnxt_qplib_alloc_init_hwq(&cmdq->hwq, &hwq_attr)) { in bnxt_qplib_alloc_rcfw_channel()
611 rcfw->crsqe_tbl = kcalloc(cmdq->hwq.max_elements, in bnxt_qplib_alloc_rcfw_channel()
617 cmdq->cmdq_bitmap = kzalloc(bmap_size, GFP_KERNEL); in bnxt_qplib_alloc_rcfw_channel()
618 if (!cmdq->cmdq_bitmap) in bnxt_qplib_alloc_rcfw_channel()
621 cmdq->bmap_size = bmap_size; in bnxt_qplib_alloc_rcfw_channel()
659 struct bnxt_qplib_cmdq_ctx *cmdq; in bnxt_qplib_disable_rcfw_channel() local
663 cmdq = &rcfw->cmdq; in bnxt_qplib_disable_rcfw_channel()
667 iounmap(cmdq->cmdq_mbox.reg.bar_reg); in bnxt_qplib_disable_rcfw_channel()
670 indx = find_first_bit(cmdq->cmdq_bitmap, cmdq->bmap_size); in bnxt_qplib_disable_rcfw_channel()
671 if (indx != cmdq->bmap_size) in bnxt_qplib_disable_rcfw_channel()
675 cmdq->cmdq_mbox.reg.bar_reg = NULL; in bnxt_qplib_disable_rcfw_channel()
717 mbox = &rcfw->cmdq.cmdq_mbox; in bnxt_qplib_map_cmdq_mbox()
780 struct bnxt_qplib_cmdq_ctx *cmdq; in bnxt_qplib_start_rcfw() local
785 cmdq = &rcfw->cmdq; in bnxt_qplib_start_rcfw()
787 mbox = &cmdq->cmdq_mbox; in bnxt_qplib_start_rcfw()
789 init.cmdq_pbl = cpu_to_le64(cmdq->hwq.pbl[PBL_LVL_0].pg_map_arr[0]); in bnxt_qplib_start_rcfw()
794 ((cmdq->hwq.level << in bnxt_qplib_start_rcfw()
807 struct bnxt_qplib_cmdq_ctx *cmdq; in bnxt_qplib_enable_rcfw_channel() local
811 cmdq = &rcfw->cmdq; in bnxt_qplib_enable_rcfw_channel()
816 cmdq->seq_num = 0; in bnxt_qplib_enable_rcfw_channel()
817 set_bit(FIRMWARE_FIRST_FLAG, &cmdq->flags); in bnxt_qplib_enable_rcfw_channel()
818 init_waitqueue_head(&cmdq->waitq); in bnxt_qplib_enable_rcfw_channel()