From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 31E06A04B1; Thu, 24 Sep 2020 14:21:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 547831E4A4; Thu, 24 Sep 2020 14:14:10 +0200 (CEST) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id 8610D1DE30 for ; Thu, 24 Sep 2020 14:13:04 +0200 (CEST) Received: from mx1-us1.ppe-hosted.com (unknown [10.7.65.64]) by dispatch1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id 0AD2B600E9 for ; Thu, 24 Sep 2020 12:13:04 +0000 (UTC) Received: from us4-mdac16-14.ut7.mdlocal (unknown [10.7.65.238]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id 0A16D2009B for ; Thu, 24 Sep 2020 12:13:04 +0000 (UTC) X-Virus-Scanned: Proofpoint Essentials engine Received: from mx1-us1.ppe-hosted.com (unknown [10.7.65.200]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 8A10522004D for ; Thu, 24 Sep 2020 12:13:03 +0000 (UTC) Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 40F9980005E for ; Thu, 24 Sep 2020 12:13:03 +0000 (UTC) Received: from ukex01.SolarFlarecom.com (10.17.10.4) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 24 Sep 2020 13:12:48 +0100 Received: from opal.uk.solarflarecom.com (10.17.10.1) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 24 Sep 2020 13:12:48 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (ukv-loginhost.uk.solarflarecom.com [10.17.10.39]) by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id 08OCCmB6026065; Thu, 24 Sep 2020 13:12:48 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 0F8691613A9; Thu, 24 Sep 2020 13:12:48 +0100 (BST) From: Andrew Rybchenko To: CC: Igor Romanov Date: Thu, 24 Sep 2020 13:12:20 +0100 Message-ID: <1600949555-28043-46-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1600949555-28043-1-git-send-email-arybchenko@solarflare.com> References: <1600764594-14752-1-git-send-email-arybchenko@solarflare.com> <1600949555-28043-1-git-send-email-arybchenko@solarflare.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.6.1012-25674.003 X-TM-AS-Result: No-4.875500-8.000000-10 X-TMASE-MatchedRID: KP2/buXOXzXqxxOtz59fBHpRh12Siy9r16H/l0XwR9tfUCHPns/+PqCy Cv1TMi2KgYJxxuPzH9PYK5KAJJoJStuIUha4/hqvqJSK+HSPY++FUOeR/MPu5k6HzpG59emMaUX s6FguVy2XMwBedsCNafjqo53XHXOqkOYrLvfr5/JFo9d++f6R6tUtYzexhQ5/myiLZetSf8mfop 0ytGwvXiq2rl3dzGQ1FUHAAiI0UCyqfDPKgVvbjA6SBcnC3Gnl4e1xWjVTN6KrTpqpZZyNc6wuq qOySjxw9AcOXrN9ZsYbICtyCQHkkBdAmEzS2ZY1fpEMdO/7kr84oGQUCbwY5Q+g7mdwjo656FtD ZCmYBJ3KTLw/lNgw8g== X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--4.875500-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.6.1012-25674.003 X-MDID: 1600949584-R3MKnwHZ6-7x Subject: [dpdk-dev] [PATCH v3 45/60] common/sfc_efx/base: add efsys API to find a memory BAR X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Igor Romanov Function control window lookup needs memory BARs handles to search Xilinx capabilities tables. Define an API to get a memory BAR handle by a PCIe device handle and BAR index. Signed-off-by: Igor Romanov Signed-off-by: Andrew Rybchenko Reviewed-by: Andy Moreton --- drivers/common/sfc_efx/base/rhead_pci.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/common/sfc_efx/base/rhead_pci.c b/drivers/common/sfc_efx/base/rhead_pci.c index f8e372b79c..47e89cf8a2 100644 --- a/drivers/common/sfc_efx/base/rhead_pci.c +++ b/drivers/common/sfc_efx/base/rhead_pci.c @@ -20,6 +20,7 @@ rhead_pci_nic_membar_lookup( size_t pci_capa_offset = 0; boolean_t bar_found = B_FALSE; efx_rc_t rc = ENOENT; + efsys_bar_t xil_eb; /* * SF-119689-TC Riverhead Host Interface section 4.2.2. describes @@ -50,13 +51,19 @@ rhead_pci_nic_membar_lookup( } xilinx_tbl_found = B_TRUE; + + EFSYS_PCI_FIND_MEM_BAR(espcp, xilinx_tbl_bar, &xil_eb, &rc); + if (rc != 0) + goto fail2; } if (bar_found == B_FALSE) - goto fail2; + goto fail3; return (0); +fail3: + EFSYS_PROBE(fail3); fail2: EFSYS_PROBE(fail2); fail1: -- 2.17.1