From patchwork Mon Apr 10 11:11:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selvin Xavier X-Patchwork-Id: 13206289 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21E8DC76196 for ; Mon, 10 Apr 2023 11:12:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229574AbjDJLMy (ORCPT ); Mon, 10 Apr 2023 07:12:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229630AbjDJLMx (ORCPT ); Mon, 10 Apr 2023 07:12:53 -0400 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A60616EBA for ; Mon, 10 Apr 2023 04:12:22 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id h24so4531717plr.1 for ; Mon, 10 Apr 2023 04:12:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1681125141; x=1683717141; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=rERWVlH2oqJhl6VajN1qQPMeTnfYi50gc4RBi7tEzyk=; b=LbkfV16Ey8iyHITseEL5GMpoa48kYlyc4nFoFDnh24mlX28rGXKzGBuj/m2Zw9M982 LIbunZPl6AbXus/xHwml31IpLaDG9VUy/J93nIhVI9K/Z6oWHVHdNNS6228yfmXLnsDl ZisXKj9FAV7Ytve0cpeimN9ovlkZnK5fzbGVk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681125141; x=1683717141; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rERWVlH2oqJhl6VajN1qQPMeTnfYi50gc4RBi7tEzyk=; b=pb33fKqb9HJ+5AcOoyVRgKUNlT4KM/SHRohsd5V0PcyA7QG5puFqCcM0aGo2t3qeUi EORV+7OG/sk2WoQiqIOA/aWiulmNOswPbupu8gRf7UUKblleM89P0goPwRMs1fHL/2zB AISU45zJTLxrDVZKa1FeDESYvxbDleMcFGvwPIMQKOwW9mNZ+UFLmOeBxEJCYQNV4N8J ZNyxcQrmgu3Q+bf3zSTISqjLB+xy/3GN6/G3bRRTfvzTCo4LS4LTMdtRQpWZBVADwn5D r5FYHiSy7c1kkJ1OwFdGVnL4ZdrzvHoM1bgyivuccu7IjpiMwKgfcnv0P2yP3RO3XeCE PQ7Q== X-Gm-Message-State: AAQBX9c566yqK/IWp2WbP9oCYUpvLhClQlEnOKR9aDyv8sBCTEYrV0uw b/NidYB/RQi//SyuDzwu1BtVmA== X-Google-Smtp-Source: AKy350Z/qsNn5lxoQofDZ76GDcma5Ob5zGAiBAzpAkiEBEvXVscYEjzIpmXkmbzAeFsgNKiPBC/BWw== X-Received: by 2002:a05:6a20:1dd:b0:d7:4339:fac6 with SMTP id 29-20020a056a2001dd00b000d74339fac6mr10857919pzz.5.1681125140733; Mon, 10 Apr 2023 04:12:20 -0700 (PDT) Received: from dhcp-10-192-206-197.iig.avagotech.net.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id y10-20020aa7854a000000b005ded4825201sm7641875pfn.112.2023.04.10.04.12.17 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Apr 2023 04:12:19 -0700 (PDT) From: Selvin Xavier To: jgg@ziepe.ca, leon@kernel.org Cc: linux-rdma@vger.kernel.org, andrew.gospodarek@broadcom.com, Selvin Xavier Subject: [PATCH for-next 4/6] RDMA/bnxt_re: Move the interface version to chip context structure Date: Mon, 10 Apr 2023 04:11:53 -0700 Message-Id: <1681125115-7127-5-git-send-email-selvin.xavier@broadcom.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1681125115-7127-1-git-send-email-selvin.xavier@broadcom.com> References: <1681125115-7127-1-git-send-email-selvin.xavier@broadcom.com> Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org FW interface version check is required for multiple features. Moving the interface version to chip context structure. Signed-off-by: Selvin Xavier --- drivers/infiniband/hw/bnxt_re/main.c | 2 +- drivers/infiniband/hw/bnxt_re/qplib_rcfw.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c index 1b69198..ecaa69cb 100644 --- a/drivers/infiniband/hw/bnxt_re/main.c +++ b/drivers/infiniband/hw/bnxt_re/main.c @@ -1094,7 +1094,7 @@ static void bnxt_re_query_hwrm_intf_version(struct bnxt_re_dev *rdev) rc); return; } - rdev->qplib_ctx.hwrm_intf_ver = + rdev->chip_ctx->hwrm_intf_ver = (u64)le16_to_cpu(resp.hwrm_intf_major) << 48 | (u64)le16_to_cpu(resp.hwrm_intf_minor) << 32 | (u64)le16_to_cpu(resp.hwrm_intf_build) << 16 | diff --git a/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c b/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c index de90691..f610199 100644 --- a/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c +++ b/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c @@ -593,7 +593,7 @@ int bnxt_qplib_alloc_rcfw_channel(struct bnxt_qplib_res *res, "HW channel CREQ allocation failed\n"); goto fail; } - if (ctx->hwrm_intf_ver < HWRM_VERSION_RCFW_CMDQ_DEPTH_CHECK) + if (res->cctx->hwrm_intf_ver < HWRM_VERSION_RCFW_CMDQ_DEPTH_CHECK) rcfw->cmdq_depth = BNXT_QPLIB_CMDQE_MAX_CNT_256; else rcfw->cmdq_depth = BNXT_QPLIB_CMDQE_MAX_CNT_8192;