Lines Matching defs:msgq
93 bfa_wc_down(&cmdq->msgq->init_wc);
195 if (!bfa_nw_ioc_mbox_queue(cmdq->msgq->ioc, &cmdq->dbell_mb,
294 if (!bfa_nw_ioc_mbox_queue(cmdq->msgq->ioc, &cmdq->copy_mb,
301 bfa_msgq_cmdq_attach(struct bfa_msgq_cmdq *cmdq, struct bfa_msgq *msgq)
305 cmdq->msgq = msgq;
356 bfa_wc_down(&rspq->msgq->init_wc);
403 if (!bfa_nw_ioc_is_disabled(rspq->msgq->ioc))
451 if (!bfa_nw_ioc_mbox_queue(rspq->msgq->ioc, &rspq->dbell_mb,
489 bfa_msgq_rspq_attach(struct bfa_msgq_rspq *rspq, struct bfa_msgq *msgq)
492 rspq->msgq = msgq;
497 bfa_msgq_init_rsp(struct bfa_msgq *msgq,
500 bfa_fsm_send_event(&msgq->cmdq, CMDQ_E_INIT_RESP);
501 bfa_fsm_send_event(&msgq->rspq, RSPQ_E_INIT_RESP);
507 struct bfa_msgq *msgq = (struct bfa_msgq *)arg;
509 (struct bfi_msgq_cfg_req *)&msgq->init_mb.msg[0];
515 bfa_dma_be_addr_set(msgq_cfg->cmdq.addr, msgq->cmdq.addr.pa);
516 msgq_cfg->cmdq.q_depth = htons(msgq->cmdq.depth);
517 bfa_dma_be_addr_set(msgq_cfg->rspq.addr, msgq->rspq.addr.pa);
518 msgq_cfg->rspq.q_depth = htons(msgq->rspq.depth);
520 bfa_nw_ioc_mbox_queue(msgq->ioc, &msgq->init_mb, NULL, NULL);
526 struct bfa_msgq *msgq = (struct bfa_msgq *)cbarg;
530 bfa_msgq_init_rsp(msgq, msg);
534 bfa_msgq_rspq_pi_update(&msgq->rspq, msg);
538 bfa_msgq_cmdq_ci_update(&msgq->cmdq, msg);
542 bfa_msgq_cmdq_copy_req(&msgq->cmdq, msg);
553 struct bfa_msgq *msgq = (struct bfa_msgq *)cbarg;
557 bfa_wc_init(&msgq->init_wc, bfa_msgq_init, msgq);
558 bfa_wc_up(&msgq->init_wc);
559 bfa_fsm_send_event(&msgq->cmdq, CMDQ_E_START);
560 bfa_wc_up(&msgq->init_wc);
561 bfa_fsm_send_event(&msgq->rspq, RSPQ_E_START);
562 bfa_wc_wait(&msgq->init_wc);
566 bfa_fsm_send_event(&msgq->cmdq, CMDQ_E_STOP);
567 bfa_fsm_send_event(&msgq->rspq, RSPQ_E_STOP);
571 bfa_fsm_send_event(&msgq->cmdq, CMDQ_E_FAIL);
572 bfa_fsm_send_event(&msgq->rspq, RSPQ_E_FAIL);
588 bfa_msgq_memclaim(struct bfa_msgq *msgq, u8 *kva, u64 pa)
590 msgq->cmdq.addr.kva = kva;
591 msgq->cmdq.addr.pa = pa;
596 msgq->rspq.addr.kva = kva;
597 msgq->rspq.addr.pa = pa;
601 bfa_msgq_attach(struct bfa_msgq *msgq, struct bfa_ioc *ioc)
603 msgq->ioc = ioc;
605 bfa_msgq_cmdq_attach(&msgq->cmdq, msgq);
606 bfa_msgq_rspq_attach(&msgq->rspq, msgq);
608 bfa_nw_ioc_mbox_regisr(msgq->ioc, BFI_MC_MSGQ, bfa_msgq_isr, msgq);
609 bfa_ioc_notify_init(&msgq->ioc_notify, bfa_msgq_notify, msgq);
610 bfa_nw_ioc_notify_register(msgq->ioc, &msgq->ioc_notify);
614 bfa_msgq_regisr(struct bfa_msgq *msgq, enum bfi_mclass mc,
617 msgq->rspq.rsphdlr[mc].cbfn = cbfn;
618 msgq->rspq.rsphdlr[mc].cbarg = cbarg;
622 bfa_msgq_cmd_post(struct bfa_msgq *msgq, struct bfa_msgq_cmd_entry *cmd)
625 BFA_MSGQ_FREE_CNT(&msgq->cmdq)) {
626 __cmd_copy(&msgq->cmdq, cmd);
628 bfa_fsm_send_event(&msgq->cmdq, CMDQ_E_POST);
630 list_add_tail(&cmd->qe, &msgq->cmdq.pending_q);
635 bfa_msgq_rsp_copy(struct bfa_msgq *msgq, u8 *buf, size_t buf_len)
637 struct bfa_msgq_rspq *rspq = &msgq->rspq;