Lines Matching refs:mqe_ctx
131 return dev->mq.sq.va + (dev->mqe_ctx.tag * sizeof(struct ocrdma_mqe)); in ocrdma_get_mqe_rsp()
598 memset(&dev->mqe_ctx, 0, sizeof(dev->mqe_ctx)); in ocrdma_create_mq()
599 init_waitqueue_head(&dev->mqe_ctx.cmd_wait); in ocrdma_create_mq()
600 mutex_init(&dev->mqe_ctx.lock); in ocrdma_create_mq()
628 mutex_lock(&dev->mqe_ctx.lock); in ocrdma_destroy_mq()
634 mutex_unlock(&dev->mqe_ctx.lock); in ocrdma_destroy_mq()
799 if (dev->mqe_ctx.tag == cqe->tag_lo && dev->mqe_ctx.cmd_done == false) { in ocrdma_process_mcqe()
800 dev->mqe_ctx.cqe_status = (cqe->status & in ocrdma_process_mcqe()
802 dev->mqe_ctx.ext_status = in ocrdma_process_mcqe()
805 dev->mqe_ctx.cmd_done = true; in ocrdma_process_mcqe()
806 wake_up(&dev->mqe_ctx.cmd_wait); in ocrdma_process_mcqe()
809 __func__, cqe->tag_lo, dev->mqe_ctx.tag); in ocrdma_process_mcqe()
946 dev->mqe_ctx.tag = dev->mq.sq.head; in ocrdma_post_mqe()
947 dev->mqe_ctx.cmd_done = false; in ocrdma_post_mqe()
961 status = wait_event_timeout(dev->mqe_ctx.cmd_wait, in ocrdma_wait_mqe_cmpl()
962 (dev->mqe_ctx.cmd_done != false), in ocrdma_wait_mqe_cmpl()
967 dev->mqe_ctx.fw_error_state = true; in ocrdma_wait_mqe_cmpl()
982 mutex_lock(&dev->mqe_ctx.lock); in ocrdma_mbx_cmd()
983 if (dev->mqe_ctx.fw_error_state) in ocrdma_mbx_cmd()
989 cqe_status = dev->mqe_ctx.cqe_status; in ocrdma_mbx_cmd()
990 ext_status = dev->mqe_ctx.ext_status; in ocrdma_mbx_cmd()
1015 mutex_unlock(&dev->mqe_ctx.lock); in ocrdma_mbx_cmd()