xref: /freebsd/sys/dev/sfxge/common/efx_check.h (revision 95ee2897e98f5d444f26ed2334cc7c439f9c16c6)
13c838a9fSAndrew Rybchenko /*-
2929c7febSAndrew Rybchenko  * Copyright (c) 2012-2016 Solarflare Communications Inc.
33c838a9fSAndrew Rybchenko  * All rights reserved.
43c838a9fSAndrew Rybchenko  *
53c838a9fSAndrew Rybchenko  * Redistribution and use in source and binary forms, with or without
63c838a9fSAndrew Rybchenko  * modification, are permitted provided that the following conditions are met:
73c838a9fSAndrew Rybchenko  *
83c838a9fSAndrew Rybchenko  * 1. Redistributions of source code must retain the above copyright notice,
93c838a9fSAndrew Rybchenko  *    this list of conditions and the following disclaimer.
103c838a9fSAndrew Rybchenko  * 2. Redistributions in binary form must reproduce the above copyright notice,
113c838a9fSAndrew Rybchenko  *    this list of conditions and the following disclaimer in the documentation
123c838a9fSAndrew Rybchenko  *    and/or other materials provided with the distribution.
133c838a9fSAndrew Rybchenko  *
143c838a9fSAndrew Rybchenko  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
153c838a9fSAndrew Rybchenko  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
163c838a9fSAndrew Rybchenko  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
173c838a9fSAndrew Rybchenko  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
183c838a9fSAndrew Rybchenko  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
193c838a9fSAndrew Rybchenko  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
203c838a9fSAndrew Rybchenko  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
213c838a9fSAndrew Rybchenko  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
223c838a9fSAndrew Rybchenko  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
233c838a9fSAndrew Rybchenko  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
243c838a9fSAndrew Rybchenko  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
253c838a9fSAndrew Rybchenko  *
263c838a9fSAndrew Rybchenko  * The views and conclusions contained in the software and documentation are
273c838a9fSAndrew Rybchenko  * those of the authors and should not be interpreted as representing official
283c838a9fSAndrew Rybchenko  * policies, either expressed or implied, of the FreeBSD Project.
293c838a9fSAndrew Rybchenko  */
303c838a9fSAndrew Rybchenko 
313c838a9fSAndrew Rybchenko #ifndef _SYS_EFX_CHECK_H
323c838a9fSAndrew Rybchenko #define	_SYS_EFX_CHECK_H
333c838a9fSAndrew Rybchenko 
343c838a9fSAndrew Rybchenko #include "efsys.h"
353c838a9fSAndrew Rybchenko 
363c838a9fSAndrew Rybchenko /*
373c838a9fSAndrew Rybchenko  * Check that the efsys.h header in client code has a valid combination of
383c838a9fSAndrew Rybchenko  * EFSYS_OPT_xxx options.
393c838a9fSAndrew Rybchenko  *
403c838a9fSAndrew Rybchenko  * NOTE: Keep checks for obsolete options here to ensure that they are removed
413c838a9fSAndrew Rybchenko  * from client code (and do not reappear in merges from other branches).
423c838a9fSAndrew Rybchenko  */
433c838a9fSAndrew Rybchenko 
445af774cbSAndrew Rybchenko #ifdef EFSYS_OPT_FALCON
455af774cbSAndrew Rybchenko # error "FALCON is obsolete and is not supported."
465af774cbSAndrew Rybchenko #endif
475af774cbSAndrew Rybchenko 
483c838a9fSAndrew Rybchenko /* Support NVRAM based boot config */
493c838a9fSAndrew Rybchenko #if EFSYS_OPT_BOOTCFG
503c838a9fSAndrew Rybchenko # if !EFSYS_OPT_NVRAM
513c838a9fSAndrew Rybchenko #  error "BOOTCFG requires NVRAM"
523c838a9fSAndrew Rybchenko # endif
533c838a9fSAndrew Rybchenko #endif /* EFSYS_OPT_BOOTCFG */
543c838a9fSAndrew Rybchenko 
553c838a9fSAndrew Rybchenko /* Verify chip implements accessed registers */
563c838a9fSAndrew Rybchenko #if EFSYS_OPT_CHECK_REG
5797ce60b7SAndrew Rybchenko # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
5897ce60b7SAndrew Rybchenko 	EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
5997ce60b7SAndrew Rybchenko #  error "CHECK_REG requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
603c838a9fSAndrew Rybchenko # endif
613c838a9fSAndrew Rybchenko #endif /* EFSYS_OPT_CHECK_REG */
623c838a9fSAndrew Rybchenko 
633c838a9fSAndrew Rybchenko /* Decode fatal errors */
643c838a9fSAndrew Rybchenko #if EFSYS_OPT_DECODE_INTR_FATAL
65e75412c9SAndrew Rybchenko # if !EFSYS_OPT_SIENA
66e75412c9SAndrew Rybchenko #  error "INTR_FATAL requires SIENA"
673c838a9fSAndrew Rybchenko # endif
683c838a9fSAndrew Rybchenko #endif /* EFSYS_OPT_DECODE_INTR_FATAL */
693c838a9fSAndrew Rybchenko 
703c838a9fSAndrew Rybchenko /* Support diagnostic hardware tests */
713c838a9fSAndrew Rybchenko #if EFSYS_OPT_DIAG
7297ce60b7SAndrew Rybchenko # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
7397ce60b7SAndrew Rybchenko 	EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
7497ce60b7SAndrew Rybchenko #  error "DIAG requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
753c838a9fSAndrew Rybchenko # endif
763c838a9fSAndrew Rybchenko #endif /* EFSYS_OPT_DIAG */
773c838a9fSAndrew Rybchenko 
783c838a9fSAndrew Rybchenko /* Support optimized EVQ data access */
793c838a9fSAndrew Rybchenko #if EFSYS_OPT_EV_PREFETCH
8097ce60b7SAndrew Rybchenko # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
8197ce60b7SAndrew Rybchenko 	EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
8297ce60b7SAndrew Rybchenko #  error "EV_PREFETCH requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
833c838a9fSAndrew Rybchenko # endif
843c838a9fSAndrew Rybchenko #endif /* EFSYS_OPT_EV_PREFETCH */
853c838a9fSAndrew Rybchenko 
8653e1d377SAndrew Rybchenko #ifdef EFSYS_OPT_FALCON_NIC_CFG_OVERRIDE
8753e1d377SAndrew Rybchenko # error "FALCON_NIC_CFG_OVERRIDE is obsolete and is not supported."
883c838a9fSAndrew Rybchenko #endif
893c838a9fSAndrew Rybchenko 
903c838a9fSAndrew Rybchenko /* Support hardware packet filters */
913c838a9fSAndrew Rybchenko #if EFSYS_OPT_FILTER
9297ce60b7SAndrew Rybchenko # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
9397ce60b7SAndrew Rybchenko 	EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
9497ce60b7SAndrew Rybchenko #  error "FILTER requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
953c838a9fSAndrew Rybchenko # endif
963c838a9fSAndrew Rybchenko #endif /* EFSYS_OPT_FILTER */
973c838a9fSAndrew Rybchenko 
9897ce60b7SAndrew Rybchenko #if (EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
993c838a9fSAndrew Rybchenko # if !EFSYS_OPT_FILTER
10097ce60b7SAndrew Rybchenko #  error "HUNTINGTON or MEDFORD or MEDFORD2 requires FILTER"
1013c838a9fSAndrew Rybchenko # endif
1023c838a9fSAndrew Rybchenko #endif /* EFSYS_OPT_HUNTINGTON */
1033c838a9fSAndrew Rybchenko 
1043c838a9fSAndrew Rybchenko /* Support hardware loopback modes */
1053c838a9fSAndrew Rybchenko #if EFSYS_OPT_LOOPBACK
10697ce60b7SAndrew Rybchenko # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
10797ce60b7SAndrew Rybchenko 	EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
10897ce60b7SAndrew Rybchenko #  error "LOOPBACK requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
1093c838a9fSAndrew Rybchenko # endif
1103c838a9fSAndrew Rybchenko #endif /* EFSYS_OPT_LOOPBACK */
1113c838a9fSAndrew Rybchenko 
11256dae5beSAndrew Rybchenko #ifdef EFSYS_OPT_MAC_FALCON_GMAC
11356dae5beSAndrew Rybchenko # error "MAC_FALCON_GMAC is obsolete and is not supported."
1143c838a9fSAndrew Rybchenko #endif
1153c838a9fSAndrew Rybchenko 
11616f997aeSAndrew Rybchenko #ifdef EFSYS_OPT_MAC_FALCON_XMAC
11716f997aeSAndrew Rybchenko # error "MAC_FALCON_XMAC is obsolete and is not supported."
1183c838a9fSAndrew Rybchenko #endif
1193c838a9fSAndrew Rybchenko 
1203c838a9fSAndrew Rybchenko /* Support MAC statistics */
1213c838a9fSAndrew Rybchenko #if EFSYS_OPT_MAC_STATS
12297ce60b7SAndrew Rybchenko # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
12397ce60b7SAndrew Rybchenko 	EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
12497ce60b7SAndrew Rybchenko #  error "MAC_STATS requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
1253c838a9fSAndrew Rybchenko # endif
1263c838a9fSAndrew Rybchenko #endif /* EFSYS_OPT_MAC_STATS */
1273c838a9fSAndrew Rybchenko 
1283c838a9fSAndrew Rybchenko /* Support management controller messages */
1293c838a9fSAndrew Rybchenko #if EFSYS_OPT_MCDI
13097ce60b7SAndrew Rybchenko # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
13197ce60b7SAndrew Rybchenko 	EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
13297ce60b7SAndrew Rybchenko #  error "MCDI requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
1333c838a9fSAndrew Rybchenko # endif
1343c838a9fSAndrew Rybchenko #endif /* EFSYS_OPT_MCDI */
1353c838a9fSAndrew Rybchenko 
13697ce60b7SAndrew Rybchenko #if (EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
13797ce60b7SAndrew Rybchenko 	EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
1388883918dSAndrew Rybchenko # if !EFSYS_OPT_MCDI
13997ce60b7SAndrew Rybchenko #  error "SIENA or HUNTINGTON or MEDFORD or MEDFORD2 requires MCDI"
1403c838a9fSAndrew Rybchenko # endif
1413c838a9fSAndrew Rybchenko #endif
1423c838a9fSAndrew Rybchenko 
143870b1186SAndrew Rybchenko /* Support MCDI logging */
144870b1186SAndrew Rybchenko #if EFSYS_OPT_MCDI_LOGGING
145870b1186SAndrew Rybchenko # if !EFSYS_OPT_MCDI
146870b1186SAndrew Rybchenko #  error "MCDI_LOGGING requires MCDI"
147870b1186SAndrew Rybchenko # endif
148870b1186SAndrew Rybchenko #endif /* EFSYS_OPT_MCDI_LOGGING */
149870b1186SAndrew Rybchenko 
1503edad197SAndrew Rybchenko /* Support MCDI proxy authorization */
1513edad197SAndrew Rybchenko #if EFSYS_OPT_MCDI_PROXY_AUTH
1523edad197SAndrew Rybchenko # if !EFSYS_OPT_MCDI
1533edad197SAndrew Rybchenko #  error "MCDI_PROXY_AUTH requires MCDI"
1543edad197SAndrew Rybchenko # endif
1553edad197SAndrew Rybchenko #endif /* EFSYS_OPT_MCDI_PROXY_AUTH */
1563edad197SAndrew Rybchenko 
1574060d2b0SAndrew Rybchenko #ifdef EFSYS_OPT_MON_LM87
1584060d2b0SAndrew Rybchenko # error "MON_LM87 is obsolete and is not supported."
1593c838a9fSAndrew Rybchenko #endif
1603c838a9fSAndrew Rybchenko 
1613f20cf96SAndrew Rybchenko #ifdef EFSYS_OPT_MON_MAX6647
1623f20cf96SAndrew Rybchenko # error "MON_MAX6647 is obsolete and is not supported."
1633c838a9fSAndrew Rybchenko #endif
1643c838a9fSAndrew Rybchenko 
1651c7fb9c7SAndrew Rybchenko #ifdef EFSYS_OPT_MON_NULL
1661c7fb9c7SAndrew Rybchenko # error "MON_NULL is obsolete and is not supported."
1673c838a9fSAndrew Rybchenko #endif
1683c838a9fSAndrew Rybchenko 
1693c838a9fSAndrew Rybchenko #ifdef EFSYS_OPT_MON_SIENA
1703d385f4eSAndrew Rybchenko #  error "MON_SIENA is obsolete (replaced by MON_MCDI)."
17169a87752SAndrew Rybchenko #endif
1723c838a9fSAndrew Rybchenko 
1733c838a9fSAndrew Rybchenko #ifdef EFSYS_OPT_MON_HUNTINGTON
1743d385f4eSAndrew Rybchenko #  error "MON_HUNTINGTON is obsolete (replaced by MON_MCDI)."
17569a87752SAndrew Rybchenko #endif
1763c838a9fSAndrew Rybchenko 
1773c838a9fSAndrew Rybchenko /* Support monitor statistics (voltage/temperature) */
1783c838a9fSAndrew Rybchenko #if EFSYS_OPT_MON_STATS
17997ce60b7SAndrew Rybchenko # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
18097ce60b7SAndrew Rybchenko 	EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
18197ce60b7SAndrew Rybchenko #  error "MON_STATS requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
1823c838a9fSAndrew Rybchenko # endif
1833c838a9fSAndrew Rybchenko #endif /* EFSYS_OPT_MON_STATS */
1843c838a9fSAndrew Rybchenko 
1853c838a9fSAndrew Rybchenko /* Support Monitor via mcdi */
1863c838a9fSAndrew Rybchenko #if EFSYS_OPT_MON_MCDI
18797ce60b7SAndrew Rybchenko # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
18897ce60b7SAndrew Rybchenko 	EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
18997ce60b7SAndrew Rybchenko #  error "MON_MCDI requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
1903c838a9fSAndrew Rybchenko # endif
1913c838a9fSAndrew Rybchenko #endif /* EFSYS_OPT_MON_MCDI*/
1923c838a9fSAndrew Rybchenko 
1933c838a9fSAndrew Rybchenko /* Support printable names for statistics */
1943c838a9fSAndrew Rybchenko #if EFSYS_OPT_NAMES
1953c838a9fSAndrew Rybchenko # if !(EFSYS_OPT_LOOPBACK || EFSYS_OPT_MAC_STATS || EFSYS_OPT_MCDI || \
1967a3e390bSAndrew Rybchenko 	EFSYS_MON_STATS || EFSYS_OPT_PHY_STATS || EFSYS_OPT_QSTATS)
1977a3e390bSAndrew Rybchenko #  error "NAMES requires LOOPBACK or xxxSTATS or MCDI"
1983c838a9fSAndrew Rybchenko # endif
1993c838a9fSAndrew Rybchenko #endif /* EFSYS_OPT_NAMES */
2003c838a9fSAndrew Rybchenko 
2013c838a9fSAndrew Rybchenko /* Support non volatile configuration */
2023c838a9fSAndrew Rybchenko #if EFSYS_OPT_NVRAM
20397ce60b7SAndrew Rybchenko # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
20497ce60b7SAndrew Rybchenko 	EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
20597ce60b7SAndrew Rybchenko #  error "NVRAM requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
2063c838a9fSAndrew Rybchenko # endif
2073c838a9fSAndrew Rybchenko #endif /* EFSYS_OPT_NVRAM */
2083c838a9fSAndrew Rybchenko 
209391763d7SAndrew Rybchenko #if EFSYS_OPT_IMAGE_LAYOUT
210391763d7SAndrew Rybchenko /* Support signed image layout handling */
211391763d7SAndrew Rybchenko # if !(EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
212391763d7SAndrew Rybchenko #  error "IMAGE_LAYOUT requires MEDFORD or MEDFORD2"
213391763d7SAndrew Rybchenko # endif
214391763d7SAndrew Rybchenko #endif /* EFSYS_OPT_IMAGE_LAYOUT */
215391763d7SAndrew Rybchenko 
2166e85f167SAndrew Rybchenko #ifdef EFSYS_OPT_NVRAM_FALCON_BOOTROM
2176e85f167SAndrew Rybchenko # error "NVRAM_FALCON_BOOTROM is obsolete and is not supported."
2183c838a9fSAndrew Rybchenko #endif
2193c838a9fSAndrew Rybchenko 
220d9b66edcSAndrew Rybchenko #ifdef EFSYS_OPT_NVRAM_SFT9001
221d9b66edcSAndrew Rybchenko # error "NVRAM_SFT9001 is obsolete and is not supported."
2223c838a9fSAndrew Rybchenko #endif
2233c838a9fSAndrew Rybchenko 
224eaec7581SAndrew Rybchenko #ifdef EFSYS_OPT_NVRAM_SFX7101
225eaec7581SAndrew Rybchenko # error "NVRAM_SFX7101 is obsolete and is not supported."
2263c838a9fSAndrew Rybchenko #endif
2273c838a9fSAndrew Rybchenko 
228ca738e7aSAndrew Rybchenko #ifdef EFSYS_OPT_PCIE_TUNE
229ca738e7aSAndrew Rybchenko # error "PCIE_TUNE is obsolete and is not supported."
2303c838a9fSAndrew Rybchenko #endif
2313c838a9fSAndrew Rybchenko 
232aa7e2942SAndrew Rybchenko #ifdef EFSYS_OPT_PHY_BIST
2333d385f4eSAndrew Rybchenko # error "PHY_BIST is obsolete (replaced by BIST)."
234aa7e2942SAndrew Rybchenko #endif
2353c838a9fSAndrew Rybchenko 
2363c838a9fSAndrew Rybchenko /* Support PHY flags */
2373c838a9fSAndrew Rybchenko #if EFSYS_OPT_PHY_FLAGS
238e75412c9SAndrew Rybchenko # if !EFSYS_OPT_SIENA
239e75412c9SAndrew Rybchenko #  error "PHY_FLAGS requires SIENA"
2403c838a9fSAndrew Rybchenko # endif
2413c838a9fSAndrew Rybchenko #endif /* EFSYS_OPT_PHY_FLAGS */
2423c838a9fSAndrew Rybchenko 
2433c838a9fSAndrew Rybchenko /* Support for PHY LED control */
2443c838a9fSAndrew Rybchenko #if EFSYS_OPT_PHY_LED_CONTROL
24597ce60b7SAndrew Rybchenko # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
24697ce60b7SAndrew Rybchenko 	EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
24797ce60b7SAndrew Rybchenko #  error "PHY_LED_CONTROL requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
2483c838a9fSAndrew Rybchenko # endif
2493c838a9fSAndrew Rybchenko #endif /* EFSYS_OPT_PHY_LED_CONTROL */
2503c838a9fSAndrew Rybchenko 
25145a31c66SAndrew Rybchenko #ifdef EFSYS_OPT_PHY_NULL
25245a31c66SAndrew Rybchenko # error "PHY_NULL is obsolete and is not supported."
2533c838a9fSAndrew Rybchenko #endif
2543c838a9fSAndrew Rybchenko 
2553c838a9fSAndrew Rybchenko #ifdef EFSYS_OPT_PHY_PM8358
2567a3e390bSAndrew Rybchenko # error "PHY_PM8358 is obsolete and is not supported."
2573c838a9fSAndrew Rybchenko #endif
2583c838a9fSAndrew Rybchenko 
2597a3e390bSAndrew Rybchenko #ifdef EFSYS_OPT_PHY_PROPS
2607a3e390bSAndrew Rybchenko # error "PHY_PROPS is obsolete and is not supported."
2613c838a9fSAndrew Rybchenko #endif
2623c838a9fSAndrew Rybchenko 
2630c2328b0SAndrew Rybchenko #ifdef EFSYS_OPT_PHY_QT2022C2
2640c2328b0SAndrew Rybchenko # error "PHY_QT2022C2 is obsolete and is not supported."
2653c838a9fSAndrew Rybchenko #endif
2663c838a9fSAndrew Rybchenko 
267784995f8SAndrew Rybchenko #ifdef EFSYS_OPT_PHY_QT2025C
268784995f8SAndrew Rybchenko # error "PHY_QT2025C is obsolete and is not supported."
2693c838a9fSAndrew Rybchenko #endif
2703c838a9fSAndrew Rybchenko 
2717d276678SAndrew Rybchenko #ifdef EFSYS_OPT_PHY_SFT9001
2727d276678SAndrew Rybchenko # error "PHY_SFT9001 is obsolete and is not supported."
2733c838a9fSAndrew Rybchenko #endif
2743c838a9fSAndrew Rybchenko 
275ffb5b394SAndrew Rybchenko #ifdef EFSYS_OPT_PHY_SFX7101
276ffb5b394SAndrew Rybchenko # error "PHY_SFX7101 is obsolete and is not supported."
2773c838a9fSAndrew Rybchenko #endif
2783c838a9fSAndrew Rybchenko 
2793c838a9fSAndrew Rybchenko /* Support PHY statistics */
2803c838a9fSAndrew Rybchenko #if EFSYS_OPT_PHY_STATS
281a6f6c2f0SAndrew Rybchenko # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
282a6f6c2f0SAndrew Rybchenko #  error "PHY_STATS requires SIENA or HUNTINGTON or MEDFORD"
2833c838a9fSAndrew Rybchenko # endif
2843c838a9fSAndrew Rybchenko #endif /* EFSYS_OPT_PHY_STATS */
2853c838a9fSAndrew Rybchenko 
286b18622c3SAndrew Rybchenko #ifdef EFSYS_OPT_PHY_TXC43128
287b18622c3SAndrew Rybchenko # error "PHY_TXC43128 is obsolete and is not supported."
2883c838a9fSAndrew Rybchenko #endif
2893c838a9fSAndrew Rybchenko 
2903c838a9fSAndrew Rybchenko /* Support EVQ/RXQ/TXQ statistics */
2913c838a9fSAndrew Rybchenko #if EFSYS_OPT_QSTATS
29297ce60b7SAndrew Rybchenko # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
29397ce60b7SAndrew Rybchenko 	EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
29497ce60b7SAndrew Rybchenko #  error "QSTATS requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
2953c838a9fSAndrew Rybchenko # endif
2963c838a9fSAndrew Rybchenko #endif /* EFSYS_OPT_QSTATS */
2973c838a9fSAndrew Rybchenko 
2981b02e3c0SAndrew Rybchenko #ifdef EFSYS_OPT_RX_HDR_SPLIT
2991b02e3c0SAndrew Rybchenko # error "RX_HDR_SPLIT is obsolete and is not supported"
30069a87752SAndrew Rybchenko #endif
3013c838a9fSAndrew Rybchenko 
3023c838a9fSAndrew Rybchenko /* Support receive scaling (RSS) */
3033c838a9fSAndrew Rybchenko #if EFSYS_OPT_RX_SCALE
30497ce60b7SAndrew Rybchenko # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
30597ce60b7SAndrew Rybchenko 	EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
30697ce60b7SAndrew Rybchenko #  error "RX_SCALE requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
3073c838a9fSAndrew Rybchenko # endif
3083c838a9fSAndrew Rybchenko #endif /* EFSYS_OPT_RX_SCALE */
3093c838a9fSAndrew Rybchenko 
3103c838a9fSAndrew Rybchenko /* Support receive scatter DMA */
3113c838a9fSAndrew Rybchenko #if EFSYS_OPT_RX_SCATTER
31297ce60b7SAndrew Rybchenko # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
31397ce60b7SAndrew Rybchenko 	EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
31497ce60b7SAndrew Rybchenko #  error "RX_SCATTER requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
3153c838a9fSAndrew Rybchenko # endif
3163c838a9fSAndrew Rybchenko #endif /* EFSYS_OPT_RX_SCATTER */
3173c838a9fSAndrew Rybchenko 
3183c838a9fSAndrew Rybchenko #ifdef EFSYS_OPT_STAT_NAME
3193d385f4eSAndrew Rybchenko # error "STAT_NAME is obsolete (replaced by NAMES)."
3203c838a9fSAndrew Rybchenko #endif
3213c838a9fSAndrew Rybchenko 
3223c838a9fSAndrew Rybchenko /* Support PCI Vital Product Data (VPD) */
3233c838a9fSAndrew Rybchenko #if EFSYS_OPT_VPD
32497ce60b7SAndrew Rybchenko # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
32597ce60b7SAndrew Rybchenko 	EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
32697ce60b7SAndrew Rybchenko #  error "VPD requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
3273c838a9fSAndrew Rybchenko # endif
3283c838a9fSAndrew Rybchenko #endif /* EFSYS_OPT_VPD */
3293c838a9fSAndrew Rybchenko 
3303c838a9fSAndrew Rybchenko /* Support Wake on LAN */
3317367e679SAndrew Rybchenko #ifdef EFSYS_OPT_WOL
3327367e679SAndrew Rybchenko # error "WOL is obsolete and is not supported"
3333c838a9fSAndrew Rybchenko #endif /* EFSYS_OPT_WOL */
3343c838a9fSAndrew Rybchenko 
335dae248eeSAndrew Rybchenko #ifdef EFSYS_OPT_MCAST_FILTER_LIST
3363d385f4eSAndrew Rybchenko #  error "MCAST_FILTER_LIST is obsolete and is not supported"
33769a87752SAndrew Rybchenko #endif
3383c838a9fSAndrew Rybchenko 
3393c838a9fSAndrew Rybchenko /* Support BIST */
3403c838a9fSAndrew Rybchenko #if EFSYS_OPT_BIST
34197ce60b7SAndrew Rybchenko # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
34297ce60b7SAndrew Rybchenko 	EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
34397ce60b7SAndrew Rybchenko #  error "BIST requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
3443c838a9fSAndrew Rybchenko # endif
3453c838a9fSAndrew Rybchenko #endif /* EFSYS_OPT_BIST */
3463c838a9fSAndrew Rybchenko 
3470c848230SAndrew Rybchenko /* Support MCDI licensing API */
3480c848230SAndrew Rybchenko #if EFSYS_OPT_LICENSING
3490c848230SAndrew Rybchenko # if !EFSYS_OPT_MCDI
3500c848230SAndrew Rybchenko #  error "LICENSING requires MCDI"
3510c848230SAndrew Rybchenko # endif
3520c848230SAndrew Rybchenko # if !EFSYS_HAS_UINT64
3530c848230SAndrew Rybchenko #  error "LICENSING requires UINT64"
3540c848230SAndrew Rybchenko # endif
3550c848230SAndrew Rybchenko #endif /* EFSYS_OPT_LICENSING */
3560c848230SAndrew Rybchenko 
357ecaa500cSAndrew Rybchenko /* Support adapters with missing static config (for factory use only) */
358ecaa500cSAndrew Rybchenko #if EFSYS_OPT_ALLOW_UNCONFIGURED_NIC
35997ce60b7SAndrew Rybchenko # if !(EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
36097ce60b7SAndrew Rybchenko #  error "ALLOW_UNCONFIGURED_NIC requires MEDFORD or MEDFORD2"
361ecaa500cSAndrew Rybchenko # endif
362ecaa500cSAndrew Rybchenko #endif /* EFSYS_OPT_ALLOW_UNCONFIGURED_NIC */
363ecaa500cSAndrew Rybchenko 
3648e0c4827SAndrew Rybchenko /* Support packed stream mode */
3658e0c4827SAndrew Rybchenko #if EFSYS_OPT_RX_PACKED_STREAM
36697ce60b7SAndrew Rybchenko # if !(EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
36797ce60b7SAndrew Rybchenko #  error "PACKED_STREAM requires HUNTINGTON or MEDFORD or MEDFORD2"
3688e0c4827SAndrew Rybchenko # endif
3698e0c4827SAndrew Rybchenko #endif
3700c848230SAndrew Rybchenko 
371*04381b5eSAndrew Rybchenko #if EFSYS_OPT_RX_ES_SUPER_BUFFER
372*04381b5eSAndrew Rybchenko /* Support equal stride super-buffer mode */
373*04381b5eSAndrew Rybchenko # if !(EFSYS_OPT_MEDFORD2)
374*04381b5eSAndrew Rybchenko #  error "ES_SUPER_BUFFER requires MEDFORD2"
375*04381b5eSAndrew Rybchenko # endif
376*04381b5eSAndrew Rybchenko #endif
377*04381b5eSAndrew Rybchenko 
378fdbe38cfSAndrew Rybchenko /* Support hardware assistance for tunnels */
379fdbe38cfSAndrew Rybchenko #if EFSYS_OPT_TUNNEL
380edaff290SAndrew Rybchenko # if !(EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
381edaff290SAndrew Rybchenko #  error "TUNNEL requires MEDFORD or MEDFORD2"
382fdbe38cfSAndrew Rybchenko # endif
383fdbe38cfSAndrew Rybchenko #endif /* EFSYS_OPT_TUNNEL */
384fdbe38cfSAndrew Rybchenko 
385e0b3c2ccSAndrew Rybchenko #if EFSYS_OPT_FW_SUBVARIANT_AWARE
386e0b3c2ccSAndrew Rybchenko /* Advertise that the driver is firmware subvariant aware */
387e0b3c2ccSAndrew Rybchenko # if !(EFSYS_OPT_MEDFORD2)
388e0b3c2ccSAndrew Rybchenko #  error "FW_SUBVARIANT_AWARE requires MEDFORD2"
389e0b3c2ccSAndrew Rybchenko # endif
390e0b3c2ccSAndrew Rybchenko #endif
391e0b3c2ccSAndrew Rybchenko 
3923c838a9fSAndrew Rybchenko #endif /* _SYS_EFX_CHECK_H */
393