From patchwork Mon May 15 09:06:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selvin Xavier X-Patchwork-Id: 13241027 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 8A904C7EE2A for ; Mon, 15 May 2023 09:22:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238179AbjEOJWp (ORCPT ); Mon, 15 May 2023 05:22:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239783AbjEOJWT (ORCPT ); Mon, 15 May 2023 05:22:19 -0400 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A00951996 for ; Mon, 15 May 2023 02:18:39 -0700 (PDT) Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-64ac461af60so3703974b3a.3 for ; Mon, 15 May 2023 02:18:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1684142319; x=1686734319; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=TPxfSQpm79212XqOYDuKx+8bSVWSbK4XbINYYxNqMC4=; b=IlBcDSKXnTzxjQDawTbwMa+TnLbCdVv+vjl3v5m5ZCH6XfkBYDER6V0OKNx5OuUKkb shy85UxgmiTcFe+yG620fdVFMiF+caeTPDr/bOO9UTpHs+ok4tIyPKmUlHPndQQzOzZT Z8JNAcfhq2Lg9fVLejJ7RKuLVpboEIya/Ss50= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684142319; x=1686734319; 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=TPxfSQpm79212XqOYDuKx+8bSVWSbK4XbINYYxNqMC4=; b=AgWyF2i4gSFLj9Qdwu7swNPXeJuxVhrFqES8CWdBvR5an9HUVoxxsXLg6GrkG9A9Ge wCBfQDJ8F+rn+Oql1Ob5FzZj+1jU3imame9JL6iRTYUORIOU5C4jw7lZsiz8LqQtx9ow jv0f4x+XjgXKviOcoSWE+rRt0Vxy95ee5h4zoNWJzHRhrlCwPwLMNXxcu/SglmPAMqW2 FYlW8mm6sJ70qO0Icosa3T3kBUY7cv/oNf4VUGc72rHI4KASsWTUN5YGf33XZis3EncF cn3YZ0iCZY0ZZ9yLu78pPwaWvcKSC9AW4oMTTkKh2x0houDO6fjQPT5BihO1fyHHMtrN 1g0Q== X-Gm-Message-State: AC+VfDxEzfBkikCX3cOwrzTtgFnKvSyJFtSVcP2jGIfUvXUbElTvsFth OpTozvIinUmLkPzc8DDyYWo68Q== X-Google-Smtp-Source: ACHHUZ56kmMHyp9CWyBejBHtbI54wb/Dm3MiUT6gX5Z7jt0RdkN/0s5ZL8vR6clAykD0zSyLH7i9jg== X-Received: by 2002:a05:6a20:1455:b0:104:3c82:38c0 with SMTP id a21-20020a056a20145500b001043c8238c0mr16610214pzi.41.1684142319102; Mon, 15 May 2023 02:18:39 -0700 (PDT) Received: from dhcp-10-192-206-197.iig.avagotech.net.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id q7-20020a654947000000b00520f316ebe3sm10402169pgs.62.2023.05.15.02.18.36 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 May 2023 02:18:38 -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 v3 for-next 4/6] RDMA/bnxt_re: Move the interface version to chip context structure Date: Mon, 15 May 2023 02:06:48 -0700 Message-Id: <1684141610-17588-5-git-send-email-selvin.xavier@broadcom.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1684141610-17588-1-git-send-email-selvin.xavier@broadcom.com> References: <1684141610-17588-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 993fb62..873ee75 100644 --- a/drivers/infiniband/hw/bnxt_re/main.c +++ b/drivers/infiniband/hw/bnxt_re/main.c @@ -1087,7 +1087,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;