2 * Copyright (c) 2012-2016 Solarflare Communications Inc.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice,
11 * this list of conditions and the following disclaimer in the documentation
12 * and/or other materials provided with the distribution.
14 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
16 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
18 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
21 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
22 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
23 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
24 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 * The views and conclusions contained in the software and documentation are
27 * those of the authors and should not be interpreted as representing official
28 * policies, either expressed or implied, of the FreeBSD Project.
31 #ifndef _SYS_EFX_CHECK_H
32 #define _SYS_EFX_CHECK_H
37 * Check that the efsys.h header in client code has a valid combination of
38 * EFSYS_OPT_xxx options.
40 * NOTE: Keep checks for obsolete options here to ensure that they are removed
41 * from client code (and do not reappear in merges from other branches).
44 #ifdef EFSYS_OPT_FALCON
45 # error "FALCON is obsolete and is not supported."
48 #if EFSYS_OPT_CHECK_REG
49 /* Verify chip implements accessed registers */
50 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
51 # error "CHECK_REG requires SIENA or HUNTINGTON or MEDFORD"
53 #endif /* EFSYS_OPT_CHECK_REG */
55 #if EFSYS_OPT_DECODE_INTR_FATAL
56 /* Decode fatal errors */
58 # error "INTR_FATAL requires SIENA"
60 #endif /* EFSYS_OPT_DECODE_INTR_FATAL */
63 /* Support diagnostic hardware tests */
64 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
65 # error "DIAG requires SIENA or HUNTINGTON or MEDFORD"
67 #endif /* EFSYS_OPT_DIAG */
69 #ifdef EFSYS_OPT_FALCON_NIC_CFG_OVERRIDE
70 # error "FALCON_NIC_CFG_OVERRIDE is obsolete and is not supported."
74 /* Support hardware packet filters */
75 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
76 # error "FILTER requires SIENA or HUNTINGTON or MEDFORD"
78 #endif /* EFSYS_OPT_FILTER */
80 #if (EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
81 # if !EFSYS_OPT_FILTER
82 # error "HUNTINGTON or MEDFORD requires FILTER"
84 #endif /* EFSYS_OPT_HUNTINGTON */
86 #ifdef EFSYS_OPT_MAC_FALCON_GMAC
87 # error "MAC_FALCON_GMAC is obsolete and is not supported."
90 #ifdef EFSYS_OPT_MAC_FALCON_XMAC
91 # error "MAC_FALCON_XMAC is obsolete and is not supported."
94 #if EFSYS_OPT_MAC_STATS
95 /* Support MAC statistics */
96 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
97 # error "MAC_STATS requires SIENA or HUNTINGTON or MEDFORD"
99 #endif /* EFSYS_OPT_MAC_STATS */
102 /* Support management controller messages */
103 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
104 # error "MCDI requires SIENA or HUNTINGTON or MEDFORD"
106 #endif /* EFSYS_OPT_MCDI */
108 #if (EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
110 # error "SIENA or HUNTINGTON or MEDFORD requires MCDI"
114 #if EFSYS_OPT_MCDI_LOGGING
115 /* Support MCDI logging */
117 # error "MCDI_LOGGING requires MCDI"
119 #endif /* EFSYS_OPT_MCDI_LOGGING */
121 #if EFSYS_OPT_MCDI_PROXY_AUTH
122 /* Support MCDI proxy authorization */
124 # error "MCDI_PROXY_AUTH requires MCDI"
126 #endif /* EFSYS_OPT_MCDI_PROXY_AUTH */
128 #ifdef EFSYS_OPT_MON_LM87
129 # error "MON_LM87 is obsolete and is not supported."
132 #ifdef EFSYS_OPT_MON_MAX6647
133 # error "MON_MAX6647 is obsolete and is not supported."
136 #ifdef EFSYS_OPT_MON_NULL
137 # error "MON_NULL is obsolete and is not supported."
140 #ifdef EFSYS_OPT_MON_SIENA
141 # error "MON_SIENA is obsolete (replaced by MON_MCDI)."
144 #ifdef EFSYS_OPT_MON_HUNTINGTON
145 # error "MON_HUNTINGTON is obsolete (replaced by MON_MCDI)."
149 /* Support printable names for statistics */
150 # if !(EFSYS_OPT_LOOPBACK || EFSYS_OPT_MAC_STATS || EFSYS_OPT_MCDI || \
151 EFSYS_MON_STATS || EFSYS_OPT_PHY_STATS || EFSYS_OPT_QSTATS)
152 # error "NAMES requires LOOPBACK or xxxSTATS or MCDI"
154 #endif /* EFSYS_OPT_NAMES */
156 #ifdef EFSYS_OPT_NVRAM_FALCON_BOOTROM
157 # error "NVRAM_FALCON_BOOTROM is obsolete and is not supported."
160 #ifdef EFSYS_OPT_NVRAM_SFT9001
161 # error "NVRAM_SFT9001 is obsolete and is not supported."
164 #ifdef EFSYS_OPT_NVRAM_SFX7101
165 # error "NVRAM_SFX7101 is obsolete and is not supported."
168 #ifdef EFSYS_OPT_PCIE_TUNE
169 # error "PCIE_TUNE is obsolete and is not supported."
172 #ifdef EFSYS_OPT_PHY_BIST
173 # error "PHY_BIST is obsolete (replaced by BIST)."
176 #if EFSYS_OPT_PHY_FLAGS
177 /* Support PHY flags */
178 # if !EFSYS_OPT_SIENA
179 # error "PHY_FLAGS requires SIENA"
181 #endif /* EFSYS_OPT_PHY_FLAGS */
183 #if EFSYS_OPT_PHY_LED_CONTROL
184 /* Support for PHY LED control */
185 # if !EFSYS_OPT_SIENA
186 # error "PHY_LED_CONTROL requires SIENA"
188 #endif /* EFSYS_OPT_PHY_LED_CONTROL */
190 #ifdef EFSYS_OPT_PHY_NULL
191 # error "PHY_NULL is obsolete and is not supported."
194 #ifdef EFSYS_OPT_PHY_PM8358
195 # error "PHY_PM8358 is obsolete and is not supported."
198 #ifdef EFSYS_OPT_PHY_PROPS
199 # error "PHY_PROPS is obsolete and is not supported."
202 #ifdef EFSYS_OPT_PHY_QT2022C2
203 # error "PHY_QT2022C2 is obsolete and is not supported."
206 #ifdef EFSYS_OPT_PHY_QT2025C
207 # error "PHY_QT2025C is obsolete and is not supported."
210 #ifdef EFSYS_OPT_PHY_SFT9001
211 # error "PHY_SFT9001 is obsolete and is not supported."
214 #ifdef EFSYS_OPT_PHY_SFX7101
215 # error "PHY_SFX7101 is obsolete and is not supported."
218 #if EFSYS_OPT_PHY_STATS
219 /* Support PHY statistics */
220 # if !EFSYS_OPT_SIENA
221 # error "PHY_STATS requires SIENA"
223 #endif /* EFSYS_OPT_PHY_STATS */
225 #ifdef EFSYS_OPT_PHY_TXC43128
226 # error "PHY_TXC43128 is obsolete and is not supported."
230 /* Support EVQ/RXQ/TXQ statistics */
231 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
232 # error "QSTATS requires SIENA or HUNTINGTON or MEDFORD"
234 #endif /* EFSYS_OPT_QSTATS */
236 #ifdef EFSYS_OPT_RX_HDR_SPLIT
237 # error "RX_HDR_SPLIT is obsolete and is not supported"
240 #ifdef EFSYS_OPT_STAT_NAME
241 # error "STAT_NAME is obsolete (replaced by NAMES)."
245 # error "WOL is obsolete and is not supported"
246 #endif /* EFSYS_OPT_WOL */
248 #ifdef EFSYS_OPT_MCAST_FILTER_LIST
249 # error "MCAST_FILTER_LIST is obsolete and is not supported"
254 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
255 # error "BIST requires SIENA or HUNTINGTON or MEDFORD"
257 #endif /* EFSYS_OPT_BIST */
259 #if EFSYS_OPT_ALLOW_UNCONFIGURED_NIC
260 /* Support adapters with missing static config (for factory use only) */
261 # if !EFSYS_OPT_MEDFORD
262 # error "ALLOW_UNCONFIGURED_NIC requires MEDFORD"
264 #endif /* EFSYS_OPT_ALLOW_UNCONFIGURED_NIC */
266 #endif /* _SYS_EFX_CHECK_H */