19c80d176SSepherosa Ziehau /****************************************************************************** 29c80d176SSepherosa Ziehau 3*01a55482SSepherosa Ziehau Copyright (c) 2001-2019, Intel Corporation 49c80d176SSepherosa Ziehau All rights reserved. 59c80d176SSepherosa Ziehau 69c80d176SSepherosa Ziehau Redistribution and use in source and binary forms, with or without 79c80d176SSepherosa Ziehau modification, are permitted provided that the following conditions are met: 89c80d176SSepherosa Ziehau 99c80d176SSepherosa Ziehau 1. Redistributions of source code must retain the above copyright notice, 109c80d176SSepherosa Ziehau this list of conditions and the following disclaimer. 119c80d176SSepherosa Ziehau 129c80d176SSepherosa Ziehau 2. Redistributions in binary form must reproduce the above copyright 139c80d176SSepherosa Ziehau notice, this list of conditions and the following disclaimer in the 149c80d176SSepherosa Ziehau documentation and/or other materials provided with the distribution. 159c80d176SSepherosa Ziehau 169c80d176SSepherosa Ziehau 3. Neither the name of the Intel Corporation nor the names of its 179c80d176SSepherosa Ziehau contributors may be used to endorse or promote products derived from 189c80d176SSepherosa Ziehau this software without specific prior written permission. 199c80d176SSepherosa Ziehau 209c80d176SSepherosa Ziehau THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 219c80d176SSepherosa Ziehau AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 229c80d176SSepherosa Ziehau IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 239c80d176SSepherosa Ziehau ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 249c80d176SSepherosa Ziehau LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 259c80d176SSepherosa Ziehau CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 269c80d176SSepherosa Ziehau SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 279c80d176SSepherosa Ziehau INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 289c80d176SSepherosa Ziehau CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 299c80d176SSepherosa Ziehau ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 309c80d176SSepherosa Ziehau POSSIBILITY OF SUCH DAMAGE. 319c80d176SSepherosa Ziehau 329c80d176SSepherosa Ziehau ******************************************************************************/ 3374dc3754SSepherosa Ziehau /*$FreeBSD$*/ 349c80d176SSepherosa Ziehau 359c80d176SSepherosa Ziehau #ifndef _E1000_82571_H_ 369c80d176SSepherosa Ziehau #define _E1000_82571_H_ 379c80d176SSepherosa Ziehau 389c80d176SSepherosa Ziehau #define ID_LED_RESERVED_F746 0xF746 399c80d176SSepherosa Ziehau #define ID_LED_DEFAULT_82573 ((ID_LED_DEF1_DEF2 << 12) | \ 409c80d176SSepherosa Ziehau (ID_LED_OFF1_ON2 << 8) | \ 419c80d176SSepherosa Ziehau (ID_LED_DEF1_DEF2 << 4) | \ 429c80d176SSepherosa Ziehau (ID_LED_DEF1_DEF2)) 439c80d176SSepherosa Ziehau 449c80d176SSepherosa Ziehau #define E1000_GCR_L1_ACT_WITHOUT_L0S_RX 0x08000000 456a5a645eSSepherosa Ziehau #define AN_RETRY_COUNT 5 /* Autoneg Retry Count value */ 469c80d176SSepherosa Ziehau 479c80d176SSepherosa Ziehau /* Intr Throttling - RW */ 489c80d176SSepherosa Ziehau #define E1000_EITR_82574(_n) (0x000E8 + (0x4 * (_n))) 499c80d176SSepherosa Ziehau 509c80d176SSepherosa Ziehau #define E1000_EIAC_82574 0x000DC /* Ext. Interrupt Auto Clear - RW */ 519c80d176SSepherosa Ziehau #define E1000_EIAC_MASK_82574 0x01F00000 529c80d176SSepherosa Ziehau 53379ebbe7SSepherosa Ziehau #define E1000_IVAR_INT_ALLOC_VALID 0x8 54379ebbe7SSepherosa Ziehau 554be59a01SSepherosa Ziehau /* Manageability Operation Mode mask */ 564be59a01SSepherosa Ziehau #define E1000_NVM_INIT_CTRL2_MNGM 0x6000 579c80d176SSepherosa Ziehau 586a5a645eSSepherosa Ziehau #define E1000_BASE1000T_STATUS 10 596a5a645eSSepherosa Ziehau #define E1000_IDLE_ERROR_COUNT_MASK 0xFF 606a5a645eSSepherosa Ziehau #define E1000_RECEIVE_ERROR_COUNTER 21 616a5a645eSSepherosa Ziehau #define E1000_RECEIVE_ERROR_MAX 0xFFFF 626a5a645eSSepherosa Ziehau bool e1000_check_phy_82574(struct e1000_hw *hw); 639c80d176SSepherosa Ziehau bool e1000_get_laa_state_82571(struct e1000_hw *hw); 649c80d176SSepherosa Ziehau void e1000_set_laa_state_82571(struct e1000_hw *hw, bool state); 659c80d176SSepherosa Ziehau 669c80d176SSepherosa Ziehau #endif 67