diff options
author | Ismail, Mustafa <mustafa.ismail@intel.com> | 2016-04-18 10:33:00 -0500 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-04-28 16:32:53 -0400 |
commit | df35630af33fb8f470b6739eced5a2ad3a7cb55d (patch) | |
tree | c3c914d0b63ec59b185059f76ec05ce604206e4a /drivers/infiniband/hw | |
parent | 996abf0a52e62e844b50344157060bb6ec609bc7 (diff) | |
download | op-kernel-dev-df35630af33fb8f470b6739eced5a2ad3a7cb55d.zip op-kernel-dev-df35630af33fb8f470b6739eced5a2ad3a7cb55d.tar.gz |
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: Mustafa Ismail <mustafa.ismail@intel.com>
Signed-off-by: Faisal Latif <faisal.latif@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r-- | drivers/infiniband/hw/i40iw/i40iw_verbs.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/infiniband/hw/i40iw/i40iw_verbs.c b/drivers/infiniband/hw/i40iw/i40iw_verbs.c index aa29736..d3b4b58 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_verbs.c +++ b/drivers/infiniband/hw/i40iw/i40iw_verbs.c @@ -2049,10 +2049,12 @@ static int i40iw_poll_cq(struct ib_cq *ibcq, } entry->wc_flags = 0; entry->wr_id = cq_poll_info.wr_id; - if (!cq_poll_info.error) - entry->status = IB_WC_SUCCESS; - else + if (cq_poll_info.error) { 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) { case I40IW_OP_TYPE_RDMA_WRITE: @@ -2076,8 +2078,6 @@ static int i40iw_poll_cq(struct ib_cq *ibcq, break; } - entry->vendor_err = - cq_poll_info.major_err << 16 | cq_poll_info.minor_err; entry->ex.imm_data = 0; qp = (struct i40iw_sc_qp *)cq_poll_info.qp_handle; entry->qp = (struct ib_qp *)qp->back_qp; |