Lines Matching refs:attrs
18 switch (qp->attrs.state) { in erdma_qp_llp_close()
27 qp->attrs.state = ERDMA_QP_STATE_IDLE; in erdma_qp_llp_close()
52 struct erdma_qp_attrs *attrs, in erdma_modify_qp_state_to_rts() argument
76 qp->attrs.state = ERDMA_QP_STATE_RTS; in erdma_modify_qp_state_to_rts()
83 req.cfg = FIELD_PREP(ERDMA_CMD_MODIFY_QP_STATE_MASK, qp->attrs.state) | in erdma_modify_qp_state_to_rts()
84 FIELD_PREP(ERDMA_CMD_MODIFY_QP_CC_MASK, qp->attrs.cc) | in erdma_modify_qp_state_to_rts()
95 if (qp->attrs.qp_type == ERDMA_QP_PASSIVE) in erdma_modify_qp_state_to_rts()
96 req.send_nxt += MPA_DEFAULT_HDR_LEN + qp->attrs.pd_len; in erdma_modify_qp_state_to_rts()
103 struct erdma_qp_attrs *attrs, in erdma_modify_qp_state_to_stop() argument
109 qp->attrs.state = attrs->state; in erdma_modify_qp_state_to_stop()
114 req.cfg = FIELD_PREP(ERDMA_CMD_MODIFY_QP_STATE_MASK, attrs->state) | in erdma_modify_qp_state_to_stop()
120 int erdma_modify_qp_internal(struct erdma_qp *qp, struct erdma_qp_attrs *attrs, in erdma_modify_qp_internal() argument
132 switch (qp->attrs.state) { in erdma_modify_qp_internal()
135 if (attrs->state == ERDMA_QP_STATE_RTS) { in erdma_modify_qp_internal()
136 ret = erdma_modify_qp_state_to_rts(qp, attrs, mask); in erdma_modify_qp_internal()
137 } else if (attrs->state == ERDMA_QP_STATE_ERROR) { in erdma_modify_qp_internal()
138 qp->attrs.state = ERDMA_QP_STATE_ERROR; in erdma_modify_qp_internal()
144 ret = erdma_modify_qp_state_to_stop(qp, attrs, mask); in erdma_modify_qp_internal()
150 if (attrs->state == ERDMA_QP_STATE_CLOSING || in erdma_modify_qp_internal()
151 attrs->state == ERDMA_QP_STATE_TERMINATE || in erdma_modify_qp_internal()
152 attrs->state == ERDMA_QP_STATE_ERROR) { in erdma_modify_qp_internal()
153 ret = erdma_modify_qp_state_to_stop(qp, attrs, mask); in erdma_modify_qp_internal()
163 if (attrs->state == ERDMA_QP_STATE_ERROR) in erdma_modify_qp_internal()
164 qp->attrs.state = ERDMA_QP_STATE_ERROR; in erdma_modify_qp_internal()
167 if (attrs->state == ERDMA_QP_STATE_IDLE) { in erdma_modify_qp_internal()
168 qp->attrs.state = ERDMA_QP_STATE_IDLE; in erdma_modify_qp_internal()
169 } else if (attrs->state == ERDMA_QP_STATE_ERROR) { in erdma_modify_qp_internal()
170 ret = erdma_modify_qp_state_to_stop(qp, attrs, mask); in erdma_modify_qp_internal()
171 qp->attrs.state = ERDMA_QP_STATE_ERROR; in erdma_modify_qp_internal()
172 } else if (attrs->state != ERDMA_QP_STATE_CLOSING) { in erdma_modify_qp_internal()
217 data = get_queue_entry(qp->kern_qp.sq_buf, wqe_idx, qp->attrs.sq_size, in fill_inline_data()
242 qp->attrs.sq_size, SQEBB_SHIFT); in fill_inline_data()
261 if (send_wr->num_sge > qp->dev->attrs.max_send_sge) in fill_sgl()
271 qp->attrs.sq_size, SQEBB_SHIFT); in fill_sgl()
289 u32 idx = *pi & (qp->attrs.sq_size - 1); in erdma_push_one_sqe()
301 u32 attrs; in erdma_push_one_sqe() local
304 entry = get_queue_entry(qp->kern_qp.sq_buf, idx, qp->attrs.sq_size, in erdma_push_one_sqe()
366 qp->attrs.sq_size, SQEBB_SHIFT); in erdma_push_one_sqe()
404 attrs = FIELD_PREP(ERDMA_SQE_MR_ACCESS_MASK, mr->access) | in erdma_push_one_sqe()
409 attrs |= FIELD_PREP(ERDMA_SQE_MR_MTT_TYPE_MASK, 0); in erdma_push_one_sqe()
412 qp->attrs.sq_size, SQEBB_SHIFT), in erdma_push_one_sqe()
417 attrs |= FIELD_PREP(ERDMA_SQE_MR_MTT_TYPE_MASK, 1); in erdma_push_one_sqe()
421 regmr_sge->attrs = cpu_to_le32(attrs); in erdma_push_one_sqe()
448 qp->attrs.sq_size, SQEBB_SHIFT); in erdma_push_one_sqe()
515 if ((u16)(sq_pi - qp->kern_qp.sq_ci) >= qp->attrs.sq_size) { in erdma_post_send()
545 qp->attrs.rq_size, RQE_SHIFT); in erdma_post_recv_one()
563 qp->kern_qp.rwr_tbl[qp->kern_qp.rq_pi & (qp->attrs.rq_size - 1)] = in erdma_post_recv_one()