From patchwork Mon Jun 12 09:49:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selvin Xavier X-Patchwork-Id: 13276241 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 AE894C7EE23 for ; Mon, 12 Jun 2023 10:23:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234487AbjFLKXV (ORCPT ); Mon, 12 Jun 2023 06:23:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233750AbjFLKXD (ORCPT ); Mon, 12 Jun 2023 06:23:03 -0400 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD7BB28F90 for ; Mon, 12 Jun 2023 03:02:12 -0700 (PDT) Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-650c8cb68aeso3361718b3a.3 for ; Mon, 12 Jun 2023 03:02:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1686564053; x=1689156053; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=2FdbAZlJVPVrDKBjUmGjlmFeE1tw6NDCui8OmUQopyg=; b=hvWEnIobTnxy+UdJfmwMbP2MAZ6Vyyf+FxcwnIbg4NZVlibJRZX/pH8QpdgT5UOMed GhnlqGUaau4+8IDaPfDZbl3hhsvvdMBO4k8c7UStB/vVTkGD4rNaNKVVzvKikw/4LCIm uqjFKTDpPgwhmOm3kbAAkMgz9B7ATl64jDUJU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686564053; x=1689156053; 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=2FdbAZlJVPVrDKBjUmGjlmFeE1tw6NDCui8OmUQopyg=; b=NetqddRVljY54zdaAJWhhPwANpm//nDAqTXdthS0OBytm8L/LlB6GA8ZRzkD4MOuWU PqWvzUK7A8veVvOw+jNrzi03HriDkUYPJY3HzGLa2TfopCRgDcvlXdBgYYBW8pAnwO6n jKnlKsAuf+WrtPK2MMduj5B1ixokbgHLZ7RVw+P6zgUYqQ9ldsta99CQAY30B/0FXCGm kHD5UgO5aD/4qDm1u6StV7blyaO0lurFwltEPaACIbxYA8mfusvyBwtsVTcpmW5+TahU vUSn48nh4W2KN86LqBjiMhQomFczbMsZnjHAz54fihQqHOg6ZrqB2RnyUuFF2rpPy22p o+WA== X-Gm-Message-State: AC+VfDyNhqR1KiVlwO6wRfin//m1XIYHP6SIo96H7CEFawYM7nF5MHFS znY91FafyowUnYRUvxFL3tZv/g== X-Google-Smtp-Source: ACHHUZ7Kx0Eg/r2dTzFgnkvFOzGSZlJphZDO+HFXRvJHEnNgPkTHqiID5Mxqu906RB5TxzzTaJo3TA== X-Received: by 2002:a17:903:124d:b0:1b0:471c:4c3 with SMTP id u13-20020a170903124d00b001b0471c04c3mr7126554plh.40.1686564053085; Mon, 12 Jun 2023 03:00:53 -0700 (PDT) Received: from dhcp-10-192-206-197.iig.avagotech.net.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id q16-20020a170902dad000b001ae2b94701fsm7792050plx.21.2023.06.12.03.00.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Jun 2023 03:00:52 -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 v5 for-next 5/7] RDMA/bnxt_re: Move the interface version to chip context structure Date: Mon, 12 Jun 2023 02:49:00 -0700 Message-Id: <1686563342-15233-6-git-send-email-selvin.xavier@broadcom.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1686563342-15233-1-git-send-email-selvin.xavier@broadcom.com> References: <1686563342-15233-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 {