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 #if EFSYS_OPT_EV_PREFETCH
70 /* Support optimized EVQ data access */
71 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
72 # error "EV_PREFETCH requires SIENA or HUNTINGTON or MEDFORD"
74 #endif /* EFSYS_OPT_EV_PREFETCH */
76 #ifdef EFSYS_OPT_FALCON_NIC_CFG_OVERRIDE
77 # error "FALCON_NIC_CFG_OVERRIDE is obsolete and is not supported."
81 /* Support hardware packet filters */
82 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
83 # error "FILTER requires SIENA or HUNTINGTON or MEDFORD"
85 #endif /* EFSYS_OPT_FILTER */
87 #if (EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
88 # if !EFSYS_OPT_FILTER
89 # error "HUNTINGTON or MEDFORD requires FILTER"
91 #endif /* EFSYS_OPT_HUNTINGTON */
93 #if EFSYS_OPT_LOOPBACK
94 /* Support hardware loopback modes */
95 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
96 # error "LOOPBACK requires SIENA or HUNTINGTON or MEDFORD"
98 #endif /* EFSYS_OPT_LOOPBACK */
100 #ifdef EFSYS_OPT_MAC_FALCON_GMAC
101 # error "MAC_FALCON_GMAC is obsolete and is not supported."
104 #ifdef EFSYS_OPT_MAC_FALCON_XMAC
105 # error "MAC_FALCON_XMAC is obsolete and is not supported."
108 #if EFSYS_OPT_MAC_STATS
109 /* Support MAC statistics */
110 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
111 # error "MAC_STATS requires SIENA or HUNTINGTON or MEDFORD"
113 #endif /* EFSYS_OPT_MAC_STATS */
116 /* Support management controller messages */
117 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
118 # error "MCDI requires SIENA or HUNTINGTON or MEDFORD"
120 #endif /* EFSYS_OPT_MCDI */
122 #if (EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
124 # error "SIENA or HUNTINGTON or MEDFORD requires MCDI"
128 #if EFSYS_OPT_MCDI_LOGGING
129 /* Support MCDI logging */
131 # error "MCDI_LOGGING requires MCDI"
133 #endif /* EFSYS_OPT_MCDI_LOGGING */
135 #if EFSYS_OPT_MCDI_PROXY_AUTH
136 /* Support MCDI proxy authorization */
138 # error "MCDI_PROXY_AUTH requires MCDI"
140 #endif /* EFSYS_OPT_MCDI_PROXY_AUTH */
142 #ifdef EFSYS_OPT_MON_LM87
143 # error "MON_LM87 is obsolete and is not supported."
146 #ifdef EFSYS_OPT_MON_MAX6647
147 # error "MON_MAX6647 is obsolete and is not supported."
150 #ifdef EFSYS_OPT_MON_NULL
151 # error "MON_NULL is obsolete and is not supported."
154 #ifdef EFSYS_OPT_MON_SIENA
155 # error "MON_SIENA is obsolete (replaced by MON_MCDI)."
158 #ifdef EFSYS_OPT_MON_HUNTINGTON
159 # error "MON_HUNTINGTON is obsolete (replaced by MON_MCDI)."
162 #if EFSYS_OPT_MON_STATS
163 /* Support monitor statistics (voltage/temperature) */
164 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
165 # error "MON_STATS requires SIENA or HUNTINGTON or MEDFORD"
167 #endif /* EFSYS_OPT_MON_STATS */
169 #if EFSYS_OPT_MON_MCDI
170 /* Support Monitor via mcdi */
171 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
172 # error "MON_MCDI requires SIENA or HUNTINGTON or MEDFORD"
174 #endif /* EFSYS_OPT_MON_MCDI*/
177 /* Support printable names for statistics */
178 # if !(EFSYS_OPT_LOOPBACK || EFSYS_OPT_MAC_STATS || EFSYS_OPT_MCDI || \
179 EFSYS_MON_STATS || EFSYS_OPT_PHY_STATS || EFSYS_OPT_QSTATS)
180 # error "NAMES requires LOOPBACK or xxxSTATS or MCDI"
182 #endif /* EFSYS_OPT_NAMES */
184 #ifdef EFSYS_OPT_NVRAM_FALCON_BOOTROM
185 # error "NVRAM_FALCON_BOOTROM is obsolete and is not supported."
188 #ifdef EFSYS_OPT_NVRAM_SFT9001
189 # error "NVRAM_SFT9001 is obsolete and is not supported."
192 #ifdef EFSYS_OPT_NVRAM_SFX7101
193 # error "NVRAM_SFX7101 is obsolete and is not supported."
196 #ifdef EFSYS_OPT_PCIE_TUNE
197 # error "PCIE_TUNE is obsolete and is not supported."
200 #ifdef EFSYS_OPT_PHY_BIST
201 # error "PHY_BIST is obsolete (replaced by BIST)."
204 #if EFSYS_OPT_PHY_FLAGS
205 /* Support PHY flags */
206 # if !EFSYS_OPT_SIENA
207 # error "PHY_FLAGS requires SIENA"
209 #endif /* EFSYS_OPT_PHY_FLAGS */
211 #if EFSYS_OPT_PHY_LED_CONTROL
212 /* Support for PHY LED control */
213 # if !EFSYS_OPT_SIENA
214 # error "PHY_LED_CONTROL requires SIENA"
216 #endif /* EFSYS_OPT_PHY_LED_CONTROL */
218 #ifdef EFSYS_OPT_PHY_NULL
219 # error "PHY_NULL is obsolete and is not supported."
222 #ifdef EFSYS_OPT_PHY_PM8358
223 # error "PHY_PM8358 is obsolete and is not supported."
226 #ifdef EFSYS_OPT_PHY_PROPS
227 # error "PHY_PROPS is obsolete and is not supported."
230 #ifdef EFSYS_OPT_PHY_QT2022C2
231 # error "PHY_QT2022C2 is obsolete and is not supported."
234 #ifdef EFSYS_OPT_PHY_QT2025C
235 # error "PHY_QT2025C is obsolete and is not supported."
238 #ifdef EFSYS_OPT_PHY_SFT9001
239 # error "PHY_SFT9001 is obsolete and is not supported."
242 #ifdef EFSYS_OPT_PHY_SFX7101
243 # error "PHY_SFX7101 is obsolete and is not supported."
246 #if EFSYS_OPT_PHY_STATS
247 /* Support PHY statistics */
248 # if !EFSYS_OPT_SIENA
249 # error "PHY_STATS requires SIENA"
251 #endif /* EFSYS_OPT_PHY_STATS */
253 #ifdef EFSYS_OPT_PHY_TXC43128
254 # error "PHY_TXC43128 is obsolete and is not supported."
258 /* Support EVQ/RXQ/TXQ statistics */
259 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
260 # error "QSTATS requires SIENA or HUNTINGTON or MEDFORD"
262 #endif /* EFSYS_OPT_QSTATS */
264 #ifdef EFSYS_OPT_RX_HDR_SPLIT
265 # error "RX_HDR_SPLIT is obsolete and is not supported"
268 #if EFSYS_OPT_RX_SCALE
269 /* Support receive scaling (RSS) */
270 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
271 # error "RX_SCALE requires SIENA or HUNTINGTON or MEDFORD"
273 #endif /* EFSYS_OPT_RX_SCALE */
275 #if EFSYS_OPT_RX_SCATTER
276 /* Support receive scatter DMA */
277 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
278 # error "RX_SCATTER requires SIENA or HUNTINGTON or MEDFORD"
280 #endif /* EFSYS_OPT_RX_SCATTER */
282 #ifdef EFSYS_OPT_STAT_NAME
283 # error "STAT_NAME is obsolete (replaced by NAMES)."
287 # error "WOL is obsolete and is not supported"
288 #endif /* EFSYS_OPT_WOL */
290 #ifdef EFSYS_OPT_MCAST_FILTER_LIST
291 # error "MCAST_FILTER_LIST is obsolete and is not supported"
296 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
297 # error "BIST requires SIENA or HUNTINGTON or MEDFORD"
299 #endif /* EFSYS_OPT_BIST */
301 #if EFSYS_OPT_ALLOW_UNCONFIGURED_NIC
302 /* Support adapters with missing static config (for factory use only) */
303 # if !EFSYS_OPT_MEDFORD
304 # error "ALLOW_UNCONFIGURED_NIC requires MEDFORD"
306 #endif /* EFSYS_OPT_ALLOW_UNCONFIGURED_NIC */
308 #if EFSYS_OPT_RX_PACKED_STREAM
309 /* Support packed stream mode */
310 # if !(EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
311 # error "PACKED_STREAM requires HUNTINGTON or MEDFORD"
315 #endif /* _SYS_EFX_CHECK_H */