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."
49 /* Support NVRAM based boot config */
51 # error "BOOTCFG requires NVRAM"
53 #endif /* EFSYS_OPT_BOOTCFG */
55 #if EFSYS_OPT_CHECK_REG
56 /* Verify chip implements accessed registers */
57 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
58 # error "CHECK_REG requires SIENA or HUNTINGTON or MEDFORD"
60 #endif /* EFSYS_OPT_CHECK_REG */
62 #if EFSYS_OPT_DECODE_INTR_FATAL
63 /* Decode fatal errors */
65 # error "INTR_FATAL requires SIENA"
67 #endif /* EFSYS_OPT_DECODE_INTR_FATAL */
70 /* Support diagnostic hardware tests */
71 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
72 # error "DIAG requires SIENA or HUNTINGTON or MEDFORD"
74 #endif /* EFSYS_OPT_DIAG */
76 #if EFSYS_OPT_EV_PREFETCH
77 /* Support optimized EVQ data access */
78 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
79 # error "EV_PREFETCH requires SIENA or HUNTINGTON or MEDFORD"
81 #endif /* EFSYS_OPT_EV_PREFETCH */
83 #ifdef EFSYS_OPT_FALCON_NIC_CFG_OVERRIDE
84 # error "FALCON_NIC_CFG_OVERRIDE is obsolete and is not supported."
88 /* Support hardware packet filters */
89 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
90 # error "FILTER requires SIENA or HUNTINGTON or MEDFORD"
92 #endif /* EFSYS_OPT_FILTER */
94 #if (EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
95 # if !EFSYS_OPT_FILTER
96 # error "HUNTINGTON or MEDFORD requires FILTER"
98 #endif /* EFSYS_OPT_HUNTINGTON */
100 #if EFSYS_OPT_LOOPBACK
101 /* Support hardware loopback modes */
102 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
103 # error "LOOPBACK requires SIENA or HUNTINGTON or MEDFORD"
105 #endif /* EFSYS_OPT_LOOPBACK */
107 #ifdef EFSYS_OPT_MAC_FALCON_GMAC
108 # error "MAC_FALCON_GMAC is obsolete and is not supported."
111 #ifdef EFSYS_OPT_MAC_FALCON_XMAC
112 # error "MAC_FALCON_XMAC is obsolete and is not supported."
115 #if EFSYS_OPT_MAC_STATS
116 /* Support MAC statistics */
117 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
118 # error "MAC_STATS requires SIENA or HUNTINGTON or MEDFORD"
120 #endif /* EFSYS_OPT_MAC_STATS */
123 /* Support management controller messages */
124 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
125 # error "MCDI requires SIENA or HUNTINGTON or MEDFORD"
127 #endif /* EFSYS_OPT_MCDI */
129 #if (EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
131 # error "SIENA or HUNTINGTON or MEDFORD requires MCDI"
135 #if EFSYS_OPT_MCDI_LOGGING
136 /* Support MCDI logging */
138 # error "MCDI_LOGGING requires MCDI"
140 #endif /* EFSYS_OPT_MCDI_LOGGING */
142 #if EFSYS_OPT_MCDI_PROXY_AUTH
143 /* Support MCDI proxy authorization */
145 # error "MCDI_PROXY_AUTH requires MCDI"
147 #endif /* EFSYS_OPT_MCDI_PROXY_AUTH */
149 #ifdef EFSYS_OPT_MON_LM87
150 # error "MON_LM87 is obsolete and is not supported."
153 #ifdef EFSYS_OPT_MON_MAX6647
154 # error "MON_MAX6647 is obsolete and is not supported."
157 #ifdef EFSYS_OPT_MON_NULL
158 # error "MON_NULL is obsolete and is not supported."
161 #ifdef EFSYS_OPT_MON_SIENA
162 # error "MON_SIENA is obsolete (replaced by MON_MCDI)."
165 #ifdef EFSYS_OPT_MON_HUNTINGTON
166 # error "MON_HUNTINGTON is obsolete (replaced by MON_MCDI)."
169 #if EFSYS_OPT_MON_STATS
170 /* Support monitor statistics (voltage/temperature) */
171 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
172 # error "MON_STATS requires SIENA or HUNTINGTON or MEDFORD"
174 #endif /* EFSYS_OPT_MON_STATS */
176 #if EFSYS_OPT_MON_MCDI
177 /* Support Monitor via mcdi */
178 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
179 # error "MON_MCDI requires SIENA or HUNTINGTON or MEDFORD"
181 #endif /* EFSYS_OPT_MON_MCDI*/
184 /* Support printable names for statistics */
185 # if !(EFSYS_OPT_LOOPBACK || EFSYS_OPT_MAC_STATS || EFSYS_OPT_MCDI || \
186 EFSYS_MON_STATS || EFSYS_OPT_PHY_STATS || EFSYS_OPT_QSTATS)
187 # error "NAMES requires LOOPBACK or xxxSTATS or MCDI"
189 #endif /* EFSYS_OPT_NAMES */
192 /* Support non volatile configuration */
193 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
194 # error "NVRAM requires SIENA or HUNTINGTON or MEDFORD"
196 #endif /* EFSYS_OPT_NVRAM */
198 #ifdef EFSYS_OPT_NVRAM_FALCON_BOOTROM
199 # error "NVRAM_FALCON_BOOTROM is obsolete and is not supported."
202 #ifdef EFSYS_OPT_NVRAM_SFT9001
203 # error "NVRAM_SFT9001 is obsolete and is not supported."
206 #ifdef EFSYS_OPT_NVRAM_SFX7101
207 # error "NVRAM_SFX7101 is obsolete and is not supported."
210 #ifdef EFSYS_OPT_PCIE_TUNE
211 # error "PCIE_TUNE is obsolete and is not supported."
214 #ifdef EFSYS_OPT_PHY_BIST
215 # error "PHY_BIST is obsolete (replaced by BIST)."
218 #if EFSYS_OPT_PHY_FLAGS
219 /* Support PHY flags */
220 # if !EFSYS_OPT_SIENA
221 # error "PHY_FLAGS requires SIENA"
223 #endif /* EFSYS_OPT_PHY_FLAGS */
225 #if EFSYS_OPT_PHY_LED_CONTROL
226 /* Support for PHY LED control */
227 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
228 # error "PHY_LED_CONTROL requires SIENA or HUNTINGTON or MEDFORD"
230 #endif /* EFSYS_OPT_PHY_LED_CONTROL */
232 #ifdef EFSYS_OPT_PHY_NULL
233 # error "PHY_NULL is obsolete and is not supported."
236 #ifdef EFSYS_OPT_PHY_PM8358
237 # error "PHY_PM8358 is obsolete and is not supported."
240 #ifdef EFSYS_OPT_PHY_PROPS
241 # error "PHY_PROPS is obsolete and is not supported."
244 #ifdef EFSYS_OPT_PHY_QT2022C2
245 # error "PHY_QT2022C2 is obsolete and is not supported."
248 #ifdef EFSYS_OPT_PHY_QT2025C
249 # error "PHY_QT2025C is obsolete and is not supported."
252 #ifdef EFSYS_OPT_PHY_SFT9001
253 # error "PHY_SFT9001 is obsolete and is not supported."
256 #ifdef EFSYS_OPT_PHY_SFX7101
257 # error "PHY_SFX7101 is obsolete and is not supported."
260 #if EFSYS_OPT_PHY_STATS
261 /* Support PHY statistics */
262 # if !EFSYS_OPT_SIENA
263 # error "PHY_STATS requires SIENA"
265 #endif /* EFSYS_OPT_PHY_STATS */
267 #ifdef EFSYS_OPT_PHY_TXC43128
268 # error "PHY_TXC43128 is obsolete and is not supported."
272 /* Support EVQ/RXQ/TXQ statistics */
273 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
274 # error "QSTATS requires SIENA or HUNTINGTON or MEDFORD"
276 #endif /* EFSYS_OPT_QSTATS */
278 #ifdef EFSYS_OPT_RX_HDR_SPLIT
279 # error "RX_HDR_SPLIT is obsolete and is not supported"
282 #if EFSYS_OPT_RX_SCALE
283 /* Support receive scaling (RSS) */
284 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
285 # error "RX_SCALE requires SIENA or HUNTINGTON or MEDFORD"
287 #endif /* EFSYS_OPT_RX_SCALE */
289 #if EFSYS_OPT_RX_SCATTER
290 /* Support receive scatter DMA */
291 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
292 # error "RX_SCATTER requires SIENA or HUNTINGTON or MEDFORD"
294 #endif /* EFSYS_OPT_RX_SCATTER */
296 #ifdef EFSYS_OPT_STAT_NAME
297 # error "STAT_NAME is obsolete (replaced by NAMES)."
301 /* Support PCI Vital Product Data (VPD) */
302 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
303 # error "VPD requires SIENA or HUNTINGTON or MEDFORD"
305 #endif /* EFSYS_OPT_VPD */
308 # error "WOL is obsolete and is not supported"
309 #endif /* EFSYS_OPT_WOL */
311 #ifdef EFSYS_OPT_MCAST_FILTER_LIST
312 # error "MCAST_FILTER_LIST is obsolete and is not supported"
317 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
318 # error "BIST requires SIENA or HUNTINGTON or MEDFORD"
320 #endif /* EFSYS_OPT_BIST */
322 #if EFSYS_OPT_LICENSING
323 /* Support MCDI licensing API */
325 # error "LICENSING requires MCDI"
327 # if !EFSYS_HAS_UINT64
328 # error "LICENSING requires UINT64"
330 #endif /* EFSYS_OPT_LICENSING */
332 #if EFSYS_OPT_ALLOW_UNCONFIGURED_NIC
333 /* Support adapters with missing static config (for factory use only) */
334 # if !EFSYS_OPT_MEDFORD
335 # error "ALLOW_UNCONFIGURED_NIC requires MEDFORD"
337 #endif /* EFSYS_OPT_ALLOW_UNCONFIGURED_NIC */
339 #if EFSYS_OPT_RX_PACKED_STREAM
340 /* Support packed stream mode */
341 # if !(EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
342 # error "PACKED_STREAM requires HUNTINGTON or MEDFORD"
346 #endif /* _SYS_EFX_CHECK_H */