From patchwork Wed Sep 15 12:32:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selvin Xavier X-Patchwork-Id: 12496177 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4C63FC433F5 for ; Wed, 15 Sep 2021 12:33:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 326B1610E9 for ; Wed, 15 Sep 2021 12:33:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237393AbhIOMeS (ORCPT ); Wed, 15 Sep 2021 08:34:18 -0400 Received: from relay.smtp-ext.broadcom.com ([192.19.166.228]:46852 "EHLO relay.smtp-ext.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234393AbhIOMeR (ORCPT ); Wed, 15 Sep 2021 08:34:17 -0400 Received: from dhcp-10-192-206-197.iig.avagotech.net.net (dhcp-10-123-156-118.dhcp.broadcom.net [10.123.156.118]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id 8C7CE4E14B; Wed, 15 Sep 2021 05:32:57 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 8C7CE4E14B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1631709178; bh=q3qDrxQl1UP6TC6Bl8mXeeso52CXv3CQXg8kx0DVPqM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vJznnef0pS5nyY+aum/V7f31tAbI8LB7W9hBnmgidI2TAuu+IBvjOy3alUtMFB3W6 WKcY5LIkCjjtTD4RE5T6vjCDgOIFXmF9gK76SINI8F9TURY73azL/IAPUW8F/w4zya 32yrMthWyJ4zZaFXXsulc6treV5x7O2pvbG8FBVg= From: Selvin Xavier To: dledford@redhat.com, jgg@nvidia.com Cc: linux-rdma@vger.kernel.org Subject: [PATCH for-next v2 07/12] RDMA/bnxt_re: Fix query SRQ failure Date: Wed, 15 Sep 2021 05:32:38 -0700 Message-Id: <1631709163-2287-8-git-send-email-selvin.xavier@broadcom.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1631709163-2287-1-git-send-email-selvin.xavier@broadcom.com> References: <1631709163-2287-1-git-send-email-selvin.xavier@broadcom.com> Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Fill the missing parameters for the FW command while querying SRQ. Fixes: 37cb11acf1f7 ("RDMA/bnxt_re: Add SRQ support for Broadcom adapters") Signed-off-by: Selvin Xavier Reviewed-by: Leon Romanovsky --- v1->v2: Removed the duplicate line while populating srq->id drivers/infiniband/hw/bnxt_re/qplib_fp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/bnxt_re/qplib_fp.c b/drivers/infiniband/hw/bnxt_re/qplib_fp.c index 539b1a2..ca88849 100644 --- a/drivers/infiniband/hw/bnxt_re/qplib_fp.c +++ b/drivers/infiniband/hw/bnxt_re/qplib_fp.c @@ -707,12 +707,13 @@ int bnxt_qplib_query_srq(struct bnxt_qplib_res *res, int rc = 0; RCFW_CMD_PREP(req, QUERY_SRQ, cmd_flags); - req.srq_cid = cpu_to_le32(srq->id); /* Configure the request */ sbuf = bnxt_qplib_rcfw_alloc_sbuf(rcfw, sizeof(*sb)); if (!sbuf) return -ENOMEM; + req.resp_size = sizeof(*sb) / BNXT_QPLIB_CMDQE_UNITS; + req.srq_cid = cpu_to_le32(srq->id); sb = sbuf->sb; rc = bnxt_qplib_rcfw_send_message(rcfw, (void *)&req, (void *)&resp, (void *)sbuf, 0);