diff mbox series

bnxt_re: Clean cq for kernel consumers only

Message ID 1551151085-27022-1-git-send-email-devesh.sharma@broadcom.com (mailing list archive)
State Mainlined
Commit 0fca467e81468c61083174ae0639b1ee38de2994
Delegated to: Jason Gunthorpe
Headers show
Series bnxt_re: Clean cq for kernel consumers only | expand

Commit Message

Devesh Sharma Feb. 26, 2019, 3:18 a.m. UTC
Kernel space provider driver should clean the CQs
belonging to kernel space consumers only. The current
implementation is doing reverse of it.

Fixing the same by avoiding the call to __clean_cq
on a kernel qp during destroy.

Fixes: c50866e2853a ("bnxt_re: fix the regression due to changes in alloc_pbl")
Signed-off-by: Devesh Sharma <devesh.sharma@broadcom.com>
---
 drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jason Gunthorpe March 4, 2019, 2:52 p.m. UTC | #1
On Mon, Feb 25, 2019 at 10:18:04PM -0500, Devesh Sharma wrote:
> Kernel space provider driver should clean the CQs
> belonging to kernel space consumers only. The current
> implementation is doing reverse of it.
> 
> Fixing the same by avoiding the call to __clean_cq
> on a kernel qp during destroy.
> 
> Fixes: c50866e2853a ("bnxt_re: fix the regression due to changes in alloc_pbl")
> Signed-off-by: Devesh Sharma <devesh.sharma@broadcom.com>
> ---
>  drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to for-next, thanks

Jason
diff mbox series

Patch

diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
index 2409291..071b2fc 100644
--- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c
+++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
@@ -803,7 +803,7 @@  int bnxt_re_destroy_qp(struct ib_qp *ib_qp)
 		return rc;
 	}
 
-	if (!rdma_is_kernel_res(&qp->ib_qp.res)) {
+	if (rdma_is_kernel_res(&qp->ib_qp.res)) {
 		flags = bnxt_re_lock_cqs(qp);
 		bnxt_qplib_clean_qp(&qp->qplib_qp);
 		bnxt_re_unlock_cqs(qp, flags);