Skip to content

Commit d507d29

Browse files
Kalesh APrleon
authored andcommitted
RDMA/bnxt_re: Don't fail destroy QP and cleanup debugfs earlier
Change bnxt_re_destroy_qp to always return 0 and don't fail in case of error during destroy. In addition, delete debugfs QP to earlier stage. Fixes: d7d5476 ("RDMA/bnxt_re: Add debugfs hook in the driver") Reviewed-by: Kashyap Desai <[email protected]> Signed-off-by: Kalesh AP <[email protected]> Signed-off-by: Selvin Xavier <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
1 parent 064c224 commit d507d29

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

drivers/infiniband/hw/bnxt_re/ib_verbs.c

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -967,13 +967,13 @@ int bnxt_re_destroy_qp(struct ib_qp *ib_qp, struct ib_udata *udata)
967967
unsigned int flags;
968968
int rc;
969969

970+
bnxt_re_debug_rem_qpinfo(rdev, qp);
971+
970972
bnxt_qplib_flush_cqn_wq(&qp->qplib_qp);
971973

972974
rc = bnxt_qplib_destroy_qp(&rdev->qplib_res, &qp->qplib_qp);
973-
if (rc) {
975+
if (rc)
974976
ibdev_err(&rdev->ibdev, "Failed to destroy HW QP");
975-
return rc;
976-
}
977977

978978
if (rdma_is_kernel_res(&qp->ib_qp.res)) {
979979
flags = bnxt_re_lock_cqs(qp);
@@ -983,11 +983,8 @@ int bnxt_re_destroy_qp(struct ib_qp *ib_qp, struct ib_udata *udata)
983983

984984
bnxt_qplib_free_qp_res(&rdev->qplib_res, &qp->qplib_qp);
985985

986-
if (ib_qp->qp_type == IB_QPT_GSI && rdev->gsi_ctx.gsi_sqp) {
987-
rc = bnxt_re_destroy_gsi_sqp(qp);
988-
if (rc)
989-
return rc;
990-
}
986+
if (ib_qp->qp_type == IB_QPT_GSI && rdev->gsi_ctx.gsi_sqp)
987+
bnxt_re_destroy_gsi_sqp(qp);
991988

992989
mutex_lock(&rdev->qp_lock);
993990
list_del(&qp->list);
@@ -998,8 +995,6 @@ int bnxt_re_destroy_qp(struct ib_qp *ib_qp, struct ib_udata *udata)
998995
else if (qp->qplib_qp.type == CMDQ_CREATE_QP_TYPE_UD)
999996
atomic_dec(&rdev->stats.res.ud_qp_count);
1000997

1001-
bnxt_re_debug_rem_qpinfo(rdev, qp);
1002-
1003998
ib_umem_release(qp->rumem);
1004999
ib_umem_release(qp->sumem);
10051000

0 commit comments

Comments
 (0)