From patchwork Thu Jun 1 11:10:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selvin Xavier X-Patchwork-Id: 13263549 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 71111C77B7A for ; Thu, 1 Jun 2023 11:22:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232640AbjFALWn (ORCPT ); Thu, 1 Jun 2023 07:22:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232584AbjFALWi (ORCPT ); Thu, 1 Jun 2023 07:22:38 -0400 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47862123 for ; Thu, 1 Jun 2023 04:22:35 -0700 (PDT) Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1b0201d9a9eso6301825ad.0 for ; Thu, 01 Jun 2023 04:22:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1685618555; x=1688210555; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=sYtVzJzU0QDrbJ9uG7pG5tnsDvoTBS4UHWF1V4iUfD0=; b=Ba8TtddKDvGY8FDWwKTpUWaMKwQrBOPVuKDOAxp9SSQ35LxLKz32MGuImn78sejtxI SexlVMNTo8cnEP6ACB5uFTBiHgsxHAmaTloUOxzXEtvEAqKiiAPKQBmTvbFjYoHLVGcY xPt+yIp0+Y5cI/alc4a7H4ueuZSjCVFl0eUWk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685618555; x=1688210555; 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=sYtVzJzU0QDrbJ9uG7pG5tnsDvoTBS4UHWF1V4iUfD0=; b=hIrZb7gkBJkvaV+ejRVI7/RvLWuW/qEJZ3oLEek4sd4rY1Ljyk/q8V5pdS9fhokIAQ eN+oHcy/iQzz05A76brR6jipYlARvUaA9LuXQ6ioIBhBAHth7z0Rtm8Fg7EYvmdN45sW L/Rz5ctk3q9ujAKatwF5fOBNelkZikbL4A4eo7jgPLJzZkj7DjTkQldSzkVUxpAMzhFD X/SmA2THXB6pxFc8RTyru0hfBQ5WZ/64O+h+qaMgaXElLV+UO2DaHQ0cs12kh5LwNo3J hG88kdmTuvtysLlPCvEhpOdl8tTMVMdfUZZszc7UDO52wifqQWaBZ4MA0KUXyJ7liqYr caoA== X-Gm-Message-State: AC+VfDyKeJHSX4yzSIZSe8QzDgtP/jWoIzNHcIMP2bkbUxNyiK8CVLwG +qHbKlA6bNOj+TznaxcM6h/bCQ== X-Google-Smtp-Source: ACHHUZ56IN93zN0Ret+rjhhnFWBOEWDRFdee6ArMXxuDHx5aA/1QfrXwEbWoEBuCbale+5muVxOOBg== X-Received: by 2002:a17:902:c94f:b0:1af:b5af:367b with SMTP id i15-20020a170902c94f00b001afb5af367bmr1829082pla.29.1685618554718; Thu, 01 Jun 2023 04:22:34 -0700 (PDT) Received: from dhcp-10-192-206-197.iig.avagotech.net.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id n3-20020a170902e54300b001ac55a5e5eesm3216496plf.121.2023.06.01.04.22.32 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Jun 2023 04:22:34 -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 v4 for-next 4/6] RDMA/bnxt_re: Move the interface version to chip context structure Date: Thu, 1 Jun 2023 04:10:35 -0700 Message-Id: <1685617837-15725-5-git-send-email-selvin.xavier@broadcom.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1685617837-15725-1-git-send-email-selvin.xavier@broadcom.com> References: <1685617837-15725-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 da99f69..a5a5a2d 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 688eaa0..63e1fac 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;