18eb6488eSEric Joyner /****************************************************************************** 28eb6488eSEric Joyner 38455e365SKevin Bowling Copyright (c) 2001-2020, Intel Corporation 48eb6488eSEric Joyner All rights reserved. 58eb6488eSEric Joyner 68eb6488eSEric Joyner Redistribution and use in source and binary forms, with or without 78eb6488eSEric Joyner modification, are permitted provided that the following conditions are met: 88eb6488eSEric Joyner 98eb6488eSEric Joyner 1. Redistributions of source code must retain the above copyright notice, 108eb6488eSEric Joyner this list of conditions and the following disclaimer. 118eb6488eSEric Joyner 128eb6488eSEric Joyner 2. Redistributions in binary form must reproduce the above copyright 138eb6488eSEric Joyner notice, this list of conditions and the following disclaimer in the 148eb6488eSEric Joyner documentation and/or other materials provided with the distribution. 158eb6488eSEric Joyner 168eb6488eSEric Joyner 3. Neither the name of the Intel Corporation nor the names of its 178eb6488eSEric Joyner contributors may be used to endorse or promote products derived from 188eb6488eSEric Joyner this software without specific prior written permission. 198eb6488eSEric Joyner 208eb6488eSEric Joyner THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 218eb6488eSEric Joyner AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 228eb6488eSEric Joyner IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 238eb6488eSEric Joyner ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 248eb6488eSEric Joyner LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 258eb6488eSEric Joyner CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 268eb6488eSEric Joyner SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 278eb6488eSEric Joyner INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 288eb6488eSEric Joyner CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 298eb6488eSEric Joyner ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 308eb6488eSEric Joyner POSSIBILITY OF SUCH DAMAGE. 318eb6488eSEric Joyner 328eb6488eSEric Joyner ******************************************************************************/ 338eb6488eSEric Joyner 348eb6488eSEric Joyner 358eb6488eSEric Joyner #ifndef _IXGBE_FEATURES_H_ 368eb6488eSEric Joyner #define _IXGBE_FEATURES_H_ 378eb6488eSEric Joyner 388eb6488eSEric Joyner /* 398eb6488eSEric Joyner * Feature defines. Eventually, we'd like to get to a point where we 408eb6488eSEric Joyner * can remove MAC/Phy type checks scattered throughout the code in 418eb6488eSEric Joyner * favor of checking these feature flags. If the feature expects OS 428eb6488eSEric Joyner * support, make sure to add an #undef below if expected to run on 438eb6488eSEric Joyner * OSs that don't support said feature. 448eb6488eSEric Joyner */ 458eb6488eSEric Joyner #define IXGBE_FEATURE_VF (u32)(1 << 0) 468eb6488eSEric Joyner #define IXGBE_FEATURE_SRIOV (u32)(1 << 1) 478eb6488eSEric Joyner #define IXGBE_FEATURE_RSS (u32)(1 << 2) 488eb6488eSEric Joyner #define IXGBE_FEATURE_NETMAP (u32)(1 << 3) 498eb6488eSEric Joyner #define IXGBE_FEATURE_FAN_FAIL (u32)(1 << 4) 508eb6488eSEric Joyner #define IXGBE_FEATURE_TEMP_SENSOR (u32)(1 << 5) 518eb6488eSEric Joyner #define IXGBE_FEATURE_BYPASS (u32)(1 << 6) 528eb6488eSEric Joyner #define IXGBE_FEATURE_LEGACY_TX (u32)(1 << 7) 538eb6488eSEric Joyner #define IXGBE_FEATURE_FDIR (u32)(1 << 8) 548eb6488eSEric Joyner #define IXGBE_FEATURE_MSI (u32)(1 << 9) 558eb6488eSEric Joyner #define IXGBE_FEATURE_MSIX (u32)(1 << 10) 568eb6488eSEric Joyner #define IXGBE_FEATURE_EEE (u32)(1 << 11) 578eb6488eSEric Joyner #define IXGBE_FEATURE_LEGACY_IRQ (u32)(1 << 12) 588eb6488eSEric Joyner #define IXGBE_FEATURE_NEEDS_CTXD (u32)(1 << 13) 59*f72de14eSKevin Bowling #define IXGBE_FEATURE_RECOVERY_MODE (u32)(1 << 15) 608eb6488eSEric Joyner 618eb6488eSEric Joyner /* Check for OS support. Undefine features if not included in the OS */ 628eb6488eSEric Joyner #ifndef PCI_IOV 638eb6488eSEric Joyner #undef IXGBE_FEATURE_SRIOV 648eb6488eSEric Joyner #define IXGBE_FEATURE_SRIOV 0 658eb6488eSEric Joyner #endif 668eb6488eSEric Joyner 678eb6488eSEric Joyner #ifndef RSS 688eb6488eSEric Joyner #undef IXGBE_FEATURE_RSS 698eb6488eSEric Joyner #define IXGBE_FEATURE_RSS 0 708eb6488eSEric Joyner #endif 718eb6488eSEric Joyner 728eb6488eSEric Joyner #ifndef DEV_NETMAP 738eb6488eSEric Joyner #undef IXGBE_FEATURE_NETMAP 748eb6488eSEric Joyner #define IXGBE_FEATURE_NETMAP 0 758eb6488eSEric Joyner #endif 768eb6488eSEric Joyner 778eb6488eSEric Joyner #endif /* _IXGBE_FEATURES_H_ */ 78