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 3A088A04E1; Tue, 22 Sep 2020 10:50:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1E2011C222; Tue, 22 Sep 2020 10:50:14 +0200 (CEST) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 549C51C1B8 for ; Tue, 22 Sep 2020 10:50:13 +0200 (CEST) Received: from mx1-us1.ppe-hosted.com (unknown [10.110.50.144]) by dispatch1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id CCFD02004F for ; Tue, 22 Sep 2020 08:50:12 +0000 (UTC) Received: from us4-mdac16-52.at1.mdlocal (unknown [10.110.48.101]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id CC785800A4 for ; Tue, 22 Sep 2020 08:50:12 +0000 (UTC) X-Virus-Scanned: Proofpoint Essentials engine Received: from mx1-us1.ppe-hosted.com (unknown [10.110.50.8]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 7392640060 for ; Tue, 22 Sep 2020 08:50:12 +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 3D1634C005C for ; Tue, 22 Sep 2020 08:50:12 +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; Tue, 22 Sep 2020 09:50:09 +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; Tue, 22 Sep 2020 09:50:09 +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 08M8o90H004589 for ; Tue, 22 Sep 2020 09:50:09 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 2ADC31613A9 for ; Tue, 22 Sep 2020 09:50:09 +0100 (BST) From: Andrew Rybchenko To: Date: Tue, 22 Sep 2020 09:48:59 +0100 Message-ID: <1600764594-14752-6-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1600764594-14752-1-git-send-email-arybchenko@solarflare.com> References: <1600764594-14752-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-0.180700-8.000000-10 X-TMASE-MatchedRID: TmvcA8+laq39T2Lkmecl6aiUivh0j2PvhVDnkfzD7uYGmHr1eMxt2UAc 6DyoS2rI5SReHH9+PHjRWKObfh9QPzjRcAvE+/krKL24nyEC+xruo8ooMQqOssz/SxKo9mJ49WX m+yhJKyhYrB2VZVAtYq4gB1o6eCTKhkyiHwT0s7BDbiUnjRcCmGtNZoZ5+7ek90btya4ycSgnOW hZYy8qHW10YyYFr4/Lm7vhclmASkofE8yM4pjsDwtuKBGekqUpnH7sbImOEBTbNq3i50lhFfviM TT6A9CnjE+JQTLMcLCy9kux5mQOnD55Qh8ZuhmcvlMvo78Axb+3e5Hs7sSzjCtFXMMPHSb0ZyEm pj4v3FYvOSq+nxEQtagePGmIEwXO/4UC4n7D3uWJl6tigvYfL0uFvzEYSdV+ X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--0.180700-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.6.1012-25674.003 X-MDID: 1600764612-PeTbAEja2pvK Subject: [dpdk-dev] [PATCH 05/60] common/sfc_efx/base: add Riverhead NIC family 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" Riverhead is the first NIC family of the EF100 architecture. Signed-off-by: Andrew Rybchenko Reviewed-by: Andy Moreton Reviewed-by: Vijay Kumar Srivastava --- drivers/common/sfc_efx/base/efx.h | 7 +++++++ drivers/common/sfc_efx/base/efx_impl.h | 3 +++ drivers/common/sfc_efx/base/efx_nic.c | 14 ++++++++++++++ 3 files changed, 24 insertions(+) diff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h index c1b4876314..2082efe023 100644 --- a/drivers/common/sfc_efx/base/efx.h +++ b/drivers/common/sfc_efx/base/efx.h @@ -55,6 +55,7 @@ typedef enum efx_family_e { EFX_FAMILY_HUNTINGTON, EFX_FAMILY_MEDFORD, EFX_FAMILY_MEDFORD2, + EFX_FAMILY_RIVERHEAD, EFX_FAMILY_NTYPES } efx_family_t; @@ -68,6 +69,7 @@ efx_family( #define EFX_PCI_VENID_SFC 0x1924 +#define EFX_PCI_VENID_XILINX 0x10EE #define EFX_PCI_DEVID_FALCON 0x0710 /* SFC4000 */ @@ -90,6 +92,8 @@ efx_family( #define EFX_PCI_DEVID_MEDFORD2 0x0B03 /* SFC9250 PF */ #define EFX_PCI_DEVID_MEDFORD2_VF 0x1B03 /* SFC9250 VF */ +#define EFX_PCI_DEVID_RIVERHEAD 0x0100 +#define EFX_PCI_DEVID_RIVERHEAD_VF 0x1100 #define EFX_MEM_BAR_SIENA 2 @@ -101,6 +105,9 @@ efx_family( #define EFX_MEM_BAR_MEDFORD2 0 +/* FIXME Fix it when memory bar is fixed in FPGA image. It must be 0. */ +#define EFX_MEM_BAR_RIVERHEAD 2 + /* Error codes */ diff --git a/drivers/common/sfc_efx/base/efx_impl.h b/drivers/common/sfc_efx/base/efx_impl.h index 1ef68e2d3a..898770c1cb 100644 --- a/drivers/common/sfc_efx/base/efx_impl.h +++ b/drivers/common/sfc_efx/base/efx_impl.h @@ -871,6 +871,9 @@ struct efx_nic_s { (_enp)->en_family == EFX_FAMILY_MEDFORD || \ (_enp)->en_family == EFX_FAMILY_HUNTINGTON) +#define EFX_FAMILY_IS_EF100(_enp) \ + ((_enp)->en_family == EFX_FAMILY_RIVERHEAD) + #define EFX_NIC_MAGIC 0x02121996 diff --git a/drivers/common/sfc_efx/base/efx_nic.c b/drivers/common/sfc_efx/base/efx_nic.c index 267d010524..b5e36661c9 100644 --- a/drivers/common/sfc_efx/base/efx_nic.c +++ b/drivers/common/sfc_efx/base/efx_nic.c @@ -85,6 +85,20 @@ efx_family( } } + if (venid == EFX_PCI_VENID_XILINX) { + switch (devid) { +#if EFSYS_OPT_RIVERHEAD + case EFX_PCI_DEVID_RIVERHEAD: + case EFX_PCI_DEVID_RIVERHEAD_VF: + *efp = EFX_FAMILY_RIVERHEAD; + *membarp = EFX_MEM_BAR_RIVERHEAD; + return (0); +#endif /* EFSYS_OPT_RIVERHEAD */ + default: + break; + } + } + *efp = EFX_FAMILY_INVALID; return (ENOTSUP); } -- 2.17.1