From patchwork Mon Jul 17 05:53:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selvin Xavier X-Patchwork-Id: 13315198 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 5B4F2EB64DC for ; Mon, 17 Jul 2023 06:08:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231297AbjGQGII (ORCPT ); Mon, 17 Jul 2023 02:08:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231362AbjGQGHv (ORCPT ); Mon, 17 Jul 2023 02:07:51 -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 4457E1BDA for ; Sun, 16 Jul 2023 23:07:22 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1b8c81e36c0so24269505ad.0 for ; Sun, 16 Jul 2023 23:07:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1689574027; x=1692166027; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=yEwZ/ooqaoePfi3x7c5ER5AbOsIbQBRRB8vCKUyLunE=; b=gBlYeC3cVlIyy5egmMa3DZxml9qMPvddzeT8s9ZGTbUwyiu8hFrUqzGjXwtbdsjJkf 0wDTqSGaVB7bj/nyzv3fSfAea3ej21pQqRqkrskiavCbhnL0n3jVsK6Xb9UhA2WyXSCz 67MqEpqcRMh/z6gnH35g0wWonL+HKCicx8QDQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689574027; x=1692166027; 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=yEwZ/ooqaoePfi3x7c5ER5AbOsIbQBRRB8vCKUyLunE=; b=Xaxdl7+P0QHm9/PlcVcYwoOpge7KkNLWJ8vEUSxmtGuWPN7zhdDX96LfAK2QKReEyK 2SZZ7Uo8L8ltW0ofos//RIpTH7/PAZcnAS0Vdbwts60cAXaH4umiMURfRsZ0RBPXIL1G jf02mG1zXJDeDoZ9ij3ldT90FfaG0/rDm7jCKISKnX631IOxZmFbRPEJzxPF7t6HYuNU VevcFtXPwltZwqTY+eX4oLh5fkeHmiuxeP0b9fp0V/D9EH6r1zdvnNAaM9fOoeYqRqvv GZ6bRmLxkdBA2fgzBYJAw5ZLvANpJiF7EWfJ/PouzwmWhZokwm4eSF9w9G6QaERQDtEU spvA== X-Gm-Message-State: ABy/qLYTkfYUbYu5QOW91Gu6Di547dMowonn7KKQejJd1rFbxa/jvHu4 TwxCZ+KXzlRxaGlzp04gC/RmXf6aPyT5XhPguu8= X-Google-Smtp-Source: APBJJlFtUDzGto6rJ50tBvaZ246HTqjtoYdff/1sC/3bhZRoMvCeGl2bDCecFqLw9M3PPY1TWH2ZrA== X-Received: by 2002:a17:902:aa05:b0:1b6:93e8:3ddb with SMTP id be5-20020a170902aa0500b001b693e83ddbmr9567648plb.6.1689574027572; Sun, 16 Jul 2023 23:07:07 -0700 (PDT) Received: from dhcp-10-192-206-197.iig.avagotech.net.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id q17-20020a170902789100b001b9da7b6bc3sm11849632pll.184.2023.07.16.23.07.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 16 Jul 2023 23:07:06 -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 v2 2/7] bnxt_en: Share the bar0 address with the RoCE driver Date: Sun, 16 Jul 2023 22:53:09 -0700 Message-Id: <1689573194-27687-3-git-send-email-selvin.xavier@broadcom.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1689573194-27687-1-git-send-email-selvin.xavier@broadcom.com> References: <1689573194-27687-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)