From patchwork Tue Jun 13 18:12:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selvin Xavier X-Patchwork-Id: 13279146 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 27630EB64D7 for ; Tue, 13 Jun 2023 18:24:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235556AbjFMSYS (ORCPT ); Tue, 13 Jun 2023 14:24:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238374AbjFMSYR (ORCPT ); Tue, 13 Jun 2023 14:24:17 -0400 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60A7510CB for ; Tue, 13 Jun 2023 11:24:15 -0700 (PDT) Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1b3af7e3925so23313395ad.3 for ; Tue, 13 Jun 2023 11:24:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1686680655; x=1689272655; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=pOQHvFQiqgk41v+XyFLL6f6rACbk5ln5ImD3XJMFWY4=; b=WIEFNOn9znNorDPOi9zqREkf9hj+prsc/5rb3ORi7BnvkDobNy4dbbKTIHy1ndRYzA zDqFOn+OX+iMIkDQcaNVo+/fuQSfC1Q5cE476rxQowgA+5keUTVT/Fss+0gFD6YOxPGC nAF0H8XRNsdaPPoDaXnQ4CP/J7ErLEHa7ZcVU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686680655; x=1689272655; 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=pOQHvFQiqgk41v+XyFLL6f6rACbk5ln5ImD3XJMFWY4=; b=NW5vNZmsyc+IUK/fUJ9WO72x6MMx2vSSZxO86BCKQgaZPHw/IBchl+rvNblvRH85+i lkAWOsjzGPWTUwFpRDZha4lsm549FZtem2os6DaLezCcxDxESnT3eqYJclURCrMkd93G 7sUuUmSwjCO2ALDNAecxwS4jGJqtYWZkwB3/VcXADzZAD+4PfGq3VH8W7E4q6MOFjOda MGVWtzLBZJkLVNfGueaMLQs3ao7KrkKthMlFSk57dLfHwSBU9sn7KCxHpkx2ZOGDd+rj 6X3gZwof3Tdh926jgqXpYSDucFB8tKt/nQSJiPvAhcNa3q6qf6i1Z7NRB7/XnPqC6Ok3 QbTw== X-Gm-Message-State: AC+VfDxFFbUbI9q3x2JBqMpm78KnaHZx3odmI1pY4y9gcQfeUqxQIHf0 gBwMRiJZYWV8P9J8mUwBfPxMiQ== X-Google-Smtp-Source: ACHHUZ5pAZZGm7PKKCNzOSd5SH7VDcGSr5EmyRcC3jqqg3Vxyo/MmUqMy7fL8qcdewYZoWk8rTof1Q== X-Received: by 2002:a17:902:9f87:b0:1b3:b3c5:1d1f with SMTP id g7-20020a1709029f8700b001b3b3c51d1fmr8815237plq.8.1686680654853; Tue, 13 Jun 2023 11:24:14 -0700 (PDT) Received: from dhcp-10-192-206-197.iig.avagotech.net.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id iw21-20020a170903045500b001b3fb909f73sm285493plb.112.2023.06.13.11.24.12 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Jun 2023 11:24:13 -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 v6 for-next 5/7] RDMA/bnxt_re: Move the interface version to chip context structure Date: Tue, 13 Jun 2023 11:12:21 -0700 Message-Id: <1686679943-17117-6-git-send-email-selvin.xavier@broadcom.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1686679943-17117-1-git-send-email-selvin.xavier@broadcom.com> References: <1686679943-17117-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_res.h | 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 247f724..f8b4265 100644 --- a/drivers/infiniband/hw/bnxt_re/main.c +++ b/drivers/infiniband/hw/bnxt_re/main.c @@ -1078,7 +1078,7 @@ static void bnxt_re_query_hwrm_intf_version(struct bnxt_re_dev *rdev) } cctx = rdev->chip_ctx; - rdev->qplib_ctx.hwrm_intf_ver = + cctx->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_res.h b/drivers/infiniband/hw/bnxt_re/qplib_res.h index 77f0b84..070451a 100644 --- a/drivers/infiniband/hw/bnxt_re/qplib_res.h +++ b/drivers/infiniband/hw/bnxt_re/qplib_res.h @@ -57,6 +57,7 @@ struct bnxt_qplib_chip_ctx { u16 hw_stats_size; u16 hwrm_cmd_max_timeout; struct bnxt_qplib_drv_modes modes; + u64 hwrm_intf_ver; }; #define PTR_CNT_PER_PG (PAGE_SIZE / sizeof(void *)) @@ -242,7 +243,6 @@ struct bnxt_qplib_ctx { struct bnxt_qplib_tqm_ctx tqm_ctx; struct bnxt_qplib_stats stats; struct bnxt_qplib_vf_res vf_res; - u64 hwrm_intf_ver; }; struct bnxt_qplib_res {