X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fsfc%2Fbase%2Fefx_check.h;h=85edaef7d7f82ba4b1499202cccf8dfa6a822039;hb=05fa170a2b0760295cb0af687cb1c56c1e6d06ea;hp=22cf8923f0b6d90e7443e5a12268d6e927474a12;hpb=9ee64bd404fc66bf3cd05d382d0e6984342c3c9c;p=dpdk.git diff --git a/drivers/net/sfc/base/efx_check.h b/drivers/net/sfc/base/efx_check.h index 22cf8923f0..85edaef7d7 100644 --- a/drivers/net/sfc/base/efx_check.h +++ b/drivers/net/sfc/base/efx_check.h @@ -1,31 +1,7 @@ -/* - * Copyright (c) 2012-2016 Solarflare Communications Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. +/* SPDX-License-Identifier: BSD-3-Clause * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are - * those of the authors and should not be interpreted as representing official - * policies, either expressed or implied, of the FreeBSD Project. + * Copyright (c) 2012-2018 Solarflare Communications Inc. + * All rights reserved. */ #ifndef _SYS_EFX_CHECK_H @@ -41,14 +17,25 @@ * from client code (and do not reappear in merges from other branches). */ +/* Check family options for EF10 architecture controllers. */ +#define EFX_OPTS_EF10() \ + (EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2) + #ifdef EFSYS_OPT_FALCON # error "FALCON is obsolete and is not supported." #endif +#if EFSYS_OPT_BOOTCFG +/* Support NVRAM based boot config */ +# if !EFSYS_OPT_NVRAM +# error "BOOTCFG requires NVRAM" +# endif +#endif /* EFSYS_OPT_BOOTCFG */ + #if EFSYS_OPT_CHECK_REG /* Verify chip implements accessed registers */ -# if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) -# error "CHECK_REG requires SIENA or HUNTINGTON or MEDFORD" +# if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA) +# error "CHECK_REG requires EF10 arch or SIENA" # endif #endif /* EFSYS_OPT_CHECK_REG */ @@ -61,15 +48,15 @@ #if EFSYS_OPT_DIAG /* Support diagnostic hardware tests */ -# if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) -# error "DIAG requires SIENA or HUNTINGTON or MEDFORD" +# if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA) +# error "DIAG requires EF10 arch or SIENA" # endif #endif /* EFSYS_OPT_DIAG */ #if EFSYS_OPT_EV_PREFETCH /* Support optimized EVQ data access */ -# if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) -# error "EV_PREFETCH requires SIENA or HUNTINGTON or MEDFORD" +# if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA) +# error "EV_PREFETCH requires EF10 arch or SIENA" # endif #endif /* EFSYS_OPT_EV_PREFETCH */ @@ -79,21 +66,21 @@ #if EFSYS_OPT_FILTER /* Support hardware packet filters */ -# if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) -# error "FILTER requires SIENA or HUNTINGTON or MEDFORD" +# if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA) +# error "FILTER requires EF10 arch or SIENA" # endif #endif /* EFSYS_OPT_FILTER */ -#if (EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) +#if EFX_OPTS_EF10() # if !EFSYS_OPT_FILTER -# error "HUNTINGTON or MEDFORD requires FILTER" +# error "EF10 arch requires FILTER" # endif -#endif /* EFSYS_OPT_HUNTINGTON */ +#endif /* EFX_OPTS_EF10() */ #if EFSYS_OPT_LOOPBACK /* Support hardware loopback modes */ -# if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) -# error "LOOPBACK requires SIENA or HUNTINGTON or MEDFORD" +# if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA) +# error "LOOPBACK requires EF10 arch or SIENA" # endif #endif /* EFSYS_OPT_LOOPBACK */ @@ -107,21 +94,21 @@ #if EFSYS_OPT_MAC_STATS /* Support MAC statistics */ -# if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) -# error "MAC_STATS requires SIENA or HUNTINGTON or MEDFORD" +# if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA) +# error "MAC_STATS requires EF10 arch or SIENA" # endif #endif /* EFSYS_OPT_MAC_STATS */ #if EFSYS_OPT_MCDI /* Support management controller messages */ -# if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) -# error "MCDI requires SIENA or HUNTINGTON or MEDFORD" +# if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA) +# error "MCDI requires EF10 arch or SIENA" # endif #endif /* EFSYS_OPT_MCDI */ -#if (EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) +#if (EFX_OPTS_EF10() || EFSYS_OPT_SIENA) # if !EFSYS_OPT_MCDI -# error "SIENA or HUNTINGTON or MEDFORD requires MCDI" +# error "EF10 arch or SIENA requires MCDI" # endif #endif @@ -159,6 +146,20 @@ # error "MON_HUNTINGTON is obsolete (replaced by MON_MCDI)." #endif +#if EFSYS_OPT_MON_STATS +/* Support monitor statistics (voltage/temperature) */ +# if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA) +# error "MON_STATS requires EF10 arch or SIENA" +# endif +#endif /* EFSYS_OPT_MON_STATS */ + +#if EFSYS_OPT_MON_MCDI +/* Support Monitor via mcdi */ +# if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA) +# error "MON_MCDI requires EF10 arch or SIENA" +# endif +#endif /* EFSYS_OPT_MON_MCDI*/ + #if EFSYS_OPT_NAMES /* Support printable names for statistics */ # if !(EFSYS_OPT_LOOPBACK || EFSYS_OPT_MAC_STATS || EFSYS_OPT_MCDI || \ @@ -167,6 +168,20 @@ # endif #endif /* EFSYS_OPT_NAMES */ +#if EFSYS_OPT_NVRAM +/* Support non volatile configuration */ +# if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA) +# error "NVRAM requires EF10 arch or SIENA" +# endif +#endif /* EFSYS_OPT_NVRAM */ + +#if EFSYS_OPT_IMAGE_LAYOUT +/* Support signed image layout handling */ +# if !(EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2) +# error "IMAGE_LAYOUT requires MEDFORD or MEDFORD2" +# endif +#endif /* EFSYS_OPT_IMAGE_LAYOUT */ + #ifdef EFSYS_OPT_NVRAM_FALCON_BOOTROM # error "NVRAM_FALCON_BOOTROM is obsolete and is not supported." #endif @@ -196,8 +211,8 @@ #if EFSYS_OPT_PHY_LED_CONTROL /* Support for PHY LED control */ -# if !EFSYS_OPT_SIENA -# error "PHY_LED_CONTROL requires SIENA" +# if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA) +# error "PHY_LED_CONTROL requires EF10 arch or SIENA" # endif #endif /* EFSYS_OPT_PHY_LED_CONTROL */ @@ -231,8 +246,8 @@ #if EFSYS_OPT_PHY_STATS /* Support PHY statistics */ -# if !EFSYS_OPT_SIENA -# error "PHY_STATS requires SIENA" +# if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) +# error "PHY_STATS requires SIENA or HUNTINGTON or MEDFORD" # endif #endif /* EFSYS_OPT_PHY_STATS */ @@ -242,8 +257,8 @@ #if EFSYS_OPT_QSTATS /* Support EVQ/RXQ/TXQ statistics */ -# if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) -# error "QSTATS requires SIENA or HUNTINGTON or MEDFORD" +# if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA) +# error "QSTATS requires EF10 arch or SIENA" # endif #endif /* EFSYS_OPT_QSTATS */ @@ -253,15 +268,15 @@ #if EFSYS_OPT_RX_SCALE /* Support receive scaling (RSS) */ -# if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) -# error "RX_SCALE requires SIENA or HUNTINGTON or MEDFORD" +# if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA) +# error "RX_SCALE requires EF10 arch or SIENA" # endif #endif /* EFSYS_OPT_RX_SCALE */ #if EFSYS_OPT_RX_SCATTER /* Support receive scatter DMA */ -# if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) -# error "RX_SCATTER requires SIENA or HUNTINGTON or MEDFORD" +# if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA) +# error "RX_SCATTER requires EF10 arch or SIENA" # endif #endif /* EFSYS_OPT_RX_SCATTER */ @@ -269,6 +284,13 @@ # error "STAT_NAME is obsolete (replaced by NAMES)." #endif +#if EFSYS_OPT_VPD +/* Support PCI Vital Product Data (VPD) */ +# if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA) +# error "VPD requires EF10 arch or SIENA" +# endif +#endif /* EFSYS_OPT_VPD */ + #ifdef EFSYS_OPT_WOL # error "WOL is obsolete and is not supported" #endif /* EFSYS_OPT_WOL */ @@ -279,16 +301,61 @@ #if EFSYS_OPT_BIST /* Support BIST */ -# if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) -# error "BIST requires SIENA or HUNTINGTON or MEDFORD" +# if !(EFX_OPTS_EF10() || EFSYS_OPT_SIENA) +# error "BIST requires EF10 arch or SIENA" # endif #endif /* EFSYS_OPT_BIST */ +#if EFSYS_OPT_LICENSING +/* Support MCDI licensing API */ +# if !EFSYS_OPT_MCDI +# error "LICENSING requires MCDI" +# endif +# if !EFSYS_HAS_UINT64 +# error "LICENSING requires UINT64" +# endif +#endif /* EFSYS_OPT_LICENSING */ + #if EFSYS_OPT_ALLOW_UNCONFIGURED_NIC /* Support adapters with missing static config (for factory use only) */ -# if !EFSYS_OPT_MEDFORD -# error "ALLOW_UNCONFIGURED_NIC requires MEDFORD" +# if !(EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2) +# error "ALLOW_UNCONFIGURED_NIC requires MEDFORD or MEDFORD2" # endif #endif /* EFSYS_OPT_ALLOW_UNCONFIGURED_NIC */ +#if EFSYS_OPT_RX_PACKED_STREAM +/* Support packed stream mode */ +# if !EFX_OPTS_EF10() +# error "PACKED_STREAM requires EF10 arch" +# endif +#endif + +#if EFSYS_OPT_RX_ES_SUPER_BUFFER +/* Support equal stride super-buffer mode */ +# if !(EFSYS_OPT_MEDFORD2) +# error "ES_SUPER_BUFFER requires MEDFORD2" +# endif +#endif + +/* Support hardware assistance for tunnels */ +#if EFSYS_OPT_TUNNEL +# if !(EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2) +# error "TUNNEL requires MEDFORD or MEDFORD2" +# endif +#endif /* EFSYS_OPT_TUNNEL */ + +#if EFSYS_OPT_FW_SUBVARIANT_AWARE +/* Advertise that the driver is firmware subvariant aware */ +# if !(EFSYS_OPT_MEDFORD2) +# error "FW_SUBVARIANT_AWARE requires MEDFORD2" +# endif +#endif + +#if EFSYS_OPT_EVB +/* Support enterprise virtual bridging */ +# if !(EFX_OPTS_EF10()) +# error "EVB requires EF10 arch" +# endif +#endif /* EFSYS_OPT_EVB */ + #endif /* _SYS_EFX_CHECK_H */