diff options
author | Amrani, Ram <Ram.Amrani@cavium.com> | 2016-12-22 07:40:36 -0500 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-12-22 11:36:12 -0500 |
commit | b4c2cc48aa0be767281669bff9f230e81ef27c56 (patch) | |
tree | 15927b27895e77f25f50237b793c443db21f3582 /drivers/infiniband | |
parent | d6ebbf29c3015bdccef388a860ac4ef6772531f8 (diff) |
qedr: modify QP state to error when destroying it
Current code didn't modify the QP state to error because it queried the
QP state as a bitmap while it isn't. So the code never got executed.
This patch fixes this and queries for each QP state respectively and not
at once via a bitmask.
Signed-off-by: Ram Amrani <Ram.Amrani@cavium.com>
Reviewed-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/qedr/verbs.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c index 5d1980dd6c48..0237ff986829 100644 --- a/drivers/infiniband/hw/qedr/verbs.c +++ b/drivers/infiniband/hw/qedr/verbs.c | |||
@@ -2078,8 +2078,10 @@ int qedr_destroy_qp(struct ib_qp *ibqp) | |||
2078 | DP_DEBUG(dev, QEDR_MSG_QP, "destroy qp: destroying %p, qp type=%d\n", | 2078 | DP_DEBUG(dev, QEDR_MSG_QP, "destroy qp: destroying %p, qp type=%d\n", |
2079 | qp, qp->qp_type); | 2079 | qp, qp->qp_type); |
2080 | 2080 | ||
2081 | if (qp->state != (QED_ROCE_QP_STATE_RESET | QED_ROCE_QP_STATE_ERR | | 2081 | if ((qp->state != QED_ROCE_QP_STATE_RESET) && |
2082 | QED_ROCE_QP_STATE_INIT)) { | 2082 | (qp->state != QED_ROCE_QP_STATE_ERR) && |
2083 | (qp->state != QED_ROCE_QP_STATE_INIT)) { | ||
2084 | |||
2083 | attr.qp_state = IB_QPS_ERR; | 2085 | attr.qp_state = IB_QPS_ERR; |
2084 | attr_mask |= IB_QP_STATE; | 2086 | attr_mask |= IB_QP_STATE; |
2085 | 2087 | ||