From patchwork Tue Feb 26 03:18:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Devesh Sharma X-Patchwork-Id: 10829363 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B77D31390 for ; Tue, 26 Feb 2019 03:18:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A19222B939 for ; Tue, 26 Feb 2019 03:18:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 91DA12B952; Tue, 26 Feb 2019 03:18:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2E53C2B939 for ; Tue, 26 Feb 2019 03:18:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726294AbfBZDSV (ORCPT ); Mon, 25 Feb 2019 22:18:21 -0500 Received: from mail-ed1-f65.google.com ([209.85.208.65]:35607 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726233AbfBZDSV (ORCPT ); Mon, 25 Feb 2019 22:18:21 -0500 Received: by mail-ed1-f65.google.com with SMTP id g19so9500625edp.2 for ; Mon, 25 Feb 2019 19:18:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id; bh=c5jKVI4i2qBsfqMjjOxqstd2eUV3M1TY8KtZmDd+lTI=; b=CnNq7l9zAH0le4V0fmH7AL2XvXdfq29CXgFt6t2pe8j4StHDIklDa128otgrM7fk1g a08X9g2zwGxYw1Mpj7Pe7uzP/J1sklribbeC+Axi3x+Ao1zuld7PAwSb+JBvaM23oYgC cyLU/Busz83nWE6p9Topy1rU0VJ4QmQLFyl1k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=c5jKVI4i2qBsfqMjjOxqstd2eUV3M1TY8KtZmDd+lTI=; b=MTfb7LliVgofcuCPVkgH6mivbCSRjoxXmgh8ACOfON/sdctY7qsBhPOMYa2LtXCqDx NfdvO8+riM7K6ZABwAfwTcmCpH1GNvCy23EpVfcw5ZJpVW6tiK2lZ5p9gYVRC+MrJW30 hIQafhh91MmgTicbGzLzufng84CwQ3BL2o4D2eaPHec32ANj1ngxIYxt+U077KGUbS6P akzwUFNya8sDNLkx9O4Psc3RKY+AEgQsXOB80rpXBrOCD7F6tz/wYqBKa6u9HGl4b/XH D4yb5vKnjWgm3uq/dskLqXMeGZZCX3aNLnF6sgXyB8yFmwo/lN8V5BftbXfDdDTQ3Nsj iCXQ== X-Gm-Message-State: AHQUAuYsaLzc97RX+IbtRKDGFocEaLbgFVwpcZ99IVaxnmRuJugo9Ao5 +C06C1yP8adFIsjqAvnYfDBP9Gel+0iqPaVEuuqXaA9D55mAJin78XYAbDyb7z//65Pqwu5wpmx TvjeHRCuq3fZYR8+nLIEMBsvpHUCooMbHS2bEKdh3Rw2ay1gfAnQPQmgYTN+5Llyku2vKPlaX9A YhyTI= X-Google-Smtp-Source: AHgI3Ibha6Brsx6mb48W0wcT1Fj1uRvgaKOl73GMxcsqHva5vm0Nrlp+zshvPQ64H8MgNdq1QswnrQ== X-Received: by 2002:a50:8529:: with SMTP id 38mr17441413edr.161.1551151098894; Mon, 25 Feb 2019 19:18:18 -0800 (PST) Received: from neo00-el73.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id g25sm1983888ejc.55.2019.02.25.19.18.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Feb 2019 19:18:17 -0800 (PST) From: Devesh Sharma To: linux-rdma@vger.kernel.org Cc: dledford@redhat.com, jgg@mellanox.com, Devesh Sharma Subject: [PATCH] bnxt_re: Clean cq for kernel consumers only Date: Mon, 25 Feb 2019 22:18:04 -0500 Message-Id: <1551151085-27022-1-git-send-email-devesh.sharma@broadcom.com> X-Mailer: git-send-email 1.8.3.1 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);