The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/dev/sfxge/common/efx_check.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*-
    2  * Copyright (c) 2012-2016 Solarflare Communications Inc.
    3  * All rights reserved.
    4  *
    5  * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions are met:
    7  *
    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.
   13  *
   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.
   25  *
   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.
   29  *
   30  * $FreeBSD$
   31  */
   32 
   33 #ifndef _SYS_EFX_CHECK_H
   34 #define _SYS_EFX_CHECK_H
   35 
   36 #include "efsys.h"
   37 
   38 /*
   39  * Check that the efsys.h header in client code has a valid combination of
   40  * EFSYS_OPT_xxx options.
   41  *
   42  * NOTE: Keep checks for obsolete options here to ensure that they are removed
   43  * from client code (and do not reappear in merges from other branches).
   44  */
   45 
   46 #ifdef EFSYS_OPT_FALCON
   47 # error "FALCON is obsolete and is not supported."
   48 #endif
   49 
   50 /* Support NVRAM based boot config */
   51 #if EFSYS_OPT_BOOTCFG
   52 # if !EFSYS_OPT_NVRAM
   53 #  error "BOOTCFG requires NVRAM"
   54 # endif
   55 #endif /* EFSYS_OPT_BOOTCFG */
   56 
   57 /* Verify chip implements accessed registers */
   58 #if EFSYS_OPT_CHECK_REG
   59 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
   60         EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
   61 #  error "CHECK_REG requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
   62 # endif
   63 #endif /* EFSYS_OPT_CHECK_REG */
   64 
   65 /* Decode fatal errors */
   66 #if EFSYS_OPT_DECODE_INTR_FATAL
   67 # if !EFSYS_OPT_SIENA
   68 #  error "INTR_FATAL requires SIENA"
   69 # endif
   70 #endif /* EFSYS_OPT_DECODE_INTR_FATAL */
   71 
   72 /* Support diagnostic hardware tests */
   73 #if EFSYS_OPT_DIAG
   74 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
   75         EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
   76 #  error "DIAG requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
   77 # endif
   78 #endif /* EFSYS_OPT_DIAG */
   79 
   80 /* Support optimized EVQ data access */
   81 #if EFSYS_OPT_EV_PREFETCH
   82 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
   83         EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
   84 #  error "EV_PREFETCH requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
   85 # endif
   86 #endif /* EFSYS_OPT_EV_PREFETCH */
   87 
   88 #ifdef EFSYS_OPT_FALCON_NIC_CFG_OVERRIDE
   89 # error "FALCON_NIC_CFG_OVERRIDE is obsolete and is not supported."
   90 #endif
   91 
   92 /* Support hardware packet filters */
   93 #if EFSYS_OPT_FILTER
   94 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
   95         EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
   96 #  error "FILTER requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
   97 # endif
   98 #endif /* EFSYS_OPT_FILTER */
   99 
  100 #if (EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
  101 # if !EFSYS_OPT_FILTER
  102 #  error "HUNTINGTON or MEDFORD or MEDFORD2 requires FILTER"
  103 # endif
  104 #endif /* EFSYS_OPT_HUNTINGTON */
  105 
  106 /* Support hardware loopback modes */
  107 #if EFSYS_OPT_LOOPBACK
  108 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
  109         EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
  110 #  error "LOOPBACK requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
  111 # endif
  112 #endif /* EFSYS_OPT_LOOPBACK */
  113 
  114 #ifdef EFSYS_OPT_MAC_FALCON_GMAC
  115 # error "MAC_FALCON_GMAC is obsolete and is not supported."
  116 #endif
  117 
  118 #ifdef EFSYS_OPT_MAC_FALCON_XMAC
  119 # error "MAC_FALCON_XMAC is obsolete and is not supported."
  120 #endif
  121 
  122 /* Support MAC statistics */
  123 #if EFSYS_OPT_MAC_STATS
  124 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
  125         EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
  126 #  error "MAC_STATS requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
  127 # endif
  128 #endif /* EFSYS_OPT_MAC_STATS */
  129 
  130 /* Support management controller messages */
  131 #if EFSYS_OPT_MCDI
  132 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
  133         EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
  134 #  error "MCDI requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
  135 # endif
  136 #endif /* EFSYS_OPT_MCDI */
  137 
  138 #if (EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
  139         EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
  140 # if !EFSYS_OPT_MCDI
  141 #  error "SIENA or HUNTINGTON or MEDFORD or MEDFORD2 requires MCDI"
  142 # endif
  143 #endif
  144 
  145 /* Support MCDI logging */
  146 #if EFSYS_OPT_MCDI_LOGGING
  147 # if !EFSYS_OPT_MCDI
  148 #  error "MCDI_LOGGING requires MCDI"
  149 # endif
  150 #endif /* EFSYS_OPT_MCDI_LOGGING */
  151 
  152 /* Support MCDI proxy authorization */
  153 #if EFSYS_OPT_MCDI_PROXY_AUTH
  154 # if !EFSYS_OPT_MCDI
  155 #  error "MCDI_PROXY_AUTH requires MCDI"
  156 # endif
  157 #endif /* EFSYS_OPT_MCDI_PROXY_AUTH */
  158 
  159 #ifdef EFSYS_OPT_MON_LM87
  160 # error "MON_LM87 is obsolete and is not supported."
  161 #endif
  162 
  163 #ifdef EFSYS_OPT_MON_MAX6647
  164 # error "MON_MAX6647 is obsolete and is not supported."
  165 #endif
  166 
  167 #ifdef EFSYS_OPT_MON_NULL
  168 # error "MON_NULL is obsolete and is not supported."
  169 #endif
  170 
  171 #ifdef EFSYS_OPT_MON_SIENA
  172 #  error "MON_SIENA is obsolete (replaced by MON_MCDI)."
  173 #endif
  174 
  175 #ifdef EFSYS_OPT_MON_HUNTINGTON
  176 #  error "MON_HUNTINGTON is obsolete (replaced by MON_MCDI)."
  177 #endif
  178 
  179 /* Support monitor statistics (voltage/temperature) */
  180 #if EFSYS_OPT_MON_STATS
  181 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
  182         EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
  183 #  error "MON_STATS requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
  184 # endif
  185 #endif /* EFSYS_OPT_MON_STATS */
  186 
  187 /* Support Monitor via mcdi */
  188 #if EFSYS_OPT_MON_MCDI
  189 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
  190         EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
  191 #  error "MON_MCDI requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
  192 # endif
  193 #endif /* EFSYS_OPT_MON_MCDI*/
  194 
  195 /* Support printable names for statistics */
  196 #if EFSYS_OPT_NAMES
  197 # if !(EFSYS_OPT_LOOPBACK || EFSYS_OPT_MAC_STATS || EFSYS_OPT_MCDI || \
  198         EFSYS_MON_STATS || EFSYS_OPT_PHY_STATS || EFSYS_OPT_QSTATS)
  199 #  error "NAMES requires LOOPBACK or xxxSTATS or MCDI"
  200 # endif
  201 #endif /* EFSYS_OPT_NAMES */
  202 
  203 /* Support non volatile configuration */
  204 #if EFSYS_OPT_NVRAM
  205 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
  206         EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
  207 #  error "NVRAM requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
  208 # endif
  209 #endif /* EFSYS_OPT_NVRAM */
  210 
  211 #if EFSYS_OPT_IMAGE_LAYOUT
  212 /* Support signed image layout handling */
  213 # if !(EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
  214 #  error "IMAGE_LAYOUT requires MEDFORD or MEDFORD2"
  215 # endif
  216 #endif /* EFSYS_OPT_IMAGE_LAYOUT */
  217 
  218 #ifdef EFSYS_OPT_NVRAM_FALCON_BOOTROM
  219 # error "NVRAM_FALCON_BOOTROM is obsolete and is not supported."
  220 #endif
  221 
  222 #ifdef EFSYS_OPT_NVRAM_SFT9001
  223 # error "NVRAM_SFT9001 is obsolete and is not supported."
  224 #endif
  225 
  226 #ifdef EFSYS_OPT_NVRAM_SFX7101
  227 # error "NVRAM_SFX7101 is obsolete and is not supported."
  228 #endif
  229 
  230 #ifdef EFSYS_OPT_PCIE_TUNE
  231 # error "PCIE_TUNE is obsolete and is not supported."
  232 #endif
  233 
  234 #ifdef EFSYS_OPT_PHY_BIST
  235 # error "PHY_BIST is obsolete (replaced by BIST)."
  236 #endif
  237 
  238 /* Support PHY flags */
  239 #if EFSYS_OPT_PHY_FLAGS
  240 # if !EFSYS_OPT_SIENA
  241 #  error "PHY_FLAGS requires SIENA"
  242 # endif
  243 #endif /* EFSYS_OPT_PHY_FLAGS */
  244 
  245 /* Support for PHY LED control */
  246 #if EFSYS_OPT_PHY_LED_CONTROL
  247 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
  248         EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
  249 #  error "PHY_LED_CONTROL requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
  250 # endif
  251 #endif /* EFSYS_OPT_PHY_LED_CONTROL */
  252 
  253 #ifdef EFSYS_OPT_PHY_NULL
  254 # error "PHY_NULL is obsolete and is not supported."
  255 #endif
  256 
  257 #ifdef EFSYS_OPT_PHY_PM8358
  258 # error "PHY_PM8358 is obsolete and is not supported."
  259 #endif
  260 
  261 #ifdef EFSYS_OPT_PHY_PROPS
  262 # error "PHY_PROPS is obsolete and is not supported."
  263 #endif
  264 
  265 #ifdef EFSYS_OPT_PHY_QT2022C2
  266 # error "PHY_QT2022C2 is obsolete and is not supported."
  267 #endif
  268 
  269 #ifdef EFSYS_OPT_PHY_QT2025C
  270 # error "PHY_QT2025C is obsolete and is not supported."
  271 #endif
  272 
  273 #ifdef EFSYS_OPT_PHY_SFT9001
  274 # error "PHY_SFT9001 is obsolete and is not supported."
  275 #endif
  276 
  277 #ifdef EFSYS_OPT_PHY_SFX7101
  278 # error "PHY_SFX7101 is obsolete and is not supported."
  279 #endif
  280 
  281 /* Support PHY statistics */
  282 #if EFSYS_OPT_PHY_STATS
  283 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
  284 #  error "PHY_STATS requires SIENA or HUNTINGTON or MEDFORD"
  285 # endif
  286 #endif /* EFSYS_OPT_PHY_STATS */
  287 
  288 #ifdef EFSYS_OPT_PHY_TXC43128
  289 # error "PHY_TXC43128 is obsolete and is not supported."
  290 #endif
  291 
  292 /* Support EVQ/RXQ/TXQ statistics */
  293 #if EFSYS_OPT_QSTATS
  294 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
  295         EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
  296 #  error "QSTATS requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
  297 # endif
  298 #endif /* EFSYS_OPT_QSTATS */
  299 
  300 #ifdef EFSYS_OPT_RX_HDR_SPLIT
  301 # error "RX_HDR_SPLIT is obsolete and is not supported"
  302 #endif
  303 
  304 /* Support receive scaling (RSS) */
  305 #if EFSYS_OPT_RX_SCALE
  306 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
  307         EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
  308 #  error "RX_SCALE requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
  309 # endif
  310 #endif /* EFSYS_OPT_RX_SCALE */
  311 
  312 /* Support receive scatter DMA */
  313 #if EFSYS_OPT_RX_SCATTER
  314 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
  315         EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
  316 #  error "RX_SCATTER requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
  317 # endif
  318 #endif /* EFSYS_OPT_RX_SCATTER */
  319 
  320 #ifdef EFSYS_OPT_STAT_NAME
  321 # error "STAT_NAME is obsolete (replaced by NAMES)."
  322 #endif
  323 
  324 /* Support PCI Vital Product Data (VPD) */
  325 #if EFSYS_OPT_VPD
  326 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
  327         EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
  328 #  error "VPD requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
  329 # endif
  330 #endif /* EFSYS_OPT_VPD */
  331 
  332 /* Support Wake on LAN */
  333 #ifdef EFSYS_OPT_WOL
  334 # error "WOL is obsolete and is not supported"
  335 #endif /* EFSYS_OPT_WOL */
  336 
  337 #ifdef EFSYS_OPT_MCAST_FILTER_LIST
  338 #  error "MCAST_FILTER_LIST is obsolete and is not supported"
  339 #endif
  340 
  341 /* Support BIST */
  342 #if EFSYS_OPT_BIST
  343 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
  344         EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
  345 #  error "BIST requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
  346 # endif
  347 #endif /* EFSYS_OPT_BIST */
  348 
  349 /* Support MCDI licensing API */
  350 #if EFSYS_OPT_LICENSING
  351 # if !EFSYS_OPT_MCDI
  352 #  error "LICENSING requires MCDI"
  353 # endif
  354 # if !EFSYS_HAS_UINT64
  355 #  error "LICENSING requires UINT64"
  356 # endif
  357 #endif /* EFSYS_OPT_LICENSING */
  358 
  359 /* Support adapters with missing static config (for factory use only) */
  360 #if EFSYS_OPT_ALLOW_UNCONFIGURED_NIC
  361 # if !(EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
  362 #  error "ALLOW_UNCONFIGURED_NIC requires MEDFORD or MEDFORD2"
  363 # endif
  364 #endif /* EFSYS_OPT_ALLOW_UNCONFIGURED_NIC */
  365 
  366 /* Support packed stream mode */
  367 #if EFSYS_OPT_RX_PACKED_STREAM
  368 # if !(EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
  369 #  error "PACKED_STREAM requires HUNTINGTON or MEDFORD or MEDFORD2"
  370 # endif
  371 #endif
  372 
  373 #if EFSYS_OPT_RX_ES_SUPER_BUFFER
  374 /* Support equal stride super-buffer mode */
  375 # if !(EFSYS_OPT_MEDFORD2)
  376 #  error "ES_SUPER_BUFFER requires MEDFORD2"
  377 # endif
  378 #endif
  379 
  380 /* Support hardware assistance for tunnels */
  381 #if EFSYS_OPT_TUNNEL
  382 # if !(EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
  383 #  error "TUNNEL requires MEDFORD or MEDFORD2"
  384 # endif
  385 #endif /* EFSYS_OPT_TUNNEL */
  386 
  387 #if EFSYS_OPT_FW_SUBVARIANT_AWARE
  388 /* Advertise that the driver is firmware subvariant aware */
  389 # if !(EFSYS_OPT_MEDFORD2)
  390 #  error "FW_SUBVARIANT_AWARE requires MEDFORD2"
  391 # endif
  392 #endif
  393 
  394 #endif /* _SYS_EFX_CHECK_H */

Cache object: ff157d2dcb3afb18a2542fef6376d337


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.