xref: /freebsd/sys/dev/e1000/e1000_hw.h (revision 7c669ab6ccbab2eb94bbcb942a1461f45fba519e)
18cfa0ad2SJack F Vogel /******************************************************************************
28cfa0ad2SJack F Vogel 
3*7c669ab6SSean Bruno   Copyright (c) 2001-2015, Intel Corporation
48cfa0ad2SJack F Vogel   All rights reserved.
58cfa0ad2SJack F Vogel 
68cfa0ad2SJack F Vogel   Redistribution and use in source and binary forms, with or without
78cfa0ad2SJack F Vogel   modification, are permitted provided that the following conditions are met:
88cfa0ad2SJack F Vogel 
98cfa0ad2SJack F Vogel    1. Redistributions of source code must retain the above copyright notice,
108cfa0ad2SJack F Vogel       this list of conditions and the following disclaimer.
118cfa0ad2SJack F Vogel 
128cfa0ad2SJack F Vogel    2. Redistributions in binary form must reproduce the above copyright
138cfa0ad2SJack F Vogel       notice, this list of conditions and the following disclaimer in the
148cfa0ad2SJack F Vogel       documentation and/or other materials provided with the distribution.
158cfa0ad2SJack F Vogel 
168cfa0ad2SJack F Vogel    3. Neither the name of the Intel Corporation nor the names of its
178cfa0ad2SJack F Vogel       contributors may be used to endorse or promote products derived from
188cfa0ad2SJack F Vogel       this software without specific prior written permission.
198cfa0ad2SJack F Vogel 
208cfa0ad2SJack F Vogel   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
218cfa0ad2SJack F Vogel   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
228cfa0ad2SJack F Vogel   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
238cfa0ad2SJack F Vogel   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
248cfa0ad2SJack F Vogel   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
258cfa0ad2SJack F Vogel   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
268cfa0ad2SJack F Vogel   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
278cfa0ad2SJack F Vogel   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
288cfa0ad2SJack F Vogel   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
298cfa0ad2SJack F Vogel   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
308cfa0ad2SJack F Vogel   POSSIBILITY OF SUCH DAMAGE.
318cfa0ad2SJack F Vogel 
328cfa0ad2SJack F Vogel ******************************************************************************/
338cfa0ad2SJack F Vogel /*$FreeBSD$*/
348cfa0ad2SJack F Vogel 
358cfa0ad2SJack F Vogel #ifndef _E1000_HW_H_
368cfa0ad2SJack F Vogel #define _E1000_HW_H_
378cfa0ad2SJack F Vogel 
388cfa0ad2SJack F Vogel #include "e1000_osdep.h"
398cfa0ad2SJack F Vogel #include "e1000_regs.h"
408cfa0ad2SJack F Vogel #include "e1000_defines.h"
418cfa0ad2SJack F Vogel 
428cfa0ad2SJack F Vogel struct e1000_hw;
438cfa0ad2SJack F Vogel 
448cfa0ad2SJack F Vogel #define E1000_DEV_ID_82542			0x1000
458cfa0ad2SJack F Vogel #define E1000_DEV_ID_82543GC_FIBER		0x1001
468cfa0ad2SJack F Vogel #define E1000_DEV_ID_82543GC_COPPER		0x1004
478cfa0ad2SJack F Vogel #define E1000_DEV_ID_82544EI_COPPER		0x1008
488cfa0ad2SJack F Vogel #define E1000_DEV_ID_82544EI_FIBER		0x1009
498cfa0ad2SJack F Vogel #define E1000_DEV_ID_82544GC_COPPER		0x100C
508cfa0ad2SJack F Vogel #define E1000_DEV_ID_82544GC_LOM		0x100D
518cfa0ad2SJack F Vogel #define E1000_DEV_ID_82540EM			0x100E
528cfa0ad2SJack F Vogel #define E1000_DEV_ID_82540EM_LOM		0x1015
538cfa0ad2SJack F Vogel #define E1000_DEV_ID_82540EP_LOM		0x1016
548cfa0ad2SJack F Vogel #define E1000_DEV_ID_82540EP			0x1017
558cfa0ad2SJack F Vogel #define E1000_DEV_ID_82540EP_LP			0x101E
568cfa0ad2SJack F Vogel #define E1000_DEV_ID_82545EM_COPPER		0x100F
578cfa0ad2SJack F Vogel #define E1000_DEV_ID_82545EM_FIBER		0x1011
588cfa0ad2SJack F Vogel #define E1000_DEV_ID_82545GM_COPPER		0x1026
598cfa0ad2SJack F Vogel #define E1000_DEV_ID_82545GM_FIBER		0x1027
608cfa0ad2SJack F Vogel #define E1000_DEV_ID_82545GM_SERDES		0x1028
618cfa0ad2SJack F Vogel #define E1000_DEV_ID_82546EB_COPPER		0x1010
628cfa0ad2SJack F Vogel #define E1000_DEV_ID_82546EB_FIBER		0x1012
638cfa0ad2SJack F Vogel #define E1000_DEV_ID_82546EB_QUAD_COPPER	0x101D
648cfa0ad2SJack F Vogel #define E1000_DEV_ID_82546GB_COPPER		0x1079
658cfa0ad2SJack F Vogel #define E1000_DEV_ID_82546GB_FIBER		0x107A
668cfa0ad2SJack F Vogel #define E1000_DEV_ID_82546GB_SERDES		0x107B
678cfa0ad2SJack F Vogel #define E1000_DEV_ID_82546GB_PCIE		0x108A
688cfa0ad2SJack F Vogel #define E1000_DEV_ID_82546GB_QUAD_COPPER	0x1099
698cfa0ad2SJack F Vogel #define E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3	0x10B5
708cfa0ad2SJack F Vogel #define E1000_DEV_ID_82541EI			0x1013
718cfa0ad2SJack F Vogel #define E1000_DEV_ID_82541EI_MOBILE		0x1018
728cfa0ad2SJack F Vogel #define E1000_DEV_ID_82541ER_LOM		0x1014
738cfa0ad2SJack F Vogel #define E1000_DEV_ID_82541ER			0x1078
748cfa0ad2SJack F Vogel #define E1000_DEV_ID_82541GI			0x1076
758cfa0ad2SJack F Vogel #define E1000_DEV_ID_82541GI_LF			0x107C
768cfa0ad2SJack F Vogel #define E1000_DEV_ID_82541GI_MOBILE		0x1077
778cfa0ad2SJack F Vogel #define E1000_DEV_ID_82547EI			0x1019
788cfa0ad2SJack F Vogel #define E1000_DEV_ID_82547EI_MOBILE		0x101A
798cfa0ad2SJack F Vogel #define E1000_DEV_ID_82547GI			0x1075
808cfa0ad2SJack F Vogel #define E1000_DEV_ID_82571EB_COPPER		0x105E
818cfa0ad2SJack F Vogel #define E1000_DEV_ID_82571EB_FIBER		0x105F
828cfa0ad2SJack F Vogel #define E1000_DEV_ID_82571EB_SERDES		0x1060
838cfa0ad2SJack F Vogel #define E1000_DEV_ID_82571EB_SERDES_DUAL	0x10D9
848cfa0ad2SJack F Vogel #define E1000_DEV_ID_82571EB_SERDES_QUAD	0x10DA
858cfa0ad2SJack F Vogel #define E1000_DEV_ID_82571EB_QUAD_COPPER	0x10A4
868cfa0ad2SJack F Vogel #define E1000_DEV_ID_82571PT_QUAD_COPPER	0x10D5
878cfa0ad2SJack F Vogel #define E1000_DEV_ID_82571EB_QUAD_FIBER		0x10A5
888cfa0ad2SJack F Vogel #define E1000_DEV_ID_82571EB_QUAD_COPPER_LP	0x10BC
898cfa0ad2SJack F Vogel #define E1000_DEV_ID_82572EI_COPPER		0x107D
908cfa0ad2SJack F Vogel #define E1000_DEV_ID_82572EI_FIBER		0x107E
918cfa0ad2SJack F Vogel #define E1000_DEV_ID_82572EI_SERDES		0x107F
928cfa0ad2SJack F Vogel #define E1000_DEV_ID_82572EI			0x10B9
938cfa0ad2SJack F Vogel #define E1000_DEV_ID_82573E			0x108B
948cfa0ad2SJack F Vogel #define E1000_DEV_ID_82573E_IAMT		0x108C
958cfa0ad2SJack F Vogel #define E1000_DEV_ID_82573L			0x109A
968cfa0ad2SJack F Vogel #define E1000_DEV_ID_82574L			0x10D3
97d035aa2dSJack F Vogel #define E1000_DEV_ID_82574LA			0x10F6
989d81738fSJack F Vogel #define E1000_DEV_ID_82583V			0x150C
998cfa0ad2SJack F Vogel #define E1000_DEV_ID_80003ES2LAN_COPPER_DPT	0x1096
1008cfa0ad2SJack F Vogel #define E1000_DEV_ID_80003ES2LAN_SERDES_DPT	0x1098
1018cfa0ad2SJack F Vogel #define E1000_DEV_ID_80003ES2LAN_COPPER_SPT	0x10BA
1028cfa0ad2SJack F Vogel #define E1000_DEV_ID_80003ES2LAN_SERDES_SPT	0x10BB
1034edd8523SJack F Vogel #define E1000_DEV_ID_ICH8_82567V_3		0x1501
1048cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH8_IGP_M_AMT		0x1049
1058cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH8_IGP_AMT		0x104A
1068cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH8_IGP_C			0x104B
1078cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH8_IFE			0x104C
1088cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH8_IFE_GT		0x10C4
1098cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH8_IFE_G			0x10C5
1108cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH8_IGP_M			0x104D
1118cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH9_IGP_M			0x10BF
1128cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH9_IGP_M_AMT		0x10F5
1138cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH9_IGP_M_V		0x10CB
1148cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH9_IGP_AMT		0x10BD
1158cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH9_BM			0x10E5
1168cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH9_IGP_C			0x294C
1178cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH9_IFE			0x10C0
1188cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH9_IFE_GT		0x10C3
1198cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH9_IFE_G			0x10C2
1208cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH10_R_BM_LM		0x10CC
1218cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH10_R_BM_LF		0x10CD
1228cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH10_R_BM_V		0x10CE
1238cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH10_D_BM_LM		0x10DE
1248cfa0ad2SJack F Vogel #define E1000_DEV_ID_ICH10_D_BM_LF		0x10DF
1257d9119bdSJack F Vogel #define E1000_DEV_ID_ICH10_D_BM_V		0x1525
1269d81738fSJack F Vogel #define E1000_DEV_ID_PCH_M_HV_LM		0x10EA
1279d81738fSJack F Vogel #define E1000_DEV_ID_PCH_M_HV_LC		0x10EB
1289d81738fSJack F Vogel #define E1000_DEV_ID_PCH_D_HV_DM		0x10EF
1299d81738fSJack F Vogel #define E1000_DEV_ID_PCH_D_HV_DC		0x10F0
1307d9119bdSJack F Vogel #define E1000_DEV_ID_PCH2_LV_LM			0x1502
1317d9119bdSJack F Vogel #define E1000_DEV_ID_PCH2_LV_V			0x1503
1326ab6bfe3SJack F Vogel #define E1000_DEV_ID_PCH_LPT_I217_LM		0x153A
1336ab6bfe3SJack F Vogel #define E1000_DEV_ID_PCH_LPT_I217_V		0x153B
1346ab6bfe3SJack F Vogel #define E1000_DEV_ID_PCH_LPTLP_I218_LM		0x155A
1356ab6bfe3SJack F Vogel #define E1000_DEV_ID_PCH_LPTLP_I218_V		0x1559
1368cc64f1eSJack F Vogel #define E1000_DEV_ID_PCH_I218_LM2		0x15A0
1378cc64f1eSJack F Vogel #define E1000_DEV_ID_PCH_I218_V2		0x15A1
1388cc64f1eSJack F Vogel #define E1000_DEV_ID_PCH_I218_LM3		0x15A2 /* Wildcat Point PCH */
1398cc64f1eSJack F Vogel #define E1000_DEV_ID_PCH_I218_V3		0x15A3 /* Wildcat Point PCH */
1408cfa0ad2SJack F Vogel #define E1000_DEV_ID_82576			0x10C9
1418cfa0ad2SJack F Vogel #define E1000_DEV_ID_82576_FIBER		0x10E6
1428cfa0ad2SJack F Vogel #define E1000_DEV_ID_82576_SERDES		0x10E7
1438cfa0ad2SJack F Vogel #define E1000_DEV_ID_82576_QUAD_COPPER		0x10E8
1447d9119bdSJack F Vogel #define E1000_DEV_ID_82576_QUAD_COPPER_ET2	0x1526
145d035aa2dSJack F Vogel #define E1000_DEV_ID_82576_NS			0x150A
1464edd8523SJack F Vogel #define E1000_DEV_ID_82576_NS_SERDES		0x1518
1479d81738fSJack F Vogel #define E1000_DEV_ID_82576_SERDES_QUAD		0x150D
148b8270585SJack F Vogel #define E1000_DEV_ID_82576_VF			0x10CA
1496ab6bfe3SJack F Vogel #define E1000_DEV_ID_82576_VF_HV		0x152D
150f0ecc46dSJack F Vogel #define E1000_DEV_ID_I350_VF			0x1520
1516ab6bfe3SJack F Vogel #define E1000_DEV_ID_I350_VF_HV			0x152F
1528cfa0ad2SJack F Vogel #define E1000_DEV_ID_82575EB_COPPER		0x10A7
1538cfa0ad2SJack F Vogel #define E1000_DEV_ID_82575EB_FIBER_SERDES	0x10A9
1548cfa0ad2SJack F Vogel #define E1000_DEV_ID_82575GB_QUAD_COPPER	0x10D6
1554edd8523SJack F Vogel #define E1000_DEV_ID_82580_COPPER		0x150E
1564edd8523SJack F Vogel #define E1000_DEV_ID_82580_FIBER		0x150F
1574edd8523SJack F Vogel #define E1000_DEV_ID_82580_SERDES		0x1510
1584edd8523SJack F Vogel #define E1000_DEV_ID_82580_SGMII		0x1511
1594edd8523SJack F Vogel #define E1000_DEV_ID_82580_COPPER_DUAL		0x1516
1607d9119bdSJack F Vogel #define E1000_DEV_ID_82580_QUAD_FIBER		0x1527
161f0ecc46dSJack F Vogel #define E1000_DEV_ID_I350_COPPER		0x1521
162f0ecc46dSJack F Vogel #define E1000_DEV_ID_I350_FIBER			0x1522
163f0ecc46dSJack F Vogel #define E1000_DEV_ID_I350_SERDES		0x1523
164f0ecc46dSJack F Vogel #define E1000_DEV_ID_I350_SGMII			0x1524
1654dab5c37SJack F Vogel #define E1000_DEV_ID_I350_DA4			0x1546
166ab5d0362SJack F Vogel #define E1000_DEV_ID_I210_COPPER		0x1533
167ab5d0362SJack F Vogel #define E1000_DEV_ID_I210_COPPER_OEM1		0x1534
168ab5d0362SJack F Vogel #define E1000_DEV_ID_I210_COPPER_IT		0x1535
169ab5d0362SJack F Vogel #define E1000_DEV_ID_I210_FIBER			0x1536
170ab5d0362SJack F Vogel #define E1000_DEV_ID_I210_SERDES		0x1537
171ab5d0362SJack F Vogel #define E1000_DEV_ID_I210_SGMII			0x1538
1727609433eSJack F Vogel #define E1000_DEV_ID_I210_COPPER_FLASHLESS	0x157B
1737609433eSJack F Vogel #define E1000_DEV_ID_I210_SERDES_FLASHLESS	0x157C
174ab5d0362SJack F Vogel #define E1000_DEV_ID_I211_COPPER		0x1539
1757609433eSJack F Vogel #define E1000_DEV_ID_I354_BACKPLANE_1GBPS	0x1F40
1767609433eSJack F Vogel #define E1000_DEV_ID_I354_SGMII			0x1F41
1777609433eSJack F Vogel #define E1000_DEV_ID_I354_BACKPLANE_2_5GBPS	0x1F45
178f0ecc46dSJack F Vogel #define E1000_DEV_ID_DH89XXCC_SGMII		0x0438
179f0ecc46dSJack F Vogel #define E1000_DEV_ID_DH89XXCC_SERDES		0x043A
180f0ecc46dSJack F Vogel #define E1000_DEV_ID_DH89XXCC_BACKPLANE		0x043C
181f0ecc46dSJack F Vogel #define E1000_DEV_ID_DH89XXCC_SFP		0x0440
1826ab6bfe3SJack F Vogel 
1838cfa0ad2SJack F Vogel #define E1000_REVISION_0	0
1848cfa0ad2SJack F Vogel #define E1000_REVISION_1	1
1858cfa0ad2SJack F Vogel #define E1000_REVISION_2	2
1868cfa0ad2SJack F Vogel #define E1000_REVISION_3	3
1878cfa0ad2SJack F Vogel #define E1000_REVISION_4	4
1888cfa0ad2SJack F Vogel 
1898cfa0ad2SJack F Vogel #define E1000_FUNC_0		0
1908cfa0ad2SJack F Vogel #define E1000_FUNC_1		1
1914edd8523SJack F Vogel #define E1000_FUNC_2		2
1924edd8523SJack F Vogel #define E1000_FUNC_3		3
1938cfa0ad2SJack F Vogel 
194d035aa2dSJack F Vogel #define E1000_ALT_MAC_ADDRESS_OFFSET_LAN0	0
195d035aa2dSJack F Vogel #define E1000_ALT_MAC_ADDRESS_OFFSET_LAN1	3
1964edd8523SJack F Vogel #define E1000_ALT_MAC_ADDRESS_OFFSET_LAN2	6
1974edd8523SJack F Vogel #define E1000_ALT_MAC_ADDRESS_OFFSET_LAN3	9
198d035aa2dSJack F Vogel 
1998cfa0ad2SJack F Vogel enum e1000_mac_type {
2008cfa0ad2SJack F Vogel 	e1000_undefined = 0,
2018cfa0ad2SJack F Vogel 	e1000_82542,
2028cfa0ad2SJack F Vogel 	e1000_82543,
2038cfa0ad2SJack F Vogel 	e1000_82544,
2048cfa0ad2SJack F Vogel 	e1000_82540,
2058cfa0ad2SJack F Vogel 	e1000_82545,
2068cfa0ad2SJack F Vogel 	e1000_82545_rev_3,
2078cfa0ad2SJack F Vogel 	e1000_82546,
2088cfa0ad2SJack F Vogel 	e1000_82546_rev_3,
2098cfa0ad2SJack F Vogel 	e1000_82541,
2108cfa0ad2SJack F Vogel 	e1000_82541_rev_2,
2118cfa0ad2SJack F Vogel 	e1000_82547,
2128cfa0ad2SJack F Vogel 	e1000_82547_rev_2,
2138cfa0ad2SJack F Vogel 	e1000_82571,
2148cfa0ad2SJack F Vogel 	e1000_82572,
2158cfa0ad2SJack F Vogel 	e1000_82573,
2168cfa0ad2SJack F Vogel 	e1000_82574,
2179d81738fSJack F Vogel 	e1000_82583,
2188cfa0ad2SJack F Vogel 	e1000_80003es2lan,
2198cfa0ad2SJack F Vogel 	e1000_ich8lan,
2208cfa0ad2SJack F Vogel 	e1000_ich9lan,
2218cfa0ad2SJack F Vogel 	e1000_ich10lan,
2229d81738fSJack F Vogel 	e1000_pchlan,
2237d9119bdSJack F Vogel 	e1000_pch2lan,
2246ab6bfe3SJack F Vogel 	e1000_pch_lpt,
2258cfa0ad2SJack F Vogel 	e1000_82575,
2268cfa0ad2SJack F Vogel 	e1000_82576,
2274edd8523SJack F Vogel 	e1000_82580,
228f0ecc46dSJack F Vogel 	e1000_i350,
2297609433eSJack F Vogel 	e1000_i354,
230ab5d0362SJack F Vogel 	e1000_i210,
231ab5d0362SJack F Vogel 	e1000_i211,
232b8270585SJack F Vogel 	e1000_vfadapt,
233f0ecc46dSJack F Vogel 	e1000_vfadapt_i350,
2348cfa0ad2SJack F Vogel 	e1000_num_macs  /* List is 1-based, so subtract 1 for TRUE count. */
2358cfa0ad2SJack F Vogel };
2368cfa0ad2SJack F Vogel 
2378cfa0ad2SJack F Vogel enum e1000_media_type {
2388cfa0ad2SJack F Vogel 	e1000_media_type_unknown = 0,
2398cfa0ad2SJack F Vogel 	e1000_media_type_copper = 1,
2408cfa0ad2SJack F Vogel 	e1000_media_type_fiber = 2,
2418cfa0ad2SJack F Vogel 	e1000_media_type_internal_serdes = 3,
2428cfa0ad2SJack F Vogel 	e1000_num_media_types
2438cfa0ad2SJack F Vogel };
2448cfa0ad2SJack F Vogel 
2458cfa0ad2SJack F Vogel enum e1000_nvm_type {
2468cfa0ad2SJack F Vogel 	e1000_nvm_unknown = 0,
2478cfa0ad2SJack F Vogel 	e1000_nvm_none,
2488cfa0ad2SJack F Vogel 	e1000_nvm_eeprom_spi,
2498cfa0ad2SJack F Vogel 	e1000_nvm_eeprom_microwire,
2508cfa0ad2SJack F Vogel 	e1000_nvm_flash_hw,
2517609433eSJack F Vogel 	e1000_nvm_invm,
2528cfa0ad2SJack F Vogel 	e1000_nvm_flash_sw
2538cfa0ad2SJack F Vogel };
2548cfa0ad2SJack F Vogel 
2558cfa0ad2SJack F Vogel enum e1000_nvm_override {
2568cfa0ad2SJack F Vogel 	e1000_nvm_override_none = 0,
2578cfa0ad2SJack F Vogel 	e1000_nvm_override_spi_small,
2588cfa0ad2SJack F Vogel 	e1000_nvm_override_spi_large,
2598cfa0ad2SJack F Vogel 	e1000_nvm_override_microwire_small,
2608cfa0ad2SJack F Vogel 	e1000_nvm_override_microwire_large
2618cfa0ad2SJack F Vogel };
2628cfa0ad2SJack F Vogel 
2638cfa0ad2SJack F Vogel enum e1000_phy_type {
2648cfa0ad2SJack F Vogel 	e1000_phy_unknown = 0,
2658cfa0ad2SJack F Vogel 	e1000_phy_none,
2668cfa0ad2SJack F Vogel 	e1000_phy_m88,
2678cfa0ad2SJack F Vogel 	e1000_phy_igp,
2688cfa0ad2SJack F Vogel 	e1000_phy_igp_2,
2698cfa0ad2SJack F Vogel 	e1000_phy_gg82563,
2708cfa0ad2SJack F Vogel 	e1000_phy_igp_3,
2718cfa0ad2SJack F Vogel 	e1000_phy_ife,
2728cfa0ad2SJack F Vogel 	e1000_phy_bm,
2739d81738fSJack F Vogel 	e1000_phy_82578,
2749d81738fSJack F Vogel 	e1000_phy_82577,
2757d9119bdSJack F Vogel 	e1000_phy_82579,
2766ab6bfe3SJack F Vogel 	e1000_phy_i217,
2774edd8523SJack F Vogel 	e1000_phy_82580,
2788cfa0ad2SJack F Vogel 	e1000_phy_vf,
279ab5d0362SJack F Vogel 	e1000_phy_i210,
2808cfa0ad2SJack F Vogel };
2818cfa0ad2SJack F Vogel 
2828cfa0ad2SJack F Vogel enum e1000_bus_type {
2838cfa0ad2SJack F Vogel 	e1000_bus_type_unknown = 0,
2848cfa0ad2SJack F Vogel 	e1000_bus_type_pci,
2858cfa0ad2SJack F Vogel 	e1000_bus_type_pcix,
2868cfa0ad2SJack F Vogel 	e1000_bus_type_pci_express,
2878cfa0ad2SJack F Vogel 	e1000_bus_type_reserved
2888cfa0ad2SJack F Vogel };
2898cfa0ad2SJack F Vogel 
2908cfa0ad2SJack F Vogel enum e1000_bus_speed {
2918cfa0ad2SJack F Vogel 	e1000_bus_speed_unknown = 0,
2928cfa0ad2SJack F Vogel 	e1000_bus_speed_33,
2938cfa0ad2SJack F Vogel 	e1000_bus_speed_66,
2948cfa0ad2SJack F Vogel 	e1000_bus_speed_100,
2958cfa0ad2SJack F Vogel 	e1000_bus_speed_120,
2968cfa0ad2SJack F Vogel 	e1000_bus_speed_133,
2978cfa0ad2SJack F Vogel 	e1000_bus_speed_2500,
2988cfa0ad2SJack F Vogel 	e1000_bus_speed_5000,
2998cfa0ad2SJack F Vogel 	e1000_bus_speed_reserved
3008cfa0ad2SJack F Vogel };
3018cfa0ad2SJack F Vogel 
3028cfa0ad2SJack F Vogel enum e1000_bus_width {
3038cfa0ad2SJack F Vogel 	e1000_bus_width_unknown = 0,
3048cfa0ad2SJack F Vogel 	e1000_bus_width_pcie_x1,
3058cfa0ad2SJack F Vogel 	e1000_bus_width_pcie_x2,
3068cfa0ad2SJack F Vogel 	e1000_bus_width_pcie_x4 = 4,
3078cfa0ad2SJack F Vogel 	e1000_bus_width_pcie_x8 = 8,
3088cfa0ad2SJack F Vogel 	e1000_bus_width_32,
3098cfa0ad2SJack F Vogel 	e1000_bus_width_64,
3108cfa0ad2SJack F Vogel 	e1000_bus_width_reserved
3118cfa0ad2SJack F Vogel };
3128cfa0ad2SJack F Vogel 
3138cfa0ad2SJack F Vogel enum e1000_1000t_rx_status {
3148cfa0ad2SJack F Vogel 	e1000_1000t_rx_status_not_ok = 0,
3158cfa0ad2SJack F Vogel 	e1000_1000t_rx_status_ok,
3168cfa0ad2SJack F Vogel 	e1000_1000t_rx_status_undefined = 0xFF
3178cfa0ad2SJack F Vogel };
3188cfa0ad2SJack F Vogel 
3198cfa0ad2SJack F Vogel enum e1000_rev_polarity {
3208cfa0ad2SJack F Vogel 	e1000_rev_polarity_normal = 0,
3218cfa0ad2SJack F Vogel 	e1000_rev_polarity_reversed,
3228cfa0ad2SJack F Vogel 	e1000_rev_polarity_undefined = 0xFF
3238cfa0ad2SJack F Vogel };
3248cfa0ad2SJack F Vogel 
325daf9197cSJack F Vogel enum e1000_fc_mode {
3268cfa0ad2SJack F Vogel 	e1000_fc_none = 0,
3278cfa0ad2SJack F Vogel 	e1000_fc_rx_pause,
3288cfa0ad2SJack F Vogel 	e1000_fc_tx_pause,
3298cfa0ad2SJack F Vogel 	e1000_fc_full,
3308cfa0ad2SJack F Vogel 	e1000_fc_default = 0xFF
3318cfa0ad2SJack F Vogel };
3328cfa0ad2SJack F Vogel 
3338cfa0ad2SJack F Vogel enum e1000_ffe_config {
3348cfa0ad2SJack F Vogel 	e1000_ffe_config_enabled = 0,
3358cfa0ad2SJack F Vogel 	e1000_ffe_config_active,
3368cfa0ad2SJack F Vogel 	e1000_ffe_config_blocked
3378cfa0ad2SJack F Vogel };
3388cfa0ad2SJack F Vogel 
3398cfa0ad2SJack F Vogel enum e1000_dsp_config {
3408cfa0ad2SJack F Vogel 	e1000_dsp_config_disabled = 0,
3418cfa0ad2SJack F Vogel 	e1000_dsp_config_enabled,
3428cfa0ad2SJack F Vogel 	e1000_dsp_config_activated,
3438cfa0ad2SJack F Vogel 	e1000_dsp_config_undefined = 0xFF
3448cfa0ad2SJack F Vogel };
3458cfa0ad2SJack F Vogel 
346daf9197cSJack F Vogel enum e1000_ms_type {
347daf9197cSJack F Vogel 	e1000_ms_hw_default = 0,
348daf9197cSJack F Vogel 	e1000_ms_force_master,
349daf9197cSJack F Vogel 	e1000_ms_force_slave,
350daf9197cSJack F Vogel 	e1000_ms_auto
351daf9197cSJack F Vogel };
352daf9197cSJack F Vogel 
353daf9197cSJack F Vogel enum e1000_smart_speed {
354daf9197cSJack F Vogel 	e1000_smart_speed_default = 0,
355daf9197cSJack F Vogel 	e1000_smart_speed_on,
356daf9197cSJack F Vogel 	e1000_smart_speed_off
357daf9197cSJack F Vogel };
358daf9197cSJack F Vogel 
359d035aa2dSJack F Vogel enum e1000_serdes_link_state {
360d035aa2dSJack F Vogel 	e1000_serdes_link_down = 0,
361d035aa2dSJack F Vogel 	e1000_serdes_link_autoneg_progress,
362d035aa2dSJack F Vogel 	e1000_serdes_link_autoneg_complete,
363d035aa2dSJack F Vogel 	e1000_serdes_link_forced_up
364d035aa2dSJack F Vogel };
365d035aa2dSJack F Vogel 
3667d9119bdSJack F Vogel #define __le16 u16
3677d9119bdSJack F Vogel #define __le32 u32
3687d9119bdSJack F Vogel #define __le64 u64
3698cfa0ad2SJack F Vogel /* Receive Descriptor */
3708cfa0ad2SJack F Vogel struct e1000_rx_desc {
371daf9197cSJack F Vogel 	__le64 buffer_addr; /* Address of the descriptor's data buffer */
372daf9197cSJack F Vogel 	__le16 length;      /* Length of data DMAed into data buffer */
373daf9197cSJack F Vogel 	__le16 csum; /* Packet checksum */
3748cfa0ad2SJack F Vogel 	u8  status;  /* Descriptor status */
3758cfa0ad2SJack F Vogel 	u8  errors;  /* Descriptor Errors */
376daf9197cSJack F Vogel 	__le16 special;
3778cfa0ad2SJack F Vogel };
3788cfa0ad2SJack F Vogel 
3798cfa0ad2SJack F Vogel /* Receive Descriptor - Extended */
3808cfa0ad2SJack F Vogel union e1000_rx_desc_extended {
3818cfa0ad2SJack F Vogel 	struct {
382daf9197cSJack F Vogel 		__le64 buffer_addr;
383daf9197cSJack F Vogel 		__le64 reserved;
3848cfa0ad2SJack F Vogel 	} read;
3858cfa0ad2SJack F Vogel 	struct {
3868cfa0ad2SJack F Vogel 		struct {
387daf9197cSJack F Vogel 			__le32 mrq; /* Multiple Rx Queues */
3888cfa0ad2SJack F Vogel 			union {
389daf9197cSJack F Vogel 				__le32 rss; /* RSS Hash */
3908cfa0ad2SJack F Vogel 				struct {
391daf9197cSJack F Vogel 					__le16 ip_id;  /* IP id */
392daf9197cSJack F Vogel 					__le16 csum;   /* Packet Checksum */
3938cfa0ad2SJack F Vogel 				} csum_ip;
3948cfa0ad2SJack F Vogel 			} hi_dword;
3958cfa0ad2SJack F Vogel 		} lower;
3968cfa0ad2SJack F Vogel 		struct {
397daf9197cSJack F Vogel 			__le32 status_error;  /* ext status/error */
398daf9197cSJack F Vogel 			__le16 length;
399daf9197cSJack F Vogel 			__le16 vlan; /* VLAN tag */
4008cfa0ad2SJack F Vogel 		} upper;
4018cfa0ad2SJack F Vogel 	} wb;  /* writeback */
4028cfa0ad2SJack F Vogel };
4038cfa0ad2SJack F Vogel 
4048cfa0ad2SJack F Vogel #define MAX_PS_BUFFERS 4
4057609433eSJack F Vogel 
4067609433eSJack F Vogel /* Number of packet split data buffers (not including the header buffer) */
4077609433eSJack F Vogel #define PS_PAGE_BUFFERS	(MAX_PS_BUFFERS - 1)
4087609433eSJack F Vogel 
4098cfa0ad2SJack F Vogel /* Receive Descriptor - Packet Split */
4108cfa0ad2SJack F Vogel union e1000_rx_desc_packet_split {
4118cfa0ad2SJack F Vogel 	struct {
4128cfa0ad2SJack F Vogel 		/* one buffer for protocol header(s), three data buffers */
413daf9197cSJack F Vogel 		__le64 buffer_addr[MAX_PS_BUFFERS];
4148cfa0ad2SJack F Vogel 	} read;
4158cfa0ad2SJack F Vogel 	struct {
4168cfa0ad2SJack F Vogel 		struct {
417daf9197cSJack F Vogel 			__le32 mrq;  /* Multiple Rx Queues */
4188cfa0ad2SJack F Vogel 			union {
419daf9197cSJack F Vogel 				__le32 rss; /* RSS Hash */
4208cfa0ad2SJack F Vogel 				struct {
421daf9197cSJack F Vogel 					__le16 ip_id;    /* IP id */
422daf9197cSJack F Vogel 					__le16 csum;     /* Packet Checksum */
4238cfa0ad2SJack F Vogel 				} csum_ip;
4248cfa0ad2SJack F Vogel 			} hi_dword;
4258cfa0ad2SJack F Vogel 		} lower;
4268cfa0ad2SJack F Vogel 		struct {
427daf9197cSJack F Vogel 			__le32 status_error;  /* ext status/error */
428daf9197cSJack F Vogel 			__le16 length0;  /* length of buffer 0 */
429daf9197cSJack F Vogel 			__le16 vlan;  /* VLAN tag */
4308cfa0ad2SJack F Vogel 		} middle;
4318cfa0ad2SJack F Vogel 		struct {
432daf9197cSJack F Vogel 			__le16 header_status;
4337609433eSJack F Vogel 			/* length of buffers 1-3 */
4347609433eSJack F Vogel 			__le16 length[PS_PAGE_BUFFERS];
4358cfa0ad2SJack F Vogel 		} upper;
436daf9197cSJack F Vogel 		__le64 reserved;
4378cfa0ad2SJack F Vogel 	} wb; /* writeback */
4388cfa0ad2SJack F Vogel };
4398cfa0ad2SJack F Vogel 
4408cfa0ad2SJack F Vogel /* Transmit Descriptor */
4418cfa0ad2SJack F Vogel struct e1000_tx_desc {
442daf9197cSJack F Vogel 	__le64 buffer_addr;   /* Address of the descriptor's data buffer */
4438cfa0ad2SJack F Vogel 	union {
444daf9197cSJack F Vogel 		__le32 data;
4458cfa0ad2SJack F Vogel 		struct {
446daf9197cSJack F Vogel 			__le16 length;  /* Data buffer length */
4478cfa0ad2SJack F Vogel 			u8 cso;  /* Checksum offset */
4488cfa0ad2SJack F Vogel 			u8 cmd;  /* Descriptor control */
4498cfa0ad2SJack F Vogel 		} flags;
4508cfa0ad2SJack F Vogel 	} lower;
4518cfa0ad2SJack F Vogel 	union {
452daf9197cSJack F Vogel 		__le32 data;
4538cfa0ad2SJack F Vogel 		struct {
4548cfa0ad2SJack F Vogel 			u8 status; /* Descriptor status */
4558cfa0ad2SJack F Vogel 			u8 css;  /* Checksum start */
456daf9197cSJack F Vogel 			__le16 special;
4578cfa0ad2SJack F Vogel 		} fields;
4588cfa0ad2SJack F Vogel 	} upper;
4598cfa0ad2SJack F Vogel };
4608cfa0ad2SJack F Vogel 
4618cfa0ad2SJack F Vogel /* Offload Context Descriptor */
4628cfa0ad2SJack F Vogel struct e1000_context_desc {
4638cfa0ad2SJack F Vogel 	union {
464daf9197cSJack F Vogel 		__le32 ip_config;
4658cfa0ad2SJack F Vogel 		struct {
4668cfa0ad2SJack F Vogel 			u8 ipcss;  /* IP checksum start */
4678cfa0ad2SJack F Vogel 			u8 ipcso;  /* IP checksum offset */
468daf9197cSJack F Vogel 			__le16 ipcse;  /* IP checksum end */
4698cfa0ad2SJack F Vogel 		} ip_fields;
4708cfa0ad2SJack F Vogel 	} lower_setup;
4718cfa0ad2SJack F Vogel 	union {
472daf9197cSJack F Vogel 		__le32 tcp_config;
4738cfa0ad2SJack F Vogel 		struct {
4748cfa0ad2SJack F Vogel 			u8 tucss;  /* TCP checksum start */
4758cfa0ad2SJack F Vogel 			u8 tucso;  /* TCP checksum offset */
476daf9197cSJack F Vogel 			__le16 tucse;  /* TCP checksum end */
4778cfa0ad2SJack F Vogel 		} tcp_fields;
4788cfa0ad2SJack F Vogel 	} upper_setup;
479daf9197cSJack F Vogel 	__le32 cmd_and_length;
4808cfa0ad2SJack F Vogel 	union {
481daf9197cSJack F Vogel 		__le32 data;
4828cfa0ad2SJack F Vogel 		struct {
4838cfa0ad2SJack F Vogel 			u8 status;  /* Descriptor status */
4848cfa0ad2SJack F Vogel 			u8 hdr_len;  /* Header length */
485daf9197cSJack F Vogel 			__le16 mss;  /* Maximum segment size */
4868cfa0ad2SJack F Vogel 		} fields;
4878cfa0ad2SJack F Vogel 	} tcp_seg_setup;
4888cfa0ad2SJack F Vogel };
4898cfa0ad2SJack F Vogel 
4908cfa0ad2SJack F Vogel /* Offload data descriptor */
4918cfa0ad2SJack F Vogel struct e1000_data_desc {
492daf9197cSJack F Vogel 	__le64 buffer_addr;  /* Address of the descriptor's buffer address */
4938cfa0ad2SJack F Vogel 	union {
494daf9197cSJack F Vogel 		__le32 data;
4958cfa0ad2SJack F Vogel 		struct {
496daf9197cSJack F Vogel 			__le16 length;  /* Data buffer length */
4978cfa0ad2SJack F Vogel 			u8 typ_len_ext;
4988cfa0ad2SJack F Vogel 			u8 cmd;
4998cfa0ad2SJack F Vogel 		} flags;
5008cfa0ad2SJack F Vogel 	} lower;
5018cfa0ad2SJack F Vogel 	union {
502daf9197cSJack F Vogel 		__le32 data;
5038cfa0ad2SJack F Vogel 		struct {
5048cfa0ad2SJack F Vogel 			u8 status;  /* Descriptor status */
5058cfa0ad2SJack F Vogel 			u8 popts;  /* Packet Options */
506daf9197cSJack F Vogel 			__le16 special;
5078cfa0ad2SJack F Vogel 		} fields;
5088cfa0ad2SJack F Vogel 	} upper;
5098cfa0ad2SJack F Vogel };
5108cfa0ad2SJack F Vogel 
5118cfa0ad2SJack F Vogel /* Statistics counters collected by the MAC */
5128cfa0ad2SJack F Vogel struct e1000_hw_stats {
5138cfa0ad2SJack F Vogel 	u64 crcerrs;
5148cfa0ad2SJack F Vogel 	u64 algnerrc;
5158cfa0ad2SJack F Vogel 	u64 symerrs;
5168cfa0ad2SJack F Vogel 	u64 rxerrc;
5178cfa0ad2SJack F Vogel 	u64 mpc;
5188cfa0ad2SJack F Vogel 	u64 scc;
5198cfa0ad2SJack F Vogel 	u64 ecol;
5208cfa0ad2SJack F Vogel 	u64 mcc;
5218cfa0ad2SJack F Vogel 	u64 latecol;
5228cfa0ad2SJack F Vogel 	u64 colc;
5238cfa0ad2SJack F Vogel 	u64 dc;
5248cfa0ad2SJack F Vogel 	u64 tncrs;
5258cfa0ad2SJack F Vogel 	u64 sec;
5268cfa0ad2SJack F Vogel 	u64 cexterr;
5278cfa0ad2SJack F Vogel 	u64 rlec;
5288cfa0ad2SJack F Vogel 	u64 xonrxc;
5298cfa0ad2SJack F Vogel 	u64 xontxc;
5308cfa0ad2SJack F Vogel 	u64 xoffrxc;
5318cfa0ad2SJack F Vogel 	u64 xofftxc;
5328cfa0ad2SJack F Vogel 	u64 fcruc;
5338cfa0ad2SJack F Vogel 	u64 prc64;
5348cfa0ad2SJack F Vogel 	u64 prc127;
5358cfa0ad2SJack F Vogel 	u64 prc255;
5368cfa0ad2SJack F Vogel 	u64 prc511;
5378cfa0ad2SJack F Vogel 	u64 prc1023;
5388cfa0ad2SJack F Vogel 	u64 prc1522;
5398cfa0ad2SJack F Vogel 	u64 gprc;
5408cfa0ad2SJack F Vogel 	u64 bprc;
5418cfa0ad2SJack F Vogel 	u64 mprc;
5428cfa0ad2SJack F Vogel 	u64 gptc;
5438cfa0ad2SJack F Vogel 	u64 gorc;
5448cfa0ad2SJack F Vogel 	u64 gotc;
5458cfa0ad2SJack F Vogel 	u64 rnbc;
5468cfa0ad2SJack F Vogel 	u64 ruc;
5478cfa0ad2SJack F Vogel 	u64 rfc;
5488cfa0ad2SJack F Vogel 	u64 roc;
5498cfa0ad2SJack F Vogel 	u64 rjc;
5508cfa0ad2SJack F Vogel 	u64 mgprc;
5518cfa0ad2SJack F Vogel 	u64 mgpdc;
5528cfa0ad2SJack F Vogel 	u64 mgptc;
5538cfa0ad2SJack F Vogel 	u64 tor;
5548cfa0ad2SJack F Vogel 	u64 tot;
5558cfa0ad2SJack F Vogel 	u64 tpr;
5568cfa0ad2SJack F Vogel 	u64 tpt;
5578cfa0ad2SJack F Vogel 	u64 ptc64;
5588cfa0ad2SJack F Vogel 	u64 ptc127;
5598cfa0ad2SJack F Vogel 	u64 ptc255;
5608cfa0ad2SJack F Vogel 	u64 ptc511;
5618cfa0ad2SJack F Vogel 	u64 ptc1023;
5628cfa0ad2SJack F Vogel 	u64 ptc1522;
5638cfa0ad2SJack F Vogel 	u64 mptc;
5648cfa0ad2SJack F Vogel 	u64 bptc;
5658cfa0ad2SJack F Vogel 	u64 tsctc;
5668cfa0ad2SJack F Vogel 	u64 tsctfc;
5678cfa0ad2SJack F Vogel 	u64 iac;
5688cfa0ad2SJack F Vogel 	u64 icrxptc;
5698cfa0ad2SJack F Vogel 	u64 icrxatc;
5708cfa0ad2SJack F Vogel 	u64 ictxptc;
5718cfa0ad2SJack F Vogel 	u64 ictxatc;
5728cfa0ad2SJack F Vogel 	u64 ictxqec;
5738cfa0ad2SJack F Vogel 	u64 ictxqmtc;
5748cfa0ad2SJack F Vogel 	u64 icrxdmtc;
5758cfa0ad2SJack F Vogel 	u64 icrxoc;
5768cfa0ad2SJack F Vogel 	u64 cbtmpc;
5778cfa0ad2SJack F Vogel 	u64 htdpmc;
5788cfa0ad2SJack F Vogel 	u64 cbrdpc;
5798cfa0ad2SJack F Vogel 	u64 cbrmpc;
5808cfa0ad2SJack F Vogel 	u64 rpthc;
5818cfa0ad2SJack F Vogel 	u64 hgptc;
5828cfa0ad2SJack F Vogel 	u64 htcbdpc;
5838cfa0ad2SJack F Vogel 	u64 hgorc;
5848cfa0ad2SJack F Vogel 	u64 hgotc;
5858cfa0ad2SJack F Vogel 	u64 lenerrs;
5868cfa0ad2SJack F Vogel 	u64 scvpc;
5878cfa0ad2SJack F Vogel 	u64 hrmpc;
588daf9197cSJack F Vogel 	u64 doosync;
5894dab5c37SJack F Vogel 	u64 o2bgptc;
5904dab5c37SJack F Vogel 	u64 o2bspc;
5914dab5c37SJack F Vogel 	u64 b2ospc;
5924dab5c37SJack F Vogel 	u64 b2ogprc;
593daf9197cSJack F Vogel };
594daf9197cSJack F Vogel 
595b8270585SJack F Vogel struct e1000_vf_stats {
596b8270585SJack F Vogel 	u64 base_gprc;
597b8270585SJack F Vogel 	u64 base_gptc;
598b8270585SJack F Vogel 	u64 base_gorc;
599b8270585SJack F Vogel 	u64 base_gotc;
600b8270585SJack F Vogel 	u64 base_mprc;
601b8270585SJack F Vogel 	u64 base_gotlbc;
602b8270585SJack F Vogel 	u64 base_gptlbc;
603b8270585SJack F Vogel 	u64 base_gorlbc;
604b8270585SJack F Vogel 	u64 base_gprlbc;
605b8270585SJack F Vogel 
606b8270585SJack F Vogel 	u32 last_gprc;
607b8270585SJack F Vogel 	u32 last_gptc;
608b8270585SJack F Vogel 	u32 last_gorc;
609b8270585SJack F Vogel 	u32 last_gotc;
610b8270585SJack F Vogel 	u32 last_mprc;
611b8270585SJack F Vogel 	u32 last_gotlbc;
612b8270585SJack F Vogel 	u32 last_gptlbc;
613b8270585SJack F Vogel 	u32 last_gorlbc;
614b8270585SJack F Vogel 	u32 last_gprlbc;
615b8270585SJack F Vogel 
616b8270585SJack F Vogel 	u64 gprc;
617b8270585SJack F Vogel 	u64 gptc;
618b8270585SJack F Vogel 	u64 gorc;
619b8270585SJack F Vogel 	u64 gotc;
620b8270585SJack F Vogel 	u64 mprc;
621b8270585SJack F Vogel 	u64 gotlbc;
622b8270585SJack F Vogel 	u64 gptlbc;
623b8270585SJack F Vogel 	u64 gorlbc;
624b8270585SJack F Vogel 	u64 gprlbc;
625b8270585SJack F Vogel };
6268cfa0ad2SJack F Vogel 
6278cfa0ad2SJack F Vogel struct e1000_phy_stats {
6288cfa0ad2SJack F Vogel 	u32 idle_errors;
6298cfa0ad2SJack F Vogel 	u32 receive_errors;
6308cfa0ad2SJack F Vogel };
6318cfa0ad2SJack F Vogel 
6328cfa0ad2SJack F Vogel struct e1000_host_mng_dhcp_cookie {
6338cfa0ad2SJack F Vogel 	u32 signature;
6348cfa0ad2SJack F Vogel 	u8  status;
6358cfa0ad2SJack F Vogel 	u8  reserved0;
6368cfa0ad2SJack F Vogel 	u16 vlan_id;
6378cfa0ad2SJack F Vogel 	u32 reserved1;
6388cfa0ad2SJack F Vogel 	u16 reserved2;
6398cfa0ad2SJack F Vogel 	u8  reserved3;
6408cfa0ad2SJack F Vogel 	u8  checksum;
6418cfa0ad2SJack F Vogel };
6428cfa0ad2SJack F Vogel 
6438cfa0ad2SJack F Vogel /* Host Interface "Rev 1" */
6448cfa0ad2SJack F Vogel struct e1000_host_command_header {
6458cfa0ad2SJack F Vogel 	u8 command_id;
6468cfa0ad2SJack F Vogel 	u8 command_length;
6478cfa0ad2SJack F Vogel 	u8 command_options;
6488cfa0ad2SJack F Vogel 	u8 checksum;
6498cfa0ad2SJack F Vogel };
6508cfa0ad2SJack F Vogel 
6518cfa0ad2SJack F Vogel #define E1000_HI_MAX_DATA_LENGTH	252
6528cfa0ad2SJack F Vogel struct e1000_host_command_info {
6538cfa0ad2SJack F Vogel 	struct e1000_host_command_header command_header;
6548cfa0ad2SJack F Vogel 	u8 command_data[E1000_HI_MAX_DATA_LENGTH];
6558cfa0ad2SJack F Vogel };
6568cfa0ad2SJack F Vogel 
6578cfa0ad2SJack F Vogel /* Host Interface "Rev 2" */
6588cfa0ad2SJack F Vogel struct e1000_host_mng_command_header {
6598cfa0ad2SJack F Vogel 	u8  command_id;
6608cfa0ad2SJack F Vogel 	u8  checksum;
6618cfa0ad2SJack F Vogel 	u16 reserved1;
6628cfa0ad2SJack F Vogel 	u16 reserved2;
6638cfa0ad2SJack F Vogel 	u16 command_length;
6648cfa0ad2SJack F Vogel };
6658cfa0ad2SJack F Vogel 
6668cfa0ad2SJack F Vogel #define E1000_HI_MAX_MNG_DATA_LENGTH	0x6F8
6678cfa0ad2SJack F Vogel struct e1000_host_mng_command_info {
6688cfa0ad2SJack F Vogel 	struct e1000_host_mng_command_header command_header;
6698cfa0ad2SJack F Vogel 	u8 command_data[E1000_HI_MAX_MNG_DATA_LENGTH];
6708cfa0ad2SJack F Vogel };
6718cfa0ad2SJack F Vogel 
6728cfa0ad2SJack F Vogel #include "e1000_mac.h"
6738cfa0ad2SJack F Vogel #include "e1000_phy.h"
6748cfa0ad2SJack F Vogel #include "e1000_nvm.h"
6758cfa0ad2SJack F Vogel #include "e1000_manage.h"
676b8270585SJack F Vogel #include "e1000_mbx.h"
6778cfa0ad2SJack F Vogel 
6788cfa0ad2SJack F Vogel /* Function pointers for the MAC. */
6796ab6bfe3SJack F Vogel struct e1000_mac_operations {
6808cfa0ad2SJack F Vogel 	s32  (*init_params)(struct e1000_hw *);
681d035aa2dSJack F Vogel 	s32  (*id_led_init)(struct e1000_hw *);
6828cfa0ad2SJack F Vogel 	s32  (*blink_led)(struct e1000_hw *);
6836ab6bfe3SJack F Vogel 	bool (*check_mng_mode)(struct e1000_hw *);
6848cfa0ad2SJack F Vogel 	s32  (*check_for_link)(struct e1000_hw *);
6858cfa0ad2SJack F Vogel 	s32  (*cleanup_led)(struct e1000_hw *);
6868cfa0ad2SJack F Vogel 	void (*clear_hw_cntrs)(struct e1000_hw *);
6878cfa0ad2SJack F Vogel 	void (*clear_vfta)(struct e1000_hw *);
6888cfa0ad2SJack F Vogel 	s32  (*get_bus_info)(struct e1000_hw *);
689daf9197cSJack F Vogel 	void (*set_lan_id)(struct e1000_hw *);
6908cfa0ad2SJack F Vogel 	s32  (*get_link_up_info)(struct e1000_hw *, u16 *, u16 *);
6918cfa0ad2SJack F Vogel 	s32  (*led_on)(struct e1000_hw *);
6928cfa0ad2SJack F Vogel 	s32  (*led_off)(struct e1000_hw *);
693d035aa2dSJack F Vogel 	void (*update_mc_addr_list)(struct e1000_hw *, u8 *, u32);
6948cfa0ad2SJack F Vogel 	s32  (*reset_hw)(struct e1000_hw *);
6958cfa0ad2SJack F Vogel 	s32  (*init_hw)(struct e1000_hw *);
6968cfa0ad2SJack F Vogel 	void (*shutdown_serdes)(struct e1000_hw *);
697a69ed8dfSJack F Vogel 	void (*power_up_serdes)(struct e1000_hw *);
6988cfa0ad2SJack F Vogel 	s32  (*setup_link)(struct e1000_hw *);
6998cfa0ad2SJack F Vogel 	s32  (*setup_physical_interface)(struct e1000_hw *);
7008cfa0ad2SJack F Vogel 	s32  (*setup_led)(struct e1000_hw *);
7018cfa0ad2SJack F Vogel 	void (*write_vfta)(struct e1000_hw *, u32, u32);
7028cfa0ad2SJack F Vogel 	void (*config_collision_dist)(struct e1000_hw *);
7038cc64f1eSJack F Vogel 	int  (*rar_set)(struct e1000_hw *, u8*, u32);
7048cfa0ad2SJack F Vogel 	s32  (*read_mac_addr)(struct e1000_hw *);
7058cfa0ad2SJack F Vogel 	s32  (*validate_mdi_setting)(struct e1000_hw *);
7066ab6bfe3SJack F Vogel 	s32  (*set_obff_timer)(struct e1000_hw *, u32);
707ab5d0362SJack F Vogel 	s32  (*acquire_swfw_sync)(struct e1000_hw *, u16);
708ab5d0362SJack F Vogel 	void (*release_swfw_sync)(struct e1000_hw *, u16);
7098cfa0ad2SJack F Vogel };
7108cfa0ad2SJack F Vogel 
7116ab6bfe3SJack F Vogel /* When to use various PHY register access functions:
7124dab5c37SJack F Vogel  *
7134dab5c37SJack F Vogel  *                 Func   Caller
7144dab5c37SJack F Vogel  *   Function      Does   Does    When to use
7154dab5c37SJack F Vogel  *   ~~~~~~~~~~~~  ~~~~~  ~~~~~~  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7164dab5c37SJack F Vogel  *   X_reg         L,P,A  n/a     for simple PHY reg accesses
7174dab5c37SJack F Vogel  *   X_reg_locked  P,A    L       for multiple accesses of different regs
7184dab5c37SJack F Vogel  *                                on different pages
7194dab5c37SJack F Vogel  *   X_reg_page    A      L,P     for multiple accesses of different regs
7204dab5c37SJack F Vogel  *                                on the same page
7214dab5c37SJack F Vogel  *
7224dab5c37SJack F Vogel  * Where X=[read|write], L=locking, P=sets page, A=register access
7234dab5c37SJack F Vogel  *
7244dab5c37SJack F Vogel  */
7258cfa0ad2SJack F Vogel struct e1000_phy_operations {
7268cfa0ad2SJack F Vogel 	s32  (*init_params)(struct e1000_hw *);
7278cfa0ad2SJack F Vogel 	s32  (*acquire)(struct e1000_hw *);
728daf9197cSJack F Vogel 	s32  (*cfg_on_link_up)(struct e1000_hw *);
7298cfa0ad2SJack F Vogel 	s32  (*check_polarity)(struct e1000_hw *);
7308cfa0ad2SJack F Vogel 	s32  (*check_reset_block)(struct e1000_hw *);
7318cfa0ad2SJack F Vogel 	s32  (*commit)(struct e1000_hw *);
7328cfa0ad2SJack F Vogel 	s32  (*force_speed_duplex)(struct e1000_hw *);
7338cfa0ad2SJack F Vogel 	s32  (*get_cfg_done)(struct e1000_hw *hw);
7348cfa0ad2SJack F Vogel 	s32  (*get_cable_length)(struct e1000_hw *);
7358cfa0ad2SJack F Vogel 	s32  (*get_info)(struct e1000_hw *);
7364dab5c37SJack F Vogel 	s32  (*set_page)(struct e1000_hw *, u16);
7378cfa0ad2SJack F Vogel 	s32  (*read_reg)(struct e1000_hw *, u32, u16 *);
7384edd8523SJack F Vogel 	s32  (*read_reg_locked)(struct e1000_hw *, u32, u16 *);
7394dab5c37SJack F Vogel 	s32  (*read_reg_page)(struct e1000_hw *, u32, u16 *);
7408cfa0ad2SJack F Vogel 	void (*release)(struct e1000_hw *);
7418cfa0ad2SJack F Vogel 	s32  (*reset)(struct e1000_hw *);
7428cfa0ad2SJack F Vogel 	s32  (*set_d0_lplu_state)(struct e1000_hw *, bool);
7438cfa0ad2SJack F Vogel 	s32  (*set_d3_lplu_state)(struct e1000_hw *, bool);
7448cfa0ad2SJack F Vogel 	s32  (*write_reg)(struct e1000_hw *, u32, u16);
7454edd8523SJack F Vogel 	s32  (*write_reg_locked)(struct e1000_hw *, u32, u16);
7464dab5c37SJack F Vogel 	s32  (*write_reg_page)(struct e1000_hw *, u32, u16);
7478cfa0ad2SJack F Vogel 	void (*power_up)(struct e1000_hw *);
7488cfa0ad2SJack F Vogel 	void (*power_down)(struct e1000_hw *);
7494dab5c37SJack F Vogel 	s32 (*read_i2c_byte)(struct e1000_hw *, u8, u8, u8 *);
7504dab5c37SJack F Vogel 	s32 (*write_i2c_byte)(struct e1000_hw *, u8, u8, u8);
7518cfa0ad2SJack F Vogel };
7528cfa0ad2SJack F Vogel 
7536ab6bfe3SJack F Vogel /* Function pointers for the NVM. */
7548cfa0ad2SJack F Vogel struct e1000_nvm_operations {
7558cfa0ad2SJack F Vogel 	s32  (*init_params)(struct e1000_hw *);
7568cfa0ad2SJack F Vogel 	s32  (*acquire)(struct e1000_hw *);
7578cfa0ad2SJack F Vogel 	s32  (*read)(struct e1000_hw *, u16, u16, u16 *);
7588cfa0ad2SJack F Vogel 	void (*release)(struct e1000_hw *);
7598cfa0ad2SJack F Vogel 	void (*reload)(struct e1000_hw *);
7608cfa0ad2SJack F Vogel 	s32  (*update)(struct e1000_hw *);
7618cfa0ad2SJack F Vogel 	s32  (*valid_led_default)(struct e1000_hw *, u16 *);
7628cfa0ad2SJack F Vogel 	s32  (*validate)(struct e1000_hw *);
7638cfa0ad2SJack F Vogel 	s32  (*write)(struct e1000_hw *, u16, u16, u16 *);
7648cfa0ad2SJack F Vogel };
7658cfa0ad2SJack F Vogel 
7668cfa0ad2SJack F Vogel struct e1000_mac_info {
7678cfa0ad2SJack F Vogel 	struct e1000_mac_operations ops;
768f0ecc46dSJack F Vogel 	u8 addr[ETH_ADDR_LEN];
769f0ecc46dSJack F Vogel 	u8 perm_addr[ETH_ADDR_LEN];
7708cfa0ad2SJack F Vogel 
7718cfa0ad2SJack F Vogel 	enum e1000_mac_type type;
7728cfa0ad2SJack F Vogel 
7738cfa0ad2SJack F Vogel 	u32 collision_delta;
7748cfa0ad2SJack F Vogel 	u32 ledctl_default;
7758cfa0ad2SJack F Vogel 	u32 ledctl_mode1;
7768cfa0ad2SJack F Vogel 	u32 ledctl_mode2;
7778cfa0ad2SJack F Vogel 	u32 mc_filter_type;
7788cfa0ad2SJack F Vogel 	u32 tx_packet_delta;
7798cfa0ad2SJack F Vogel 	u32 txcw;
7808cfa0ad2SJack F Vogel 
7818cfa0ad2SJack F Vogel 	u16 current_ifs_val;
7828cfa0ad2SJack F Vogel 	u16 ifs_max_val;
7838cfa0ad2SJack F Vogel 	u16 ifs_min_val;
7848cfa0ad2SJack F Vogel 	u16 ifs_ratio;
7858cfa0ad2SJack F Vogel 	u16 ifs_step_size;
7868cfa0ad2SJack F Vogel 	u16 mta_reg_count;
7874edd8523SJack F Vogel 	u16 uta_reg_count;
7889d81738fSJack F Vogel 
7899d81738fSJack F Vogel 	/* Maximum size of the MTA register table in all supported adapters */
7909d81738fSJack F Vogel 	#define MAX_MTA_REG 128
791d035aa2dSJack F Vogel 	u32 mta_shadow[MAX_MTA_REG];
7928cfa0ad2SJack F Vogel 	u16 rar_entry_count;
7938cfa0ad2SJack F Vogel 
7948cfa0ad2SJack F Vogel 	u8  forced_speed_duplex;
7958cfa0ad2SJack F Vogel 
7968cfa0ad2SJack F Vogel 	bool adaptive_ifs;
7978ec87fc5SJack F Vogel 	bool has_fwsm;
7988cfa0ad2SJack F Vogel 	bool arc_subsystem_valid;
7998cfa0ad2SJack F Vogel 	bool asf_firmware_present;
8008cfa0ad2SJack F Vogel 	bool autoneg;
8018cfa0ad2SJack F Vogel 	bool autoneg_failed;
8028cfa0ad2SJack F Vogel 	bool get_link_status;
8038cfa0ad2SJack F Vogel 	bool in_ifs_mode;
8048cfa0ad2SJack F Vogel 	bool report_tx_early;
805d035aa2dSJack F Vogel 	enum e1000_serdes_link_state serdes_link_state;
8068cfa0ad2SJack F Vogel 	bool serdes_has_link;
8078cfa0ad2SJack F Vogel 	bool tx_pkt_filtering;
8086ab6bfe3SJack F Vogel 	u32 max_frame_size;
8098cfa0ad2SJack F Vogel };
8108cfa0ad2SJack F Vogel 
8118cfa0ad2SJack F Vogel struct e1000_phy_info {
8128cfa0ad2SJack F Vogel 	struct e1000_phy_operations ops;
8138cfa0ad2SJack F Vogel 	enum e1000_phy_type type;
8148cfa0ad2SJack F Vogel 
8158cfa0ad2SJack F Vogel 	enum e1000_1000t_rx_status local_rx;
8168cfa0ad2SJack F Vogel 	enum e1000_1000t_rx_status remote_rx;
8178cfa0ad2SJack F Vogel 	enum e1000_ms_type ms_type;
8188cfa0ad2SJack F Vogel 	enum e1000_ms_type original_ms_type;
8198cfa0ad2SJack F Vogel 	enum e1000_rev_polarity cable_polarity;
8208cfa0ad2SJack F Vogel 	enum e1000_smart_speed smart_speed;
8218cfa0ad2SJack F Vogel 
8228cfa0ad2SJack F Vogel 	u32 addr;
8238cfa0ad2SJack F Vogel 	u32 id;
8248cfa0ad2SJack F Vogel 	u32 reset_delay_us; /* in usec */
8258cfa0ad2SJack F Vogel 	u32 revision;
8268cfa0ad2SJack F Vogel 
8278cfa0ad2SJack F Vogel 	enum e1000_media_type media_type;
8288cfa0ad2SJack F Vogel 
8298cfa0ad2SJack F Vogel 	u16 autoneg_advertised;
8308cfa0ad2SJack F Vogel 	u16 autoneg_mask;
8318cfa0ad2SJack F Vogel 	u16 cable_length;
8328cfa0ad2SJack F Vogel 	u16 max_cable_length;
8338cfa0ad2SJack F Vogel 	u16 min_cable_length;
8348cfa0ad2SJack F Vogel 
8358cfa0ad2SJack F Vogel 	u8 mdix;
8368cfa0ad2SJack F Vogel 
8378cfa0ad2SJack F Vogel 	bool disable_polarity_correction;
8388cfa0ad2SJack F Vogel 	bool is_mdix;
8398cfa0ad2SJack F Vogel 	bool polarity_correction;
8408cfa0ad2SJack F Vogel 	bool speed_downgraded;
8418cfa0ad2SJack F Vogel 	bool autoneg_wait_to_complete;
8428cfa0ad2SJack F Vogel };
8438cfa0ad2SJack F Vogel 
8448cfa0ad2SJack F Vogel struct e1000_nvm_info {
8458cfa0ad2SJack F Vogel 	struct e1000_nvm_operations ops;
8468cfa0ad2SJack F Vogel 	enum e1000_nvm_type type;
8478cfa0ad2SJack F Vogel 	enum e1000_nvm_override override;
8488cfa0ad2SJack F Vogel 
8498cfa0ad2SJack F Vogel 	u32 flash_bank_size;
8508cfa0ad2SJack F Vogel 	u32 flash_base_addr;
8518cfa0ad2SJack F Vogel 
8528cfa0ad2SJack F Vogel 	u16 word_size;
8538cfa0ad2SJack F Vogel 	u16 delay_usec;
8548cfa0ad2SJack F Vogel 	u16 address_bits;
8558cfa0ad2SJack F Vogel 	u16 opcode_bits;
8568cfa0ad2SJack F Vogel 	u16 page_size;
8578cfa0ad2SJack F Vogel };
8588cfa0ad2SJack F Vogel 
8598cfa0ad2SJack F Vogel struct e1000_bus_info {
8608cfa0ad2SJack F Vogel 	enum e1000_bus_type type;
8618cfa0ad2SJack F Vogel 	enum e1000_bus_speed speed;
8628cfa0ad2SJack F Vogel 	enum e1000_bus_width width;
8638cfa0ad2SJack F Vogel 
8648cfa0ad2SJack F Vogel 	u16 func;
8658cfa0ad2SJack F Vogel 	u16 pci_cmd_word;
8668cfa0ad2SJack F Vogel };
8678cfa0ad2SJack F Vogel 
8688cfa0ad2SJack F Vogel struct e1000_fc_info {
8698cfa0ad2SJack F Vogel 	u32 high_water;  /* Flow control high-water mark */
8708cfa0ad2SJack F Vogel 	u32 low_water;  /* Flow control low-water mark */
8718cfa0ad2SJack F Vogel 	u16 pause_time;  /* Flow control pause timer */
872b8270585SJack F Vogel 	u16 refresh_time;  /* Flow control refresh timer */
8738cfa0ad2SJack F Vogel 	bool send_xon;  /* Flow control send XON */
8748cfa0ad2SJack F Vogel 	bool strict_ieee;  /* Strict IEEE mode */
875daf9197cSJack F Vogel 	enum e1000_fc_mode current_mode;  /* FC mode in effect */
876daf9197cSJack F Vogel 	enum e1000_fc_mode requested_mode;  /* FC mode requested by caller */
877daf9197cSJack F Vogel };
878daf9197cSJack F Vogel 
8797d9119bdSJack F Vogel struct e1000_mbx_operations {
8807d9119bdSJack F Vogel 	s32 (*init_params)(struct e1000_hw *hw);
8817d9119bdSJack F Vogel 	s32 (*read)(struct e1000_hw *, u32 *, u16,  u16);
8827d9119bdSJack F Vogel 	s32 (*write)(struct e1000_hw *, u32 *, u16, u16);
8837d9119bdSJack F Vogel 	s32 (*read_posted)(struct e1000_hw *, u32 *, u16,  u16);
8847d9119bdSJack F Vogel 	s32 (*write_posted)(struct e1000_hw *, u32 *, u16, u16);
8857d9119bdSJack F Vogel 	s32 (*check_for_msg)(struct e1000_hw *, u16);
8867d9119bdSJack F Vogel 	s32 (*check_for_ack)(struct e1000_hw *, u16);
8877d9119bdSJack F Vogel 	s32 (*check_for_rst)(struct e1000_hw *, u16);
8887d9119bdSJack F Vogel };
8897d9119bdSJack F Vogel 
8907d9119bdSJack F Vogel struct e1000_mbx_stats {
8917d9119bdSJack F Vogel 	u32 msgs_tx;
8927d9119bdSJack F Vogel 	u32 msgs_rx;
8937d9119bdSJack F Vogel 
8947d9119bdSJack F Vogel 	u32 acks;
8957d9119bdSJack F Vogel 	u32 reqs;
8967d9119bdSJack F Vogel 	u32 rsts;
8977d9119bdSJack F Vogel };
8987d9119bdSJack F Vogel 
8997d9119bdSJack F Vogel struct e1000_mbx_info {
9007d9119bdSJack F Vogel 	struct e1000_mbx_operations ops;
9017d9119bdSJack F Vogel 	struct e1000_mbx_stats stats;
9027d9119bdSJack F Vogel 	u32 timeout;
9037d9119bdSJack F Vogel 	u32 usec_delay;
9047d9119bdSJack F Vogel 	u16 size;
9057d9119bdSJack F Vogel };
9067d9119bdSJack F Vogel 
907daf9197cSJack F Vogel struct e1000_dev_spec_82541 {
908daf9197cSJack F Vogel 	enum e1000_dsp_config dsp_config;
909daf9197cSJack F Vogel 	enum e1000_ffe_config ffe_config;
910daf9197cSJack F Vogel 	u16 spd_default;
911daf9197cSJack F Vogel 	bool phy_init_script;
912daf9197cSJack F Vogel };
913daf9197cSJack F Vogel 
914daf9197cSJack F Vogel struct e1000_dev_spec_82542 {
915daf9197cSJack F Vogel 	bool dma_fairness;
916daf9197cSJack F Vogel };
917daf9197cSJack F Vogel 
918daf9197cSJack F Vogel struct e1000_dev_spec_82543 {
919daf9197cSJack F Vogel 	u32  tbi_compatibility;
920daf9197cSJack F Vogel 	bool dma_fairness;
921daf9197cSJack F Vogel 	bool init_phy_disabled;
922daf9197cSJack F Vogel };
923daf9197cSJack F Vogel 
924daf9197cSJack F Vogel struct e1000_dev_spec_82571 {
925daf9197cSJack F Vogel 	bool laa_is_present;
9269d81738fSJack F Vogel 	u32 smb_counter;
9277d9119bdSJack F Vogel 	E1000_MUTEX swflag_mutex;
928daf9197cSJack F Vogel };
929daf9197cSJack F Vogel 
9304edd8523SJack F Vogel struct e1000_dev_spec_80003es2lan {
9314edd8523SJack F Vogel 	bool  mdic_wa_enable;
9324edd8523SJack F Vogel };
9334edd8523SJack F Vogel 
934daf9197cSJack F Vogel struct e1000_shadow_ram {
935daf9197cSJack F Vogel 	u16  value;
936daf9197cSJack F Vogel 	bool modified;
937daf9197cSJack F Vogel };
938daf9197cSJack F Vogel 
939daf9197cSJack F Vogel #define E1000_SHADOW_RAM_WORDS		2048
940daf9197cSJack F Vogel 
9418cc64f1eSJack F Vogel /* I218 PHY Ultra Low Power (ULP) states */
9428cc64f1eSJack F Vogel enum e1000_ulp_state {
9438cc64f1eSJack F Vogel 	e1000_ulp_state_unknown,
9448cc64f1eSJack F Vogel 	e1000_ulp_state_off,
9458cc64f1eSJack F Vogel 	e1000_ulp_state_on,
9468cc64f1eSJack F Vogel };
9478cc64f1eSJack F Vogel 
948daf9197cSJack F Vogel struct e1000_dev_spec_ich8lan {
949daf9197cSJack F Vogel 	bool kmrn_lock_loss_workaround_enabled;
950daf9197cSJack F Vogel 	struct e1000_shadow_ram shadow_ram[E1000_SHADOW_RAM_WORDS];
9514edd8523SJack F Vogel 	E1000_MUTEX nvm_mutex;
9524edd8523SJack F Vogel 	E1000_MUTEX swflag_mutex;
9534edd8523SJack F Vogel 	bool nvm_k1_enabled;
954ab5d0362SJack F Vogel 	bool eee_disable;
9556ab6bfe3SJack F Vogel 	u16 eee_lp_ability;
9568cc64f1eSJack F Vogel 	enum e1000_ulp_state ulp_state;
957b8270585SJack F Vogel };
958b8270585SJack F Vogel 
959daf9197cSJack F Vogel struct e1000_dev_spec_82575 {
960daf9197cSJack F Vogel 	bool sgmii_active;
961d035aa2dSJack F Vogel 	bool global_device_reset;
962ab5d0362SJack F Vogel 	bool eee_disable;
9634dab5c37SJack F Vogel 	bool module_plugged;
9646ab6bfe3SJack F Vogel 	bool clear_semaphore_once;
9654dab5c37SJack F Vogel 	u32 mtu;
9666ab6bfe3SJack F Vogel 	struct sfp_e1000_flags eth_flags;
9677609433eSJack F Vogel 	u8 media_port;
9687609433eSJack F Vogel 	bool media_changed;
969daf9197cSJack F Vogel };
970daf9197cSJack F Vogel 
971daf9197cSJack F Vogel struct e1000_dev_spec_vf {
972daf9197cSJack F Vogel 	u32 vf_number;
973d035aa2dSJack F Vogel 	u32 v2p_mailbox;
9748cfa0ad2SJack F Vogel };
9758cfa0ad2SJack F Vogel 
9768cfa0ad2SJack F Vogel struct e1000_hw {
9778cfa0ad2SJack F Vogel 	void *back;
9788cfa0ad2SJack F Vogel 
9798cfa0ad2SJack F Vogel 	u8 *hw_addr;
9808cfa0ad2SJack F Vogel 	u8 *flash_address;
9818cfa0ad2SJack F Vogel 	unsigned long io_base;
9828cfa0ad2SJack F Vogel 
9838cfa0ad2SJack F Vogel 	struct e1000_mac_info  mac;
9848cfa0ad2SJack F Vogel 	struct e1000_fc_info   fc;
9858cfa0ad2SJack F Vogel 	struct e1000_phy_info  phy;
9868cfa0ad2SJack F Vogel 	struct e1000_nvm_info  nvm;
9878cfa0ad2SJack F Vogel 	struct e1000_bus_info  bus;
988b8270585SJack F Vogel 	struct e1000_mbx_info mbx;
9898cfa0ad2SJack F Vogel 	struct e1000_host_mng_dhcp_cookie mng_cookie;
9908cfa0ad2SJack F Vogel 
991daf9197cSJack F Vogel 	union {
992daf9197cSJack F Vogel 		struct e1000_dev_spec_82541 _82541;
993daf9197cSJack F Vogel 		struct e1000_dev_spec_82542 _82542;
994daf9197cSJack F Vogel 		struct e1000_dev_spec_82543 _82543;
995daf9197cSJack F Vogel 		struct e1000_dev_spec_82571 _82571;
9964edd8523SJack F Vogel 		struct e1000_dev_spec_80003es2lan _80003es2lan;
997daf9197cSJack F Vogel 		struct e1000_dev_spec_ich8lan ich8lan;
998daf9197cSJack F Vogel 		struct e1000_dev_spec_82575 _82575;
999daf9197cSJack F Vogel 		struct e1000_dev_spec_vf vf;
1000daf9197cSJack F Vogel 	} dev_spec;
10018cfa0ad2SJack F Vogel 
10028cfa0ad2SJack F Vogel 	u16 device_id;
10038cfa0ad2SJack F Vogel 	u16 subsystem_vendor_id;
10048cfa0ad2SJack F Vogel 	u16 subsystem_device_id;
10058cfa0ad2SJack F Vogel 	u16 vendor_id;
10068cfa0ad2SJack F Vogel 
10078cfa0ad2SJack F Vogel 	u8  revision_id;
10088cfa0ad2SJack F Vogel };
10098cfa0ad2SJack F Vogel 
10108cfa0ad2SJack F Vogel #include "e1000_82541.h"
10118cfa0ad2SJack F Vogel #include "e1000_82543.h"
10128cfa0ad2SJack F Vogel #include "e1000_82571.h"
10138cfa0ad2SJack F Vogel #include "e1000_80003es2lan.h"
10148cfa0ad2SJack F Vogel #include "e1000_ich8lan.h"
10158cfa0ad2SJack F Vogel #include "e1000_82575.h"
1016ab5d0362SJack F Vogel #include "e1000_i210.h"
10178cfa0ad2SJack F Vogel 
10188cfa0ad2SJack F Vogel /* These functions must be implemented by drivers */
10198cfa0ad2SJack F Vogel void e1000_pci_clear_mwi(struct e1000_hw *hw);
10208cfa0ad2SJack F Vogel void e1000_pci_set_mwi(struct e1000_hw *hw);
10218cfa0ad2SJack F Vogel s32  e1000_read_pcie_cap_reg(struct e1000_hw *hw, u32 reg, u16 *value);
10229d81738fSJack F Vogel s32  e1000_write_pcie_cap_reg(struct e1000_hw *hw, u32 reg, u16 *value);
10238cfa0ad2SJack F Vogel void e1000_read_pci_cfg(struct e1000_hw *hw, u32 reg, u16 *value);
10248cfa0ad2SJack F Vogel void e1000_write_pci_cfg(struct e1000_hw *hw, u32 reg, u16 *value);
10258cfa0ad2SJack F Vogel 
10268cfa0ad2SJack F Vogel #endif
1027