Skip to content

Commit

Permalink
qedr: modify QP state to error when destroying it
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Michal Kalderon <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
  • Loading branch information
Amrani, Ram authored and dledford committed Dec 22, 2016
1 parent d6ebbf2 commit b4c2cc4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/infiniband/hw/qedr/verbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
qp, qp->qp_type);

if (qp->state != (QED_ROCE_QP_STATE_RESET | QED_ROCE_QP_STATE_ERR |
QED_ROCE_QP_STATE_INIT)) {
if ((qp->state != QED_ROCE_QP_STATE_RESET) &&
(qp->state != QED_ROCE_QP_STATE_ERR) &&
(qp->state != QED_ROCE_QP_STATE_INIT)) {

attr.qp_state = IB_QPS_ERR;
attr_mask |= IB_QP_STATE;

Expand Down

0 comments on commit b4c2cc4

Please sign in to comment.