Commit b4c2cc48 authored by Amrani, Ram's avatar Amrani, Ram Committed by Doug Ledford

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: default avatarRam Amrani <Ram.Amrani@cavium.com>
Reviewed-by: default avatarMichal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent d6ebbf29
...@@ -2078,8 +2078,10 @@ int qedr_destroy_qp(struct ib_qp *ibqp) ...@@ -2078,8 +2078,10 @@ int qedr_destroy_qp(struct ib_qp *ibqp)
DP_DEBUG(dev, QEDR_MSG_QP, "destroy qp: destroying %p, qp type=%d\n", DP_DEBUG(dev, QEDR_MSG_QP, "destroy qp: destroying %p, qp type=%d\n",
qp, qp->qp_type); qp, qp->qp_type);
if (qp->state != (QED_ROCE_QP_STATE_RESET | QED_ROCE_QP_STATE_ERR | if ((qp->state != QED_ROCE_QP_STATE_RESET) &&
QED_ROCE_QP_STATE_INIT)) { (qp->state != QED_ROCE_QP_STATE_ERR) &&
(qp->state != QED_ROCE_QP_STATE_INIT)) {
attr.qp_state = IB_QPS_ERR; attr.qp_state = IB_QPS_ERR;
attr_mask |= IB_QP_STATE; attr_mask |= IB_QP_STATE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment