From patchwork Fri Jun 23 15:38:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selvin Xavier X-Patchwork-Id: 13290796 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 EC1D5EB64D7 for ; Fri, 23 Jun 2023 15:50:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231159AbjFWPuc (ORCPT ); Fri, 23 Jun 2023 11:50:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232253AbjFWPub (ORCPT ); Fri, 23 Jun 2023 11:50:31 -0400 Received: from mail-il1-x129.google.com (mail-il1-x129.google.com [IPv6:2607:f8b0:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A1BF2122 for ; Fri, 23 Jun 2023 08:50:30 -0700 (PDT) Received: by mail-il1-x129.google.com with SMTP id e9e14a558f8ab-3421fb63796so2860865ab.2 for ; Fri, 23 Jun 2023 08:50:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1687535430; x=1690127430; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=66Ut59bujoSVauUdMGcK3l7xOg4PkodLXo1Sjyx286I=; b=KMaca7tKuEnvfeu9TNFgb8IbB1BtW4lpbj76fdOO4Hjua+u/6RhMO9fclh7tR79swT ZFdXiNAvf1xq8iUvj43FkKeGpe3mblj53uSb6jXf9GMpjYYPz5yUCEfT0mVgFKGFZ0ps 8+wAiAhnjYZcsf/PBF8COM9v+5S7It6d8TPgM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687535430; x=1690127430; 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=66Ut59bujoSVauUdMGcK3l7xOg4PkodLXo1Sjyx286I=; b=kwG6z9ajoEq9aZ2P6+6tTKEAsbAy+mUoL5onKDbhuBgYsDPCP6ALgBFlhI0YezqpUn jQSUPWsfoWjG7g7rSZ1WfrozI6JQEjlGOfhuCElVolYc9EW6PYA+vha01AndZgFofW8e x3rSjWgvdwTbc9LqVGWWildW1gjrRd0Fbjj/zM2BOwlaKZapdUXxzfkU6HPbNldZZmtM OelLSvE1d3cTbeeZt1s8gBAbg6RrOr4qTgYrKFxEFRLRAQVf0zZZwof61J5U4b4R8xaF x/GjW+sH6f71/Cq3eFcWPv72RvEIZPIzu2e01SZhYoO1ZLS7vgj1P8QI+VD1RFKevG8Q DA+w== X-Gm-Message-State: AC+VfDwiYHQC96SO1VbN7HdawFS6SoXgcj9PgyUf4W5ZJRw/MwEwplPe 4JDuvkLDSkL7f12lXKHqji+HfQ== X-Google-Smtp-Source: ACHHUZ7MfYsnrEJkK4pEL8K1mo9e3z1vOJS1ea/C7MRf67kwyRFLUgMTVJNAjnZEZk3nv87tVJKp7Q== X-Received: by 2002:a92:d207:0:b0:33c:5182:6cf1 with SMTP id y7-20020a92d207000000b0033c51826cf1mr18500709ily.27.1687535429845; Fri, 23 Jun 2023 08:50:29 -0700 (PDT) Received: from dhcp-10-192-206-197.iig.avagotech.net.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id z124-20020a636582000000b00553d96d7feesm6637100pgb.35.2023.06.23.08.50.27 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Jun 2023 08:50:29 -0700 (PDT) From: Selvin Xavier To: jgg@ziepe.ca, leon@kernel.org Cc: linux-rdma@vger.kernel.org, andrew.gospodarek@broadcom.com, michael.chan@broadcom.com, Chandramohan Akula , Selvin Xavier Subject: [PATCH for-next 2/7] bnxt_en: Share the bar0 address with the RoCE driver Date: Fri, 23 Jun 2023 08:38:32 -0700 Message-Id: <1687534717-17968-3-git-send-email-selvin.xavier@broadcom.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1687534717-17968-1-git-send-email-selvin.xavier@broadcom.com> References: <1687534717-17968-1-git-send-email-selvin.xavier@broadcom.com> Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org From: Chandramohan Akula Add a parameter in the bnxt_en_dev structure to share the bar0 address with RoCE driver. CC: Michael Chan Signed-off-by: Chandramohan Akula Signed-off-by: Selvin Xavier --- drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c index 852eb44..6ba2b93 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c @@ -345,7 +345,7 @@ static void bnxt_set_edev_info(struct bnxt_en_dev *edev, struct bnxt *bp) edev->hw_ring_stats_size = bp->hw_ring_stats_size; edev->pf_port_id = bp->pf.port_id; edev->en_state = bp->state; - + edev->bar0 = bp->bar0; edev->ulp_tbl->msix_requested = bnxt_get_ulp_msix_num(bp); } diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h b/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h index 80cbc4b..6ff77f0 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h @@ -81,6 +81,7 @@ struct bnxt_en_dev { * mode only. Will be * updated in resume. */ + void __iomem *bar0; }; static inline bool bnxt_ulp_registered(struct bnxt_en_dev *edev)