提交 df35630a 编写于 作者: I Ismail, Mustafa 提交者: Doug Ledford

RDMA/i40iw: Set vendor_err only if there is an actual error

Add a check for cq_poll_info.error before setting vendor_err
instead of always setting it.
Signed-off-by: NMustafa Ismail <mustafa.ismail@intel.com>
Signed-off-by: NFaisal Latif <faisal.latif@intel.com>
Signed-off-by: NDoug Ledford <dledford@redhat.com>
上级 996abf0a
...@@ -2049,10 +2049,12 @@ static int i40iw_poll_cq(struct ib_cq *ibcq, ...@@ -2049,10 +2049,12 @@ static int i40iw_poll_cq(struct ib_cq *ibcq,
} }
entry->wc_flags = 0; entry->wc_flags = 0;
entry->wr_id = cq_poll_info.wr_id; entry->wr_id = cq_poll_info.wr_id;
if (!cq_poll_info.error) if (cq_poll_info.error) {
entry->status = IB_WC_SUCCESS;
else
entry->status = IB_WC_WR_FLUSH_ERR; entry->status = IB_WC_WR_FLUSH_ERR;
entry->vendor_err = cq_poll_info.major_err << 16 | cq_poll_info.minor_err;
} else {
entry->status = IB_WC_SUCCESS;
}
switch (cq_poll_info.op_type) { switch (cq_poll_info.op_type) {
case I40IW_OP_TYPE_RDMA_WRITE: case I40IW_OP_TYPE_RDMA_WRITE:
...@@ -2076,8 +2078,6 @@ static int i40iw_poll_cq(struct ib_cq *ibcq, ...@@ -2076,8 +2078,6 @@ static int i40iw_poll_cq(struct ib_cq *ibcq,
break; break;
} }
entry->vendor_err =
cq_poll_info.major_err << 16 | cq_poll_info.minor_err;
entry->ex.imm_data = 0; entry->ex.imm_data = 0;
qp = (struct i40iw_sc_qp *)cq_poll_info.qp_handle; qp = (struct i40iw_sc_qp *)cq_poll_info.qp_handle;
entry->qp = (struct ib_qp *)qp->back_qp; entry->qp = (struct ib_qp *)qp->back_qp;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册