175eba5b6SRobert Mustacchi /******************************************************************************
275eba5b6SRobert Mustacchi 
3*49b78600SRobert Mustacchi   Copyright (c) 2001-2015, Intel Corporation
475eba5b6SRobert Mustacchi   All rights reserved.
575eba5b6SRobert Mustacchi 
675eba5b6SRobert Mustacchi   Redistribution and use in source and binary forms, with or without
775eba5b6SRobert Mustacchi   modification, are permitted provided that the following conditions are met:
875eba5b6SRobert Mustacchi 
975eba5b6SRobert Mustacchi    1. Redistributions of source code must retain the above copyright notice,
1075eba5b6SRobert Mustacchi       this list of conditions and the following disclaimer.
1175eba5b6SRobert Mustacchi 
1275eba5b6SRobert Mustacchi    2. Redistributions in binary form must reproduce the above copyright
1375eba5b6SRobert Mustacchi       notice, this list of conditions and the following disclaimer in the
1475eba5b6SRobert Mustacchi       documentation and/or other materials provided with the distribution.
1575eba5b6SRobert Mustacchi 
1675eba5b6SRobert Mustacchi    3. Neither the name of the Intel Corporation nor the names of its
1775eba5b6SRobert Mustacchi       contributors may be used to endorse or promote products derived from
1875eba5b6SRobert Mustacchi       this software without specific prior written permission.
1975eba5b6SRobert Mustacchi 
2075eba5b6SRobert Mustacchi   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
2175eba5b6SRobert Mustacchi   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2275eba5b6SRobert Mustacchi   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2375eba5b6SRobert Mustacchi   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
2475eba5b6SRobert Mustacchi   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2575eba5b6SRobert Mustacchi   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2675eba5b6SRobert Mustacchi   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2775eba5b6SRobert Mustacchi   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2875eba5b6SRobert Mustacchi   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2975eba5b6SRobert Mustacchi   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
3075eba5b6SRobert Mustacchi   POSSIBILITY OF SUCH DAMAGE.
3175eba5b6SRobert Mustacchi 
3275eba5b6SRobert Mustacchi ******************************************************************************/
3375eba5b6SRobert Mustacchi /*$FreeBSD$*/
3475eba5b6SRobert Mustacchi 
3575eba5b6SRobert Mustacchi #ifndef _E1000_82571_H_
3675eba5b6SRobert Mustacchi #define _E1000_82571_H_
3775eba5b6SRobert Mustacchi 
38c124a83eSRobert Mustacchi #define ID_LED_RESERVED_F746	0xF746
39c124a83eSRobert Mustacchi #define ID_LED_DEFAULT_82573	((ID_LED_DEF1_DEF2 << 12) | \
40c124a83eSRobert Mustacchi 				 (ID_LED_OFF1_ON2  <<  8) | \
41c124a83eSRobert Mustacchi 				 (ID_LED_DEF1_DEF2 <<  4) | \
42c124a83eSRobert Mustacchi 				 (ID_LED_DEF1_DEF2))
4375eba5b6SRobert Mustacchi 
44c124a83eSRobert Mustacchi #define E1000_GCR_L1_ACT_WITHOUT_L0S_RX	0x08000000
45c124a83eSRobert Mustacchi #define AN_RETRY_COUNT		5 /* Autoneg Retry Count value */
4675eba5b6SRobert Mustacchi 
4775eba5b6SRobert Mustacchi /* Intr Throttling - RW */
48c124a83eSRobert Mustacchi #define E1000_EITR_82574(_n)	(0x000E8 + (0x4 * (_n)))
4975eba5b6SRobert Mustacchi 
50c124a83eSRobert Mustacchi #define E1000_EIAC_82574	0x000DC /* Ext. Interrupt Auto Clear - RW */
51c124a83eSRobert Mustacchi #define E1000_EIAC_MASK_82574	0x01F00000
5275eba5b6SRobert Mustacchi 
53c124a83eSRobert Mustacchi #define E1000_IVAR_INT_ALLOC_VALID	0x8
5475eba5b6SRobert Mustacchi 
55c124a83eSRobert Mustacchi /* Manageability Operation Mode mask */
56c124a83eSRobert Mustacchi #define E1000_NVM_INIT_CTRL2_MNGM	0x6000
5775eba5b6SRobert Mustacchi 
58c124a83eSRobert Mustacchi #define E1000_BASE1000T_STATUS		10
59c124a83eSRobert Mustacchi #define E1000_IDLE_ERROR_COUNT_MASK	0xFF
60c124a83eSRobert Mustacchi #define E1000_RECEIVE_ERROR_COUNTER	21
61c124a83eSRobert Mustacchi #define E1000_RECEIVE_ERROR_MAX		0xFFFF
6275eba5b6SRobert Mustacchi bool e1000_check_phy_82574(struct e1000_hw *hw);
6375eba5b6SRobert Mustacchi bool e1000_get_laa_state_82571(struct e1000_hw *hw);
6475eba5b6SRobert Mustacchi void e1000_set_laa_state_82571(struct e1000_hw *hw, bool state);
6575eba5b6SRobert Mustacchi 
6675eba5b6SRobert Mustacchi #endif
67