From 47df46afb34e45ec2daa6377e737684d2f1fa244 Mon Sep 17 00:00:00 2001 From: Andrew Rybchenko Date: Thu, 24 Sep 2020 13:11:39 +0100 Subject: [PATCH] common/sfc_efx/base: add efsys option for Riverhead Signed-off-by: Andrew Rybchenko Reviewed-by: Andy Moreton Reviewed-by: Vijay Kumar Srivastava --- drivers/common/sfc_efx/base/efx_check.h | 44 ++++++++++++------------- drivers/common/sfc_efx/efsys.h | 3 ++ 2 files changed, 25 insertions(+), 22 deletions(-) diff --git a/drivers/common/sfc_efx/base/efx_check.h b/drivers/common/sfc_efx/base/efx_check.h index 5a04a69e5f..978321cf67 100644 --- a/drivers/common/sfc_efx/base/efx_check.h +++ b/drivers/common/sfc_efx/base/efx_check.h @@ -47,8 +47,8 @@ #if EFSYS_OPT_CHECK_REG /* Verify chip implements accessed registers */ -# if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA) -# error "CHECK_REG requires EF10 arch or SIENA" +# if !(EFSYS_OPT_RIVERHEAD || EFX_OPTS_EF10() || EFSYS_OPT_SIENA) +# error "CHECK_REG requires RIVERHEAD or EF10 arch or SIENA" # endif #endif /* EFSYS_OPT_CHECK_REG */ @@ -79,21 +79,21 @@ #if EFSYS_OPT_FILTER /* Support hardware packet filters */ -# if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA) -# error "FILTER requires EF10 arch or SIENA" +# if !(EFSYS_OPT_RIVERHEAD || EFX_OPTS_EF10() || EFSYS_OPT_SIENA) +# error "FILTER requires RIVERHEAD or EF10 arch or SIENA" # endif #endif /* EFSYS_OPT_FILTER */ -#if EFX_OPTS_EF10() +#if EFSYS_OPT_RIVERHEAD || EFX_OPTS_EF10() # if !EFSYS_OPT_FILTER -# error "EF10 arch requires FILTER" +# error "RIVERHEAD or EF10 arch requires FILTER" # endif #endif /* EFX_OPTS_EF10() */ #if EFSYS_OPT_LOOPBACK /* Support hardware loopback modes */ -# if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA) -# error "LOOPBACK requires EF10 arch or SIENA" +# if !(EFSYS_OPT_RIVERHEAD || EFX_OPTS_EF10() || EFSYS_OPT_SIENA) +# error "LOOPBACK requires RIVERHEAD or EF10 arch or SIENA" # endif #endif /* EFSYS_OPT_LOOPBACK */ @@ -107,21 +107,21 @@ #if EFSYS_OPT_MAC_STATS /* Support MAC statistics */ -# if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA) -# error "MAC_STATS requires EF10 arch or SIENA" +# if !(EFSYS_OPT_RIVERHEAD || EFX_OPTS_EF10() || EFSYS_OPT_SIENA) +# error "MAC_STATS requires RIVERHEAD or EF10 arch or SIENA" # endif #endif /* EFSYS_OPT_MAC_STATS */ #if EFSYS_OPT_MCDI /* Support management controller messages */ -# if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA) -# error "MCDI requires EF10 arch or SIENA" +# if !(EFSYS_OPT_RIVERHEAD || EFX_OPTS_EF10() || EFSYS_OPT_SIENA) +# error "MCDI requires RIVERHEAD or EF10 arch or SIENA" # endif #endif /* EFSYS_OPT_MCDI */ -#if (EFX_OPTS_EF10() || EFSYS_OPT_SIENA) +#if (EFSYS_OPT_RIVERHEAD || EFX_OPTS_EF10() || EFSYS_OPT_SIENA) # if !EFSYS_OPT_MCDI -# error "EF10 arch or SIENA requires MCDI" +# error "RIVERHEAD or EF10 arch or SIENA requires MCDI" # endif #endif @@ -288,15 +288,15 @@ #if EFSYS_OPT_RX_SCALE /* Support receive scaling (RSS) */ -# if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA) -# error "RX_SCALE requires EF10 arch or SIENA" +# if !(EFSYS_OPT_RIVERHEAD || EFX_OPTS_EF10() || EFSYS_OPT_SIENA) +# error "RX_SCALE requires RIVERHEAD or EF10 arch or SIENA" # endif #endif /* EFSYS_OPT_RX_SCALE */ #if EFSYS_OPT_RX_SCATTER /* Support receive scatter DMA */ -# if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA) -# error "RX_SCATTER requires EF10 arch or SIENA" +# if !(EFSYS_OPT_RIVERHEAD || EFX_OPTS_EF10() || EFSYS_OPT_SIENA) +# error "RX_SCATTER requires RIVERHEAD or EF10 arch or SIENA" # endif #endif /* EFSYS_OPT_RX_SCATTER */ @@ -338,8 +338,8 @@ #if EFSYS_OPT_ALLOW_UNCONFIGURED_NIC /* Support adapters with missing static config (for factory use only) */ -# if !(EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2) -# error "ALLOW_UNCONFIGURED_NIC requires MEDFORD or MEDFORD2" +# if !(EFSYS_OPT_RIVERHEAD || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2) +# error "ALLOW_UNCONFIGURED_NIC requires RIVERHEAD or MEDFORD or MEDFORD2" # endif #endif /* EFSYS_OPT_ALLOW_UNCONFIGURED_NIC */ @@ -359,8 +359,8 @@ /* Support hardware assistance for tunnels */ #if EFSYS_OPT_TUNNEL -# if !(EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2) -# error "TUNNEL requires MEDFORD or MEDFORD2" +# if !(EFSYS_OPT_RIVERHEAD || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2) +# error "TUNNEL requires RIVERHEAD or MEDFORD or MEDFORD2" # endif #endif /* EFSYS_OPT_TUNNEL */ diff --git a/drivers/common/sfc_efx/efsys.h b/drivers/common/sfc_efx/efsys.h index 46b08f9789..1567d91588 100644 --- a/drivers/common/sfc_efx/efsys.h +++ b/drivers/common/sfc_efx/efsys.h @@ -105,6 +105,9 @@ prefetch_read_once(const volatile void *addr) #define EFSYS_OPT_MEDFORD 1 /* Enable SFN2xxx support */ #define EFSYS_OPT_MEDFORD2 1 +/* Disable Riverhead support */ +#define EFSYS_OPT_RIVERHEAD 0 + #ifdef RTE_LIBRTE_SFC_EFX_DEBUG #define EFSYS_OPT_CHECK_REG 1 #else -- 2.20.1