From patchwork Tue Apr 25 19:29:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selvin Xavier X-Patchwork-Id: 13223699 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 150CEC6FD18 for ; Tue, 25 Apr 2023 19:30:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234885AbjDYTaY (ORCPT ); Tue, 25 Apr 2023 15:30:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235491AbjDYTaX (ORCPT ); Tue, 25 Apr 2023 15:30:23 -0400 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 640DB1B1 for ; Tue, 25 Apr 2023 12:30:22 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1a686260adcso66484225ad.0 for ; Tue, 25 Apr 2023 12:30:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1682451022; x=1685043022; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=AptV0GO7mnNcWMb20tWGvGx7588j2nP8Jjjhfvq9lKs=; b=MgV7DrQ0tvfQFNHGdAGl8dW9XqhRJz7vty9kNA7cUkuzTpkBMDeDQciVSuux+1X7s9 BjoV4v5XMfs2TAnqXL5n0cEfBwcdAO21VVmSdKctFJMMelkTi0njLVlQFEBB0dAsnoVS nnkh9KJ0qsTpKFDIl+Qh2HCNSlKz+Yo0xU4JI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682451022; x=1685043022; 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=AptV0GO7mnNcWMb20tWGvGx7588j2nP8Jjjhfvq9lKs=; b=WoS/koxMlhmIASbwaXFJle+EvOqXua/0vox/TGO6iFXPqBpL7Rd+OZOz2pfgi5/Dhw jA4fg8Q56SbyPtH4KOepVUlYWK3x/tprM11NW90F/RqM8ltd0/lEeRSmPigooOnDzltm hk9mMMAIG8+895kODXW1DjClstNYPDBHzgbF1jqyh3Z9nE4x13SfAhROoWftVSRCKPuQ fKcMCQWAJs5+Ytj7M3w/9KfJPw/8qZJGtfkq4wyXn2YhU8obGbbbz73itv73NbdeGmSV uvRlJcv/dydD+56aDUBwu34HbwSzZDyGapdu0OndV0Wf5mQhSCH6iRVuRwIkFgGDQ4BO kAjQ== X-Gm-Message-State: AAQBX9f5PxDxHnlTzGeT2yDKMzlNhVggsxukSKEqKH5is5fHZOlE7XUi oP4e7krBgaaS2Vm83xXXw3hwSQ== X-Google-Smtp-Source: AKy350Y5dd2AqHTJoZBJkWkR9X9QHMLmI+f8QggfDG1OyDiGOneLKp8RE04/23Mnz3i6T6SSgcvrhg== X-Received: by 2002:a17:902:ab88:b0:1a5:32ef:76aa with SMTP id f8-20020a170902ab8800b001a532ef76aamr17310050plr.22.1682451021842; Tue, 25 Apr 2023 12:30:21 -0700 (PDT) Received: from dhcp-10-192-206-197.iig.avagotech.net.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id w3-20020a170902c78300b001a64ed4621csm8618217pla.182.2023.04.25.12.30.19 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Apr 2023 12:30:21 -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 v2 for-next 4/6] RDMA/bnxt_re: Move the interface version to chip context structure Date: Tue, 25 Apr 2023 12:29:51 -0700 Message-Id: <1682450993-17711-5-git-send-email-selvin.xavier@broadcom.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1682450993-17711-1-git-send-email-selvin.xavier@broadcom.com> References: <1682450993-17711-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;