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

RDMA/qedr: enhance destroy flow for GSI QP

Avoid attempting to release irrelevant (and unused) resources for GSI QP.
Signed-off-by: default avatarRam Amrani <Ram.Amrani@cavium.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent f92faaba
......@@ -993,26 +993,27 @@ int qedr_destroy_cq(struct ib_cq *ibcq)
struct qed_rdma_destroy_cq_out_params oparams;
struct qed_rdma_destroy_cq_in_params iparams;
struct qedr_cq *cq = get_qedr_cq(ibcq);
int rc;
DP_DEBUG(dev, QEDR_MSG_CQ, "destroy cq: cq_id %d", cq->icid);
DP_DEBUG(dev, QEDR_MSG_CQ, "destroy cq %p (icid=%d)\n", cq, cq->icid);
/* GSIs CQs are handled by driver, so they don't exist in the FW */
if (cq->cq_type != QEDR_CQ_TYPE_GSI) {
int rc;
if (cq->cq_type == QEDR_CQ_TYPE_GSI)
goto done;
iparams.icid = cq->icid;
rc = dev->ops->rdma_destroy_cq(dev->rdma_ctx, &iparams,
&oparams);
rc = dev->ops->rdma_destroy_cq(dev->rdma_ctx, &iparams, &oparams);
if (rc)
return rc;
dev->ops->common->chain_free(dev->cdev, &cq->pbl);
}
if (ibcq->uobject && ibcq->uobject->context) {
qedr_free_pbl(dev, &cq->q.pbl_info, cq->q.pbl_tbl);
ib_umem_release(cq->q.umem);
}
done:
kfree(cq);
return 0;
......
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