Lines Matching refs:comp_wait
51 struct erdma_comp_wait *comp_wait) in put_comp_wait() argument
55 cmdq->wait_pool[comp_wait->ctx_id].cmd_status = ERDMA_CMD_STATUS_INIT; in put_comp_wait()
57 used = __test_and_clear_bit(comp_wait->ctx_id, cmdq->comp_wait_bitmap); in put_comp_wait()
261 struct erdma_comp_wait *comp_wait) in push_cmdq_sqe() argument
266 comp_wait->cmd_status = ERDMA_CMD_STATUS_ISSUED; in push_cmdq_sqe()
267 reinit_completion(&comp_wait->wait_event); in push_cmdq_sqe()
268 comp_wait->sq_pi = cmdq->sq.pi; in push_cmdq_sqe()
277 comp_wait->ctx_id) | in push_cmdq_sqe()
286 struct erdma_comp_wait *comp_wait; in erdma_poll_single_cmd_completion() local
305 comp_wait = &cmdq->wait_pool[ctx_id]; in erdma_poll_single_cmd_completion()
306 if (comp_wait->cmd_status != ERDMA_CMD_STATUS_ISSUED) in erdma_poll_single_cmd_completion()
309 comp_wait->cmd_status = ERDMA_CMD_STATUS_FINISHED; in erdma_poll_single_cmd_completion()
310 comp_wait->comp_status = FIELD_GET(ERDMA_CQE_HDR_SYNDROME_MASK, hdr0); in erdma_poll_single_cmd_completion()
313 be32_to_cpu_array(comp_wait->comp_data, cqe + 2, 4); in erdma_poll_single_cmd_completion()
316 complete(&comp_wait->wait_event); in erdma_poll_single_cmd_completion()
408 struct erdma_comp_wait *comp_wait; in erdma_post_cmd_wait() local
416 comp_wait = get_comp_wait(cmdq); in erdma_post_cmd_wait()
417 if (IS_ERR(comp_wait)) { in erdma_post_cmd_wait()
421 return PTR_ERR(comp_wait); in erdma_post_cmd_wait()
425 push_cmdq_sqe(cmdq, req, req_size, comp_wait); in erdma_post_cmd_wait()
429 ret = erdma_wait_cmd_completion(comp_wait, cmdq, in erdma_post_cmd_wait()
432 ret = erdma_poll_cmd_completion(comp_wait, cmdq, in erdma_post_cmd_wait()
441 if (comp_wait->comp_status) in erdma_post_cmd_wait()
445 *resp0 = *((u64 *)&comp_wait->comp_data[0]); in erdma_post_cmd_wait()
446 *resp1 = *((u64 *)&comp_wait->comp_data[2]); in erdma_post_cmd_wait()
448 put_comp_wait(cmdq, comp_wait); in erdma_post_cmd_wait()