From patchwork Wed Jul 19 05:02:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selvin Xavier X-Patchwork-Id: 13318147 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 66B08C0015E for ; Wed, 19 Jul 2023 05:17:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229454AbjGSFRX (ORCPT ); Wed, 19 Jul 2023 01:17:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230063AbjGSFRW (ORCPT ); Wed, 19 Jul 2023 01:17:22 -0400 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E8DF1BF3 for ; Tue, 18 Jul 2023 22:17:21 -0700 (PDT) Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1b8b318c5cfso51478565ad.1 for ; Tue, 18 Jul 2023 22:17:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1689743841; x=1692335841; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=Jr8OTTTb/MRT26Be5IIEhl6v64ZsBGtwxI7/5nEM/WU=; b=dkRSQr+pPmuKSxhMAIipTt7w2KHXFKbLsKyvYLMmqCc526PBUfnROmLSYDD40ZeDHR q2deVoFI7ZbIeqctEgHjqtAR71ZiZQriDRCPFEukpnaHI8I0xH/AP+o1TzTHEiWacvga KI505OirkYnbJ8sDoQgdUziFk2FlAhG9fc9pw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689743841; x=1692335841; 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=Jr8OTTTb/MRT26Be5IIEhl6v64ZsBGtwxI7/5nEM/WU=; b=PvqsnsDOcCLcb/PL4LIrhWVtUiZUQbOlf61/2DeiQSGh9zKFTwKrGcuE4QqjxnN7od azuEBmAcKqqpFgzgVBDnYnKrgLrfpt0wutvAMtYtrFA/x2p+IATQm7inJdMTPksS1mGT f4LOzXVFwlpOZfkbJtDPoWme9SAsIVNi0Ie5On6uw+wwmbVa8BkNFVY9+Qp7jULwidEN hRLuNqX4QhnyqN/bvvTvXDqeMmdFFygEz7l8qDK80oc4NVyMdyvDwtBHlvfYVrwDSQe2 Xk4fky8zbxDx4q2JiVJ812qzq0U4GHnSccDAZcrG+o/CuTtDUNU7HkTdE/olV6MvH+Pr AnpQ== X-Gm-Message-State: ABy/qLYWF1Qoa7KVFqR3YiYbO4N01NFLmMFosM2VfWzEpdMIcAumGTZ1 qgjoRU7xcGtHSmwvET5FLcRB1Q== X-Google-Smtp-Source: APBJJlGCb03zparj8fX0ADIGYfkL+DHPKdLI1G4BJWO+YPhp6qPbgefoJYAlKLy4uS2gXDgHn0QrTQ== X-Received: by 2002:a17:902:d504:b0:1b6:76ee:190b with SMTP id b4-20020a170902d50400b001b676ee190bmr20269648plg.35.1689743840996; Tue, 18 Jul 2023 22:17:20 -0700 (PDT) Received: from dhcp-10-192-206-197.iig.avagotech.net.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id t8-20020a170902e84800b001b9de8fbd78sm2816424plg.212.2023.07.18.22.17.17 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Jul 2023 22:17:19 -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 v3 2/7] bnxt_en: Share the bar0 address with the RoCE driver Date: Tue, 18 Jul 2023 22:02:52 -0700 Message-Id: <1689742977-9128-3-git-send-email-selvin.xavier@broadcom.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1689742977-9128-1-git-send-email-selvin.xavier@broadcom.com> References: <1689742977-9128-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)