xref: /onnv-gate/usr/src/uts/common/io/e1000g/e1000_hw.h (revision 11020:e0feef27b61a)
13526Sxy150489 /*
23526Sxy150489  * This file is provided under a CDDLv1 license.  When using or
33526Sxy150489  * redistributing this file, you may do so under this license.
43526Sxy150489  * In redistributing this file this license must be included
53526Sxy150489  * and no other modification of this header file is permitted.
63526Sxy150489  *
73526Sxy150489  * CDDL LICENSE SUMMARY
83526Sxy150489  *
98479SChenlu.Chen@Sun.COM  * Copyright(c) 1999 - 2009 Intel Corporation. All rights reserved.
103526Sxy150489  *
113526Sxy150489  * The contents of this file are subject to the terms of Version
123526Sxy150489  * 1.0 of the Common Development and Distribution License (the "License").
133526Sxy150489  *
143526Sxy150489  * You should have received a copy of the License with this software.
153526Sxy150489  * You can obtain a copy of the License at
163526Sxy150489  *	http://www.opensolaris.org/os/licensing.
173526Sxy150489  * See the License for the specific language governing permissions
183526Sxy150489  * and limitations under the License.
193526Sxy150489  */
203526Sxy150489 
213526Sxy150489 /*
228479SChenlu.Chen@Sun.COM  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
233526Sxy150489  * Use is subject to license terms of the CDDLv1.
243526Sxy150489  */
253526Sxy150489 
263526Sxy150489 /*
27*11020SMin.Xu@Sun.COM  * IntelVersion: 1.439 v3-1-10-1_2009-9-18_Release14-6
283526Sxy150489  */
293526Sxy150489 #ifndef _E1000_HW_H_
304919Sxy150489 #define	_E1000_HW_H_
313526Sxy150489 
324919Sxy150489 #ifdef __cplusplus
334919Sxy150489 extern "C" {
344919Sxy150489 #endif
353526Sxy150489 
364919Sxy150489 #include "e1000_osdep.h"
374919Sxy150489 #include "e1000_regs.h"
384919Sxy150489 #include "e1000_defines.h"
393526Sxy150489 
403526Sxy150489 struct e1000_hw;
413526Sxy150489 
424919Sxy150489 #define	E1000_DEV_ID_82542			0x1000
434919Sxy150489 #define	E1000_DEV_ID_82543GC_FIBER		0x1001
444919Sxy150489 #define	E1000_DEV_ID_82543GC_COPPER		0x1004
454919Sxy150489 #define	E1000_DEV_ID_82544EI_COPPER		0x1008
464919Sxy150489 #define	E1000_DEV_ID_82544EI_FIBER		0x1009
474919Sxy150489 #define	E1000_DEV_ID_82544GC_COPPER		0x100C
484919Sxy150489 #define	E1000_DEV_ID_82544GC_LOM		0x100D
494919Sxy150489 #define	E1000_DEV_ID_82540EM			0x100E
504919Sxy150489 #define	E1000_DEV_ID_82540EM_LOM		0x1015
514919Sxy150489 #define	E1000_DEV_ID_82540EP_LOM		0x1016
524919Sxy150489 #define	E1000_DEV_ID_82540EP			0x1017
534919Sxy150489 #define	E1000_DEV_ID_82540EP_LP			0x101E
544919Sxy150489 #define	E1000_DEV_ID_82545EM_COPPER		0x100F
554919Sxy150489 #define	E1000_DEV_ID_82545EM_FIBER		0x1011
564919Sxy150489 #define	E1000_DEV_ID_82545GM_COPPER		0x1026
574919Sxy150489 #define	E1000_DEV_ID_82545GM_FIBER		0x1027
584919Sxy150489 #define	E1000_DEV_ID_82545GM_SERDES		0x1028
594919Sxy150489 #define	E1000_DEV_ID_82546EB_COPPER		0x1010
604919Sxy150489 #define	E1000_DEV_ID_82546EB_FIBER		0x1012
614919Sxy150489 #define	E1000_DEV_ID_82546EB_QUAD_COPPER	0x101D
624919Sxy150489 #define	E1000_DEV_ID_82546GB_COPPER		0x1079
634919Sxy150489 #define	E1000_DEV_ID_82546GB_FIBER		0x107A
644919Sxy150489 #define	E1000_DEV_ID_82546GB_SERDES		0x107B
654919Sxy150489 #define	E1000_DEV_ID_82546GB_PCIE		0x108A
664919Sxy150489 #define	E1000_DEV_ID_82546GB_QUAD_COPPER	0x1099
674919Sxy150489 #define	E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3	0x10B5
684919Sxy150489 #define	E1000_DEV_ID_82541EI			0x1013
694919Sxy150489 #define	E1000_DEV_ID_82541EI_MOBILE		0x1018
704919Sxy150489 #define	E1000_DEV_ID_82541ER_LOM		0x1014
714919Sxy150489 #define	E1000_DEV_ID_82541ER			0x1078
724919Sxy150489 #define	E1000_DEV_ID_82541GI			0x1076
734919Sxy150489 #define	E1000_DEV_ID_82541GI_LF			0x107C
744919Sxy150489 #define	E1000_DEV_ID_82541GI_MOBILE		0x1077
754919Sxy150489 #define	E1000_DEV_ID_82547EI			0x1019
764919Sxy150489 #define	E1000_DEV_ID_82547EI_MOBILE		0x101A
774919Sxy150489 #define	E1000_DEV_ID_82547GI			0x1075
784919Sxy150489 #define	E1000_DEV_ID_82571EB_COPPER		0x105E
794919Sxy150489 #define	E1000_DEV_ID_82571EB_FIBER		0x105F
804919Sxy150489 #define	E1000_DEV_ID_82571EB_SERDES		0x1060
814919Sxy150489 #define	E1000_DEV_ID_82571EB_SERDES_DUAL	0x10D9
824919Sxy150489 #define	E1000_DEV_ID_82571EB_SERDES_QUAD	0x10DA
834919Sxy150489 #define	E1000_DEV_ID_82571EB_QUAD_COPPER	0x10A4
844919Sxy150489 #define	E1000_DEV_ID_82571PT_QUAD_COPPER	0x10D5
854919Sxy150489 #define	E1000_DEV_ID_82571EB_QUAD_FIBER		0x10A5
864919Sxy150489 #define	E1000_DEV_ID_82571EB_QUAD_COPPER_LP	0x10BC
874919Sxy150489 #define	E1000_DEV_ID_82572EI_COPPER		0x107D
884919Sxy150489 #define	E1000_DEV_ID_82572EI_FIBER		0x107E
894919Sxy150489 #define	E1000_DEV_ID_82572EI_SERDES		0x107F
904919Sxy150489 #define	E1000_DEV_ID_82572EI			0x10B9
914919Sxy150489 #define	E1000_DEV_ID_82573E			0x108B
924919Sxy150489 #define	E1000_DEV_ID_82573E_IAMT		0x108C
934919Sxy150489 #define	E1000_DEV_ID_82573L			0x109A
947607STed.You@Sun.COM #define	E1000_DEV_ID_82574L			0x10D3
9510680SMin.Xu@Sun.COM #define	E1000_DEV_ID_82574LA			0x10F6
9610680SMin.Xu@Sun.COM #define	E1000_DEV_ID_82583V			0x150C
974919Sxy150489 #define	E1000_DEV_ID_80003ES2LAN_COPPER_DPT	0x1096
984919Sxy150489 #define	E1000_DEV_ID_80003ES2LAN_SERDES_DPT	0x1098
994919Sxy150489 #define	E1000_DEV_ID_80003ES2LAN_COPPER_SPT	0x10BA
1004919Sxy150489 #define	E1000_DEV_ID_80003ES2LAN_SERDES_SPT	0x10BB
1014919Sxy150489 #define	E1000_DEV_ID_ICH8_IGP_M_AMT		0x1049
1024919Sxy150489 #define	E1000_DEV_ID_ICH8_IGP_AMT		0x104A
1034919Sxy150489 #define	E1000_DEV_ID_ICH8_IGP_C			0x104B
1044919Sxy150489 #define	E1000_DEV_ID_ICH8_IFE			0x104C
1054919Sxy150489 #define	E1000_DEV_ID_ICH8_IFE_GT		0x10C4
1064919Sxy150489 #define	E1000_DEV_ID_ICH8_IFE_G			0x10C5
1074919Sxy150489 #define	E1000_DEV_ID_ICH8_IGP_M			0x104D
1086735Scc210113 #define	E1000_DEV_ID_ICH9_IGP_M			0x10BF
1096735Scc210113 #define	E1000_DEV_ID_ICH9_IGP_M_AMT		0x10F5
1106735Scc210113 #define	E1000_DEV_ID_ICH9_IGP_M_V		0x10CB
1114919Sxy150489 #define	E1000_DEV_ID_ICH9_IGP_AMT		0x10BD
1126735Scc210113 #define	E1000_DEV_ID_ICH9_BM			0x10E5
1134919Sxy150489 #define	E1000_DEV_ID_ICH9_IGP_C			0x294C
1144919Sxy150489 #define	E1000_DEV_ID_ICH9_IFE			0x10C0
1154919Sxy150489 #define	E1000_DEV_ID_ICH9_IFE_GT		0x10C3
1164919Sxy150489 #define	E1000_DEV_ID_ICH9_IFE_G			0x10C2
1177607STed.You@Sun.COM #define	E1000_DEV_ID_ICH10_R_BM_LM		0x10CC
1187607STed.You@Sun.COM #define	E1000_DEV_ID_ICH10_R_BM_LF		0x10CD
1197607STed.You@Sun.COM #define	E1000_DEV_ID_ICH10_R_BM_V		0x10CE
12010680SMin.Xu@Sun.COM #define	E1000_DEV_ID_ICH10_HANKSVILLE		0xF0FE
1217607STed.You@Sun.COM #define	E1000_DEV_ID_ICH10_D_BM_LM		0x10DE
1227607STed.You@Sun.COM #define	E1000_DEV_ID_ICH10_D_BM_LF		0x10DF
12310680SMin.Xu@Sun.COM #define	E1000_DEV_ID_PCH_M_HV_LM		0x10EA
12410680SMin.Xu@Sun.COM #define	E1000_DEV_ID_PCH_M_HV_LC		0x10EB
12510680SMin.Xu@Sun.COM #define	E1000_DEV_ID_PCH_D_HV_DM		0x10EF
12610680SMin.Xu@Sun.COM #define	E1000_DEV_ID_PCH_D_HV_DC		0x10F0
1274919Sxy150489 
1284919Sxy150489 #define	E1000_REVISION_0	0
1294919Sxy150489 #define	E1000_REVISION_1	1
1304919Sxy150489 #define	E1000_REVISION_2	2
1314919Sxy150489 #define	E1000_REVISION_3	3
1324919Sxy150489 #define	E1000_REVISION_4	4
1334919Sxy150489 
1344919Sxy150489 #define	E1000_FUNC_0	0
1354919Sxy150489 #define	E1000_FUNC_1	1
1364919Sxy150489 
13710680SMin.Xu@Sun.COM #define	E1000_ALT_MAC_ADDRESS_OFFSET_LAN0	0
13810680SMin.Xu@Sun.COM #define	E1000_ALT_MAC_ADDRESS_OFFSET_LAN1	3
13910680SMin.Xu@Sun.COM 
14010680SMin.Xu@Sun.COM /* Maximum size of the MTA register table in all supported adapters */
14110680SMin.Xu@Sun.COM #define	MAX_MTA_REG 128
14210680SMin.Xu@Sun.COM 
1438479SChenlu.Chen@Sun.COM enum e1000_mac_type {
1444919Sxy150489 	e1000_undefined = 0,
1454919Sxy150489 	e1000_82542,
1464919Sxy150489 	e1000_82543,
1474919Sxy150489 	e1000_82544,
1484919Sxy150489 	e1000_82540,
1494919Sxy150489 	e1000_82545,
1504919Sxy150489 	e1000_82545_rev_3,
1514919Sxy150489 	e1000_82546,
1524919Sxy150489 	e1000_82546_rev_3,
1534919Sxy150489 	e1000_82541,
1544919Sxy150489 	e1000_82541_rev_2,
1554919Sxy150489 	e1000_82547,
1564919Sxy150489 	e1000_82547_rev_2,
1574919Sxy150489 	e1000_82571,
1584919Sxy150489 	e1000_82572,
1594919Sxy150489 	e1000_82573,
1607607STed.You@Sun.COM 	e1000_82574,
16110680SMin.Xu@Sun.COM 	e1000_82583,
1624919Sxy150489 	e1000_80003es2lan,
1634919Sxy150489 	e1000_ich8lan,
1644919Sxy150489 	e1000_ich9lan,
1657607STed.You@Sun.COM 	e1000_ich10lan,
16610680SMin.Xu@Sun.COM 	e1000_pchlan,
1674919Sxy150489 	e1000_num_macs	/* List is 1-based, so subtract 1 for true count. */
1688479SChenlu.Chen@Sun.COM };
1693526Sxy150489 
1708479SChenlu.Chen@Sun.COM enum e1000_media_type {
1714919Sxy150489 	e1000_media_type_unknown = 0,
1724919Sxy150489 	e1000_media_type_copper = 1,
1734919Sxy150489 	e1000_media_type_fiber = 2,
1744919Sxy150489 	e1000_media_type_internal_serdes = 3,
1754919Sxy150489 	e1000_num_media_types
1768479SChenlu.Chen@Sun.COM };
1773526Sxy150489 
1788479SChenlu.Chen@Sun.COM enum e1000_nvm_type {
1794919Sxy150489 	e1000_nvm_unknown = 0,
1804919Sxy150489 	e1000_nvm_none,
1814919Sxy150489 	e1000_nvm_eeprom_spi,
1824919Sxy150489 	e1000_nvm_eeprom_microwire,
1834919Sxy150489 	e1000_nvm_flash_hw,
1844919Sxy150489 	e1000_nvm_flash_sw
1858479SChenlu.Chen@Sun.COM };
1864919Sxy150489 
1878479SChenlu.Chen@Sun.COM enum e1000_nvm_override {
1884919Sxy150489 	e1000_nvm_override_none = 0,
1894919Sxy150489 	e1000_nvm_override_spi_small,
1904919Sxy150489 	e1000_nvm_override_spi_large,
1914919Sxy150489 	e1000_nvm_override_microwire_small,
1924919Sxy150489 	e1000_nvm_override_microwire_large
1938479SChenlu.Chen@Sun.COM };
1943526Sxy150489 
1958479SChenlu.Chen@Sun.COM enum e1000_phy_type {
1964919Sxy150489 	e1000_phy_unknown = 0,
1974919Sxy150489 	e1000_phy_none,
1984919Sxy150489 	e1000_phy_m88,
1994919Sxy150489 	e1000_phy_igp,
2004919Sxy150489 	e1000_phy_igp_2,
2014919Sxy150489 	e1000_phy_gg82563,
2024919Sxy150489 	e1000_phy_igp_3,
2034919Sxy150489 	e1000_phy_ife,
2047607STed.You@Sun.COM 	e1000_phy_bm,
20510680SMin.Xu@Sun.COM 	e1000_phy_82578,
20610680SMin.Xu@Sun.COM 	e1000_phy_82577,
2078479SChenlu.Chen@Sun.COM };
2083526Sxy150489 
2098479SChenlu.Chen@Sun.COM enum e1000_bus_type {
2104919Sxy150489 	e1000_bus_type_unknown = 0,
2114919Sxy150489 	e1000_bus_type_pci,
2124919Sxy150489 	e1000_bus_type_pcix,
2134919Sxy150489 	e1000_bus_type_pci_express,
2144919Sxy150489 	e1000_bus_type_reserved
2158479SChenlu.Chen@Sun.COM };
2163526Sxy150489 
2178479SChenlu.Chen@Sun.COM enum e1000_bus_speed {
2184919Sxy150489 	e1000_bus_speed_unknown = 0,
2194919Sxy150489 	e1000_bus_speed_33,
2204919Sxy150489 	e1000_bus_speed_66,
2214919Sxy150489 	e1000_bus_speed_100,
2224919Sxy150489 	e1000_bus_speed_120,
2234919Sxy150489 	e1000_bus_speed_133,
2244919Sxy150489 	e1000_bus_speed_2500,
2256735Scc210113 	e1000_bus_speed_5000,
2264919Sxy150489 	e1000_bus_speed_reserved
2278479SChenlu.Chen@Sun.COM };
2283526Sxy150489 
2298479SChenlu.Chen@Sun.COM enum e1000_bus_width {
2304919Sxy150489 	e1000_bus_width_unknown = 0,
2314919Sxy150489 	e1000_bus_width_pcie_x1,
2324919Sxy150489 	e1000_bus_width_pcie_x2,
2334919Sxy150489 	e1000_bus_width_pcie_x4 = 4,
2346735Scc210113 	e1000_bus_width_pcie_x8 = 8,
2354919Sxy150489 	e1000_bus_width_32,
2364919Sxy150489 	e1000_bus_width_64,
2374919Sxy150489 	e1000_bus_width_reserved
2388479SChenlu.Chen@Sun.COM };
2393526Sxy150489 
2408479SChenlu.Chen@Sun.COM enum e1000_1000t_rx_status {
2414919Sxy150489 	e1000_1000t_rx_status_not_ok = 0,
2424919Sxy150489 	e1000_1000t_rx_status_ok,
2434919Sxy150489 	e1000_1000t_rx_status_undefined = 0xFF
2448479SChenlu.Chen@Sun.COM };
2453526Sxy150489 
2468479SChenlu.Chen@Sun.COM enum e1000_rev_polarity {
2474919Sxy150489 	e1000_rev_polarity_normal = 0,
2484919Sxy150489 	e1000_rev_polarity_reversed,
2494919Sxy150489 	e1000_rev_polarity_undefined = 0xFF
2508479SChenlu.Chen@Sun.COM };
2513526Sxy150489 
2528479SChenlu.Chen@Sun.COM enum e1000_fc_mode {
2534919Sxy150489 	e1000_fc_none = 0,
2544919Sxy150489 	e1000_fc_rx_pause,
2554919Sxy150489 	e1000_fc_tx_pause,
2564919Sxy150489 	e1000_fc_full,
2574919Sxy150489 	e1000_fc_default = 0xFF
2588479SChenlu.Chen@Sun.COM };
2593526Sxy150489 
2608479SChenlu.Chen@Sun.COM enum e1000_ffe_config {
2614919Sxy150489 	e1000_ffe_config_enabled = 0,
2624919Sxy150489 	e1000_ffe_config_active,
2634919Sxy150489 	e1000_ffe_config_blocked
2648479SChenlu.Chen@Sun.COM };
2653526Sxy150489 
2668479SChenlu.Chen@Sun.COM enum e1000_dsp_config {
2674919Sxy150489 	e1000_dsp_config_disabled = 0,
2684919Sxy150489 	e1000_dsp_config_enabled,
2694919Sxy150489 	e1000_dsp_config_activated,
2704919Sxy150489 	e1000_dsp_config_undefined = 0xFF
2718479SChenlu.Chen@Sun.COM };
2728479SChenlu.Chen@Sun.COM 
2738479SChenlu.Chen@Sun.COM enum e1000_ms_type {
2748479SChenlu.Chen@Sun.COM 	e1000_ms_hw_default = 0,
2758479SChenlu.Chen@Sun.COM 	e1000_ms_force_master,
2768479SChenlu.Chen@Sun.COM 	e1000_ms_force_slave,
2778479SChenlu.Chen@Sun.COM 	e1000_ms_auto
2788479SChenlu.Chen@Sun.COM };
2798479SChenlu.Chen@Sun.COM 
2808479SChenlu.Chen@Sun.COM enum e1000_smart_speed {
2818479SChenlu.Chen@Sun.COM 	e1000_smart_speed_default = 0,
2828479SChenlu.Chen@Sun.COM 	e1000_smart_speed_on,
2838479SChenlu.Chen@Sun.COM 	e1000_smart_speed_off
2848479SChenlu.Chen@Sun.COM };
2853526Sxy150489 
28610680SMin.Xu@Sun.COM enum e1000_serdes_link_state {
28710680SMin.Xu@Sun.COM 	e1000_serdes_link_down = 0,
28810680SMin.Xu@Sun.COM 	e1000_serdes_link_autoneg_progress,
28910680SMin.Xu@Sun.COM 	e1000_serdes_link_autoneg_complete,
29010680SMin.Xu@Sun.COM 	e1000_serdes_link_forced_up
29110680SMin.Xu@Sun.COM };
29210680SMin.Xu@Sun.COM 
2933526Sxy150489 /* Receive Descriptor */
2943526Sxy150489 struct e1000_rx_desc {
2958479SChenlu.Chen@Sun.COM 	__le64 buffer_addr;	/* Address of the descriptor's data buffer */
2968479SChenlu.Chen@Sun.COM 	__le16 length;		/* Length of data DMAed into data buffer */
2978479SChenlu.Chen@Sun.COM 	__le16 csum;		/* Packet checksum */
2984919Sxy150489 	u8 status;		/* Descriptor status */
2994919Sxy150489 	u8 errors;		/* Descriptor Errors */
3008479SChenlu.Chen@Sun.COM 	__le16 special;
3013526Sxy150489 };
3023526Sxy150489 
3033526Sxy150489 /* Receive Descriptor - Extended */
3043526Sxy150489 union e1000_rx_desc_extended {
3054919Sxy150489 	struct {
3068479SChenlu.Chen@Sun.COM 		__le64 buffer_addr;
3078479SChenlu.Chen@Sun.COM 		__le64 reserved;
3084919Sxy150489 	} read;
3094919Sxy150489 	struct {
3104919Sxy150489 		struct {
3118479SChenlu.Chen@Sun.COM 			__le32 mrq;		/* Multiple Rx Queues */
3124919Sxy150489 			union {
3138479SChenlu.Chen@Sun.COM 				__le32 rss;	/* RSS Hash */
3144919Sxy150489 				struct {
3158479SChenlu.Chen@Sun.COM 					__le16 ip_id;  /* IP id */
3168479SChenlu.Chen@Sun.COM 					__le16 csum;   /* Packet Checksum */
3174919Sxy150489 				} csum_ip;
3184919Sxy150489 			} hi_dword;
3194919Sxy150489 		} lower;
3204919Sxy150489 		struct {
3218479SChenlu.Chen@Sun.COM 			__le32 status_error;	/* ext status/error */
3228479SChenlu.Chen@Sun.COM 			__le16 length;
3238479SChenlu.Chen@Sun.COM 			__le16 vlan;		/* VLAN tag */
3244919Sxy150489 		} upper;
3258479SChenlu.Chen@Sun.COM 	} wb;  /* writeback */
3263526Sxy150489 };
3273526Sxy150489 
3284919Sxy150489 #define	MAX_PS_BUFFERS 4
3294919Sxy150489 /* Receive Descriptor - Packet Split */
3304919Sxy150489 union e1000_rx_desc_packet_split {
3314919Sxy150489 	struct {
3324919Sxy150489 		/* one buffer for protocol header(s), three data buffers */
3338479SChenlu.Chen@Sun.COM 		__le64 buffer_addr[MAX_PS_BUFFERS];
3344919Sxy150489 	} read;
3354919Sxy150489 	struct {
3364919Sxy150489 		struct {
3378479SChenlu.Chen@Sun.COM 			__le32 mrq;		/* Multiple Rx Queues */
3384919Sxy150489 			union {
3398479SChenlu.Chen@Sun.COM 				__le32 rss;	/* RSS Hash */
3404919Sxy150489 				struct {
3418479SChenlu.Chen@Sun.COM 					__le16 ip_id;	/* IP id */
3428479SChenlu.Chen@Sun.COM 					__le16 csum;	/* Packet Checksum */
3434919Sxy150489 				} csum_ip;
3444919Sxy150489 			} hi_dword;
3454919Sxy150489 		} lower;
3464919Sxy150489 		struct {
3478479SChenlu.Chen@Sun.COM 			__le32 status_error;	/* ext status/error */
3488479SChenlu.Chen@Sun.COM 			__le16 length0;		/* length of buffer 0 */
3498479SChenlu.Chen@Sun.COM 			__le16 vlan;		/* VLAN tag */
3504919Sxy150489 		} middle;
3514919Sxy150489 		struct {
3528479SChenlu.Chen@Sun.COM 			__le16 header_status;
3538479SChenlu.Chen@Sun.COM 			__le16 length[3];	/* length of buffers 1-3 */
3544919Sxy150489 		} upper;
3558479SChenlu.Chen@Sun.COM 		__le64 reserved;
3568479SChenlu.Chen@Sun.COM 	} wb; /* writeback */
3574919Sxy150489 };
3583526Sxy150489 
3593526Sxy150489 /* Transmit Descriptor */
3603526Sxy150489 struct e1000_tx_desc {
3618479SChenlu.Chen@Sun.COM 	__le64 buffer_addr;   /* Address of the descriptor's data buffer */
3624919Sxy150489 	union {
3638479SChenlu.Chen@Sun.COM 		__le32 data;
3644919Sxy150489 		struct {
3658479SChenlu.Chen@Sun.COM 			__le16 length;	/* Data buffer length */
3668479SChenlu.Chen@Sun.COM 			u8 cso;		/* Checksum offset */
3678479SChenlu.Chen@Sun.COM 			u8 cmd;		/* Descriptor control */
3684919Sxy150489 		} flags;
3694919Sxy150489 	} lower;
3704919Sxy150489 	union {
3718479SChenlu.Chen@Sun.COM 		__le32 data;
3724919Sxy150489 		struct {
3734919Sxy150489 			u8 status;	/* Descriptor status */
3748479SChenlu.Chen@Sun.COM 			u8 css;		/* Checksum start */
3758479SChenlu.Chen@Sun.COM 			__le16 special;
3764919Sxy150489 		} fields;
3774919Sxy150489 	} upper;
3783526Sxy150489 };
3793526Sxy150489 
3803526Sxy150489 /* Offload Context Descriptor */
3813526Sxy150489 struct e1000_context_desc {
3824919Sxy150489 	union {
3838479SChenlu.Chen@Sun.COM 		__le32 ip_config;
3844919Sxy150489 		struct {
3854919Sxy150489 			u8 ipcss;	/* IP checksum start */
3864919Sxy150489 			u8 ipcso;	/* IP checksum offset */
3878479SChenlu.Chen@Sun.COM 			__le16 ipcse;	/* IP checksum end */
3884919Sxy150489 		} ip_fields;
3894919Sxy150489 	} lower_setup;
3904919Sxy150489 	union {
3918479SChenlu.Chen@Sun.COM 		__le32 tcp_config;
3924919Sxy150489 		struct {
3934919Sxy150489 			u8 tucss;	/* TCP checksum start */
3944919Sxy150489 			u8 tucso;	/* TCP checksum offset */
3958479SChenlu.Chen@Sun.COM 			__le16 tucse;	/* TCP checksum end */
3964919Sxy150489 		} tcp_fields;
3974919Sxy150489 	} upper_setup;
3988479SChenlu.Chen@Sun.COM 	__le32 cmd_and_length;
3994919Sxy150489 	union {
4008479SChenlu.Chen@Sun.COM 		__le32 data;
4014919Sxy150489 		struct {
4024919Sxy150489 			u8 status;	/* Descriptor status */
4034919Sxy150489 			u8 hdr_len;	/* Header length */
4048479SChenlu.Chen@Sun.COM 			__le16 mss;	/* Maximum segment size */
4054919Sxy150489 		} fields;
4064919Sxy150489 	} tcp_seg_setup;
4073526Sxy150489 };
4083526Sxy150489 
4093526Sxy150489 /* Offload data descriptor */
4103526Sxy150489 struct e1000_data_desc {
4118479SChenlu.Chen@Sun.COM 	__le64 buffer_addr;   /* Address of the descriptor's buffer address */
4124919Sxy150489 	union {
4138479SChenlu.Chen@Sun.COM 		__le32 data;
4144919Sxy150489 		struct {
4158479SChenlu.Chen@Sun.COM 			__le16 length;    /* Data buffer length */
4164919Sxy150489 			u8 typ_len_ext;
4174919Sxy150489 			u8 cmd;
4184919Sxy150489 		} flags;
4194919Sxy150489 	} lower;
4204919Sxy150489 	union {
4218479SChenlu.Chen@Sun.COM 		__le32 data;
4224919Sxy150489 		struct {
4234919Sxy150489 			u8 status;	/* Descriptor status */
4244919Sxy150489 			u8 popts;	/* Packet Options */
4258479SChenlu.Chen@Sun.COM 			__le16 special;
4264919Sxy150489 		} fields;
4274919Sxy150489 	} upper;
4283526Sxy150489 };
4293526Sxy150489 
4303526Sxy150489 /* Statistics counters collected by the MAC */
4313526Sxy150489 struct e1000_hw_stats {
4324919Sxy150489 	u64 crcerrs;
4334919Sxy150489 	u64 algnerrc;
4344919Sxy150489 	u64 symerrs;
4354919Sxy150489 	u64 rxerrc;
4364919Sxy150489 	u64 mpc;
4374919Sxy150489 	u64 scc;
4384919Sxy150489 	u64 ecol;
4394919Sxy150489 	u64 mcc;
4404919Sxy150489 	u64 latecol;
4414919Sxy150489 	u64 colc;
4424919Sxy150489 	u64 dc;
4434919Sxy150489 	u64 tncrs;
4444919Sxy150489 	u64 sec;
4454919Sxy150489 	u64 cexterr;
4464919Sxy150489 	u64 rlec;
4474919Sxy150489 	u64 xonrxc;
4484919Sxy150489 	u64 xontxc;
4494919Sxy150489 	u64 xoffrxc;
4504919Sxy150489 	u64 xofftxc;
4514919Sxy150489 	u64 fcruc;
4524919Sxy150489 	u64 prc64;
4534919Sxy150489 	u64 prc127;
4544919Sxy150489 	u64 prc255;
4554919Sxy150489 	u64 prc511;
4564919Sxy150489 	u64 prc1023;
4574919Sxy150489 	u64 prc1522;
4584919Sxy150489 	u64 gprc;
4594919Sxy150489 	u64 bprc;
4604919Sxy150489 	u64 mprc;
4614919Sxy150489 	u64 gptc;
4626735Scc210113 	u64 gorc;
4636735Scc210113 	u64 gotc;
4644919Sxy150489 	u64 rnbc;
4654919Sxy150489 	u64 ruc;
4664919Sxy150489 	u64 rfc;
4674919Sxy150489 	u64 roc;
4684919Sxy150489 	u64 rjc;
4694919Sxy150489 	u64 mgprc;
4704919Sxy150489 	u64 mgpdc;
4714919Sxy150489 	u64 mgptc;
4726735Scc210113 	u64 tor;
4736735Scc210113 	u64 tot;
4744919Sxy150489 	u64 tpr;
4754919Sxy150489 	u64 tpt;
4764919Sxy150489 	u64 ptc64;
4774919Sxy150489 	u64 ptc127;
4784919Sxy150489 	u64 ptc255;
4794919Sxy150489 	u64 ptc511;
4804919Sxy150489 	u64 ptc1023;
4814919Sxy150489 	u64 ptc1522;
4824919Sxy150489 	u64 mptc;
4834919Sxy150489 	u64 bptc;
4844919Sxy150489 	u64 tsctc;
4854919Sxy150489 	u64 tsctfc;
4864919Sxy150489 	u64 iac;
4874919Sxy150489 	u64 icrxptc;
4884919Sxy150489 	u64 icrxatc;
4894919Sxy150489 	u64 ictxptc;
4904919Sxy150489 	u64 ictxatc;
4914919Sxy150489 	u64 ictxqec;
4924919Sxy150489 	u64 ictxqmtc;
4934919Sxy150489 	u64 icrxdmtc;
4944919Sxy150489 	u64 icrxoc;
4954919Sxy150489 	u64 cbtmpc;
4964919Sxy150489 	u64 htdpmc;
4974919Sxy150489 	u64 cbrdpc;
4984919Sxy150489 	u64 cbrmpc;
4994919Sxy150489 	u64 rpthc;
5004919Sxy150489 	u64 hgptc;
5014919Sxy150489 	u64 htcbdpc;
5026735Scc210113 	u64 hgorc;
5036735Scc210113 	u64 hgotc;
5044919Sxy150489 	u64 lenerrs;
5054919Sxy150489 	u64 scvpc;
5064919Sxy150489 	u64 hrmpc;
5078479SChenlu.Chen@Sun.COM 	u64 doosync;
5083526Sxy150489 };
5093526Sxy150489 
5104919Sxy150489 struct e1000_phy_stats {
5114919Sxy150489 	u32 idle_errors;
5124919Sxy150489 	u32 receive_errors;
5134919Sxy150489 };
5143526Sxy150489 
5154919Sxy150489 struct e1000_host_mng_dhcp_cookie {
5164919Sxy150489 	u32 signature;
5174919Sxy150489 	u8 status;
5184919Sxy150489 	u8 reserved0;
5194919Sxy150489 	u16 vlan_id;
5204919Sxy150489 	u32 reserved1;
5214919Sxy150489 	u16 reserved2;
5224919Sxy150489 	u8 reserved3;
5234919Sxy150489 	u8 checksum;
5244919Sxy150489 };
5253526Sxy150489 
5264919Sxy150489 /* Host Interface "Rev 1" */
5274919Sxy150489 struct e1000_host_command_header {
5284919Sxy150489 	u8 command_id;
5294919Sxy150489 	u8 command_length;
5304919Sxy150489 	u8 command_options;
5314919Sxy150489 	u8 checksum;
5324919Sxy150489 };
5333526Sxy150489 
5344919Sxy150489 #define	E1000_HI_MAX_DATA_LENGTH	252
5354919Sxy150489 struct e1000_host_command_info {
5364919Sxy150489 	struct e1000_host_command_header command_header;
5374919Sxy150489 	u8 command_data[E1000_HI_MAX_DATA_LENGTH];
5384919Sxy150489 };
5393526Sxy150489 
5404919Sxy150489 /* Host Interface "Rev 2" */
5414919Sxy150489 struct e1000_host_mng_command_header {
5424919Sxy150489 	u8 command_id;
5434919Sxy150489 	u8 checksum;
5444919Sxy150489 	u16 reserved1;
5454919Sxy150489 	u16 reserved2;
5464919Sxy150489 	u16 command_length;
5474919Sxy150489 };
5483526Sxy150489 
5494919Sxy150489 #define	E1000_HI_MAX_MNG_DATA_LENGTH	0x6F8
5504919Sxy150489 struct e1000_host_mng_command_info {
5514919Sxy150489 	struct e1000_host_mng_command_header command_header;
5524919Sxy150489 	u8 command_data[E1000_HI_MAX_MNG_DATA_LENGTH];
5533526Sxy150489 };
5543526Sxy150489 
5554919Sxy150489 #include "e1000_mac.h"
5564919Sxy150489 #include "e1000_phy.h"
5574919Sxy150489 #include "e1000_nvm.h"
5584919Sxy150489 #include "e1000_manage.h"
5593526Sxy150489 
5606735Scc210113 struct e1000_mac_operations {
5614919Sxy150489 	/* Function pointers for the MAC. */
5626735Scc210113 	s32 (*init_params)(struct e1000_hw *);
56310680SMin.Xu@Sun.COM 	s32 (*id_led_init)(struct e1000_hw *);
5644919Sxy150489 	s32 (*blink_led)(struct e1000_hw *);
5654919Sxy150489 	s32 (*check_for_link)(struct e1000_hw *);
5666735Scc210113 	bool (*check_mng_mode)(struct e1000_hw *hw);
5674919Sxy150489 	s32 (*cleanup_led)(struct e1000_hw *);
5684919Sxy150489 	void (*clear_hw_cntrs)(struct e1000_hw *);
5694919Sxy150489 	void (*clear_vfta)(struct e1000_hw *);
5704919Sxy150489 	s32 (*get_bus_info)(struct e1000_hw *);
57110680SMin.Xu@Sun.COM 	void (*set_lan_id)(struct e1000_hw *);
5724919Sxy150489 	s32 (*get_link_up_info)(struct e1000_hw *, u16 *, u16 *);
5734919Sxy150489 	s32 (*led_on)(struct e1000_hw *);
5744919Sxy150489 	s32 (*led_off)(struct e1000_hw *);
57510680SMin.Xu@Sun.COM 	void (*update_mc_addr_list)(struct e1000_hw *, u8 *, u32);
5764919Sxy150489 	s32 (*reset_hw)(struct e1000_hw *);
5774919Sxy150489 	s32 (*init_hw)(struct e1000_hw *);
5784919Sxy150489 	s32 (*setup_link)(struct e1000_hw *);
5794919Sxy150489 	s32 (*setup_physical_interface)(struct e1000_hw *);
5804919Sxy150489 	s32 (*setup_led)(struct e1000_hw *);
5814919Sxy150489 	void (*write_vfta)(struct e1000_hw *, u32, u32);
5824919Sxy150489 	void (*mta_set)(struct e1000_hw *, u32);
5834919Sxy150489 	void (*config_collision_dist)(struct e1000_hw *);
5844919Sxy150489 	void (*rar_set)(struct e1000_hw *, u8 *, u32);
5856735Scc210113 	s32 (*read_mac_addr)(struct e1000_hw *);
5864919Sxy150489 	s32 (*validate_mdi_setting)(struct e1000_hw *);
5874919Sxy150489 	s32 (*mng_host_if_write)(struct e1000_hw *, u8 *, u16, u16, u8 *);
5884919Sxy150489 	s32 (*mng_write_cmd_header)(struct e1000_hw *hw,
5894919Sxy150489 	    struct e1000_host_mng_command_header *);
5904919Sxy150489 	s32 (*mng_enable_host_if)(struct e1000_hw *);
5918479SChenlu.Chen@Sun.COM 	s32 (*wait_autoneg)(struct e1000_hw *);
5926735Scc210113 };
5933526Sxy150489 
5946735Scc210113 struct e1000_phy_operations {
5956735Scc210113 	s32 (*init_params)(struct e1000_hw *);
5966735Scc210113 	s32 (*acquire)(struct e1000_hw *);
5978479SChenlu.Chen@Sun.COM 	s32  (*cfg_on_link_up)(struct e1000_hw *);
5984919Sxy150489 	s32 (*check_polarity)(struct e1000_hw *);
5994919Sxy150489 	s32 (*check_reset_block)(struct e1000_hw *);
6006735Scc210113 	s32 (*commit)(struct e1000_hw *);
6014919Sxy150489 	s32 (*force_speed_duplex)(struct e1000_hw *);
6024919Sxy150489 	s32 (*get_cfg_done)(struct e1000_hw *hw);
6034919Sxy150489 	s32 (*get_cable_length)(struct e1000_hw *);
6046735Scc210113 	s32 (*get_info)(struct e1000_hw *);
6056735Scc210113 	s32 (*read_reg)(struct e1000_hw *, u32, u16 *);
606*11020SMin.Xu@Sun.COM 	s32 (*read_reg_locked)(struct e1000_hw *, u32, u16 *);
6076735Scc210113 	void (*release)(struct e1000_hw *);
6086735Scc210113 	s32 (*reset)(struct e1000_hw *);
6096735Scc210113 	s32 (*set_d0_lplu_state)(struct e1000_hw *, bool);
6106735Scc210113 	s32 (*set_d3_lplu_state)(struct e1000_hw *, bool);
6116735Scc210113 	s32 (*write_reg)(struct e1000_hw *, u32, u16);
612*11020SMin.Xu@Sun.COM 	s32 (*write_reg_locked)(struct e1000_hw *, u32, u16);
6136735Scc210113 	void (*power_up)(struct e1000_hw *);
6146735Scc210113 	void (*power_down)(struct e1000_hw *);
6156735Scc210113 };
6163526Sxy150489 
6176735Scc210113 struct e1000_nvm_operations {
6186735Scc210113 	s32 (*init_params)(struct e1000_hw *);
6196735Scc210113 	s32 (*acquire)(struct e1000_hw *);
6206735Scc210113 	s32 (*read)(struct e1000_hw *, u16, u16, u16 *);
6216735Scc210113 	void (*release)(struct e1000_hw *);
6226735Scc210113 	void (*reload)(struct e1000_hw *);
6236735Scc210113 	s32 (*update)(struct e1000_hw *);
6244919Sxy150489 	s32 (*valid_led_default)(struct e1000_hw *, u16 *);
6256735Scc210113 	s32 (*validate)(struct e1000_hw *);
6266735Scc210113 	s32 (*write)(struct e1000_hw *, u16, u16, u16 *);
6273526Sxy150489 };
6283526Sxy150489 
6294919Sxy150489 struct e1000_mac_info {
6306735Scc210113 	struct e1000_mac_operations ops;
6314919Sxy150489 	u8 addr[6];
6324919Sxy150489 	u8 perm_addr[6];
6334919Sxy150489 
6348479SChenlu.Chen@Sun.COM 	enum e1000_mac_type type;
6354919Sxy150489 
6364919Sxy150489 	u32 collision_delta;
6374919Sxy150489 	u32 ledctl_default;
6384919Sxy150489 	u32 ledctl_mode1;
6394919Sxy150489 	u32 ledctl_mode2;
6404919Sxy150489 	u32 mc_filter_type;
6414919Sxy150489 	u32 tx_packet_delta;
6424919Sxy150489 	u32 txcw;
6434919Sxy150489 
6444919Sxy150489 	u16 current_ifs_val;
6454919Sxy150489 	u16 ifs_max_val;
6464919Sxy150489 	u16 ifs_min_val;
6474919Sxy150489 	u16 ifs_ratio;
6484919Sxy150489 	u16 ifs_step_size;
6494919Sxy150489 	u16 mta_reg_count;
65010680SMin.Xu@Sun.COM 	u32 mta_shadow[MAX_MTA_REG];
6514919Sxy150489 	u16 rar_entry_count;
6524919Sxy150489 
6534919Sxy150489 	u8 forced_speed_duplex;
6544919Sxy150489 
6556735Scc210113 	bool adaptive_ifs;
6566735Scc210113 	bool arc_subsystem_valid;
6576735Scc210113 	bool asf_firmware_present;
6586735Scc210113 	bool autoneg;
6596735Scc210113 	bool autoneg_failed;
6606735Scc210113 	bool get_link_status;
6616735Scc210113 	bool in_ifs_mode;
6626735Scc210113 	bool report_tx_early;
66310680SMin.Xu@Sun.COM 	enum e1000_serdes_link_state serdes_link_state;
6646735Scc210113 	bool serdes_has_link;
6656735Scc210113 	bool tx_pkt_filtering;
6663526Sxy150489 };
6673526Sxy150489 
6684919Sxy150489 struct e1000_phy_info {
6696735Scc210113 	struct e1000_phy_operations ops;
6708479SChenlu.Chen@Sun.COM 	enum e1000_phy_type type;
6714919Sxy150489 
6728479SChenlu.Chen@Sun.COM 	enum e1000_1000t_rx_status local_rx;
6738479SChenlu.Chen@Sun.COM 	enum e1000_1000t_rx_status remote_rx;
6748479SChenlu.Chen@Sun.COM 	enum e1000_ms_type ms_type;
6758479SChenlu.Chen@Sun.COM 	enum e1000_ms_type original_ms_type;
6768479SChenlu.Chen@Sun.COM 	enum e1000_rev_polarity cable_polarity;
6778479SChenlu.Chen@Sun.COM 	enum e1000_smart_speed smart_speed;
6784919Sxy150489 
6794919Sxy150489 	u32 addr;
6804919Sxy150489 	u32 id;
6814919Sxy150489 	u32 reset_delay_us;	/* in usec */
6824919Sxy150489 	u32 revision;
6834919Sxy150489 
6848479SChenlu.Chen@Sun.COM 	enum e1000_media_type media_type;
6856735Scc210113 
6864919Sxy150489 	u16 autoneg_advertised;
6874919Sxy150489 	u16 autoneg_mask;
6884919Sxy150489 	u16 cable_length;
6894919Sxy150489 	u16 max_cable_length;
6904919Sxy150489 	u16 min_cable_length;
6914919Sxy150489 
6924919Sxy150489 	u8 mdix;
6934919Sxy150489 
6946735Scc210113 	bool disable_polarity_correction;
6956735Scc210113 	bool is_mdix;
6966735Scc210113 	bool polarity_correction;
6976735Scc210113 	bool reset_disable;
6986735Scc210113 	bool speed_downgraded;
6996735Scc210113 	bool autoneg_wait_to_complete;
7004919Sxy150489 };
7014919Sxy150489 
7024919Sxy150489 struct e1000_nvm_info {
7036735Scc210113 	struct e1000_nvm_operations ops;
7048479SChenlu.Chen@Sun.COM 	enum e1000_nvm_type type;
7058479SChenlu.Chen@Sun.COM 	enum e1000_nvm_override override;
7064919Sxy150489 
7074919Sxy150489 	u32 flash_bank_size;
7084919Sxy150489 	u32 flash_base_addr;
7094919Sxy150489 
7104919Sxy150489 	u16 word_size;
7114919Sxy150489 	u16 delay_usec;
7124919Sxy150489 	u16 address_bits;
7134919Sxy150489 	u16 opcode_bits;
7144919Sxy150489 	u16 page_size;
7153526Sxy150489 };
7163526Sxy150489 
7174919Sxy150489 struct e1000_bus_info {
7188479SChenlu.Chen@Sun.COM 	enum e1000_bus_type type;
7198479SChenlu.Chen@Sun.COM 	enum e1000_bus_speed speed;
7208479SChenlu.Chen@Sun.COM 	enum e1000_bus_width width;
7214919Sxy150489 
7224919Sxy150489 	u16 func;
7234919Sxy150489 	u16 pci_cmd_word;
7244919Sxy150489 };
7254919Sxy150489 
7266735Scc210113 struct e1000_fc_info {
7276735Scc210113 	u32 high_water;		/* Flow control high-water mark */
7286735Scc210113 	u32 low_water;		/* Flow control low-water mark */
7296735Scc210113 	u16 pause_time;		/* Flow control pause timer */
7306735Scc210113 	bool send_xon;		/* Flow control send XON */
7316735Scc210113 	bool strict_ieee;	/* Strict IEEE mode */
7328479SChenlu.Chen@Sun.COM 	enum e1000_fc_mode current_mode; /* FC mode in effect */
7338479SChenlu.Chen@Sun.COM 	enum e1000_fc_mode requested_mode; /* FC mode requested by caller */
7348479SChenlu.Chen@Sun.COM };
7358479SChenlu.Chen@Sun.COM 
7368479SChenlu.Chen@Sun.COM struct e1000_dev_spec_82541 {
7378479SChenlu.Chen@Sun.COM 	enum e1000_dsp_config dsp_config;
7388479SChenlu.Chen@Sun.COM 	enum e1000_ffe_config ffe_config;
7398479SChenlu.Chen@Sun.COM 	u32 tx_fifo_head;
7408479SChenlu.Chen@Sun.COM 	u32 tx_fifo_start;
7418479SChenlu.Chen@Sun.COM 	u32 tx_fifo_size;
7428479SChenlu.Chen@Sun.COM 	u16 dsp_reset_counter;
7438479SChenlu.Chen@Sun.COM 	u16 spd_default;
7448479SChenlu.Chen@Sun.COM 	bool phy_init_script;
7458479SChenlu.Chen@Sun.COM 	bool ttl_workaround;
7468479SChenlu.Chen@Sun.COM };
7478479SChenlu.Chen@Sun.COM 
7488479SChenlu.Chen@Sun.COM struct e1000_dev_spec_82542 {
7498479SChenlu.Chen@Sun.COM 	bool dma_fairness;
7508479SChenlu.Chen@Sun.COM };
7518479SChenlu.Chen@Sun.COM 
7528479SChenlu.Chen@Sun.COM struct e1000_dev_spec_82543 {
7538479SChenlu.Chen@Sun.COM 	u32  tbi_compatibility;
7548479SChenlu.Chen@Sun.COM 	bool dma_fairness;
7558479SChenlu.Chen@Sun.COM 	bool init_phy_disabled;
7568479SChenlu.Chen@Sun.COM };
7578479SChenlu.Chen@Sun.COM 
7588479SChenlu.Chen@Sun.COM struct e1000_dev_spec_82571 {
7598479SChenlu.Chen@Sun.COM 	bool laa_is_present;
76010680SMin.Xu@Sun.COM 	u32 smb_counter;
76110680SMin.Xu@Sun.COM };
76210680SMin.Xu@Sun.COM 
76310680SMin.Xu@Sun.COM struct e1000_dev_spec_80003es2lan {
76410680SMin.Xu@Sun.COM 	bool  mdic_wa_enable;
7658479SChenlu.Chen@Sun.COM };
7668479SChenlu.Chen@Sun.COM 
7678479SChenlu.Chen@Sun.COM struct e1000_shadow_ram {
7688479SChenlu.Chen@Sun.COM 	u16  value;
7698479SChenlu.Chen@Sun.COM 	bool modified;
7708479SChenlu.Chen@Sun.COM };
7718479SChenlu.Chen@Sun.COM 
7728479SChenlu.Chen@Sun.COM #define	E1000_SHADOW_RAM_WORDS		2048
7738479SChenlu.Chen@Sun.COM 
7748479SChenlu.Chen@Sun.COM struct e1000_dev_spec_ich8lan {
7758479SChenlu.Chen@Sun.COM 	bool kmrn_lock_loss_workaround_enabled;
7768479SChenlu.Chen@Sun.COM 	struct e1000_shadow_ram shadow_ram[E1000_SHADOW_RAM_WORDS];
77710680SMin.Xu@Sun.COM 	E1000_MUTEX nvm_mutex;
77810680SMin.Xu@Sun.COM 	E1000_MUTEX swflag_mutex;
779*11020SMin.Xu@Sun.COM 	bool nvm_k1_enabled;
780*11020SMin.Xu@Sun.COM 	bool nvm_lcd_config_enabled;
7816735Scc210113 };
7826735Scc210113 
7834919Sxy150489 struct e1000_hw {
7844919Sxy150489 	void *back;
7854919Sxy150489 
7864919Sxy150489 	u8 *hw_addr;
7874919Sxy150489 	u8 *flash_address;
7884919Sxy150489 	unsigned long io_base;
7894919Sxy150489 
7904919Sxy150489 	struct e1000_mac_info mac;
7916735Scc210113 	struct e1000_fc_info fc;
7924919Sxy150489 	struct e1000_phy_info phy;
7934919Sxy150489 	struct e1000_nvm_info nvm;
7944919Sxy150489 	struct e1000_bus_info bus;
7954919Sxy150489 	struct e1000_host_mng_dhcp_cookie mng_cookie;
7963526Sxy150489 
7978479SChenlu.Chen@Sun.COM 	union {
7988479SChenlu.Chen@Sun.COM 		struct e1000_dev_spec_82541	_82541;
7998479SChenlu.Chen@Sun.COM 		struct e1000_dev_spec_82542	_82542;
8008479SChenlu.Chen@Sun.COM 		struct e1000_dev_spec_82543	_82543;
8018479SChenlu.Chen@Sun.COM 		struct e1000_dev_spec_82571	_82571;
80210680SMin.Xu@Sun.COM 		struct e1000_dev_spec_80003es2lan _80003es2lan;
8038479SChenlu.Chen@Sun.COM 		struct e1000_dev_spec_ich8lan	ich8lan;
8048479SChenlu.Chen@Sun.COM 	} dev_spec;
8054919Sxy150489 
8064919Sxy150489 	u16 device_id;
8074919Sxy150489 	u16 subsystem_vendor_id;
8084919Sxy150489 	u16 subsystem_device_id;
8094919Sxy150489 	u16 vendor_id;
8104919Sxy150489 
8114919Sxy150489 	u8 revision_id;
8124919Sxy150489 };
8134919Sxy150489 
8147607STed.You@Sun.COM #include "e1000_82541.h"
8157607STed.You@Sun.COM #include "e1000_82543.h"
8167607STed.You@Sun.COM #include "e1000_82571.h"
8177607STed.You@Sun.COM #include "e1000_80003es2lan.h"
8187607STed.You@Sun.COM #include "e1000_ich8lan.h"
8197607STed.You@Sun.COM 
8204919Sxy150489 /* These functions must be implemented by drivers */
8214919Sxy150489 void e1000_pci_clear_mwi(struct e1000_hw *hw);
8224919Sxy150489 void e1000_pci_set_mwi(struct e1000_hw *hw);
8234919Sxy150489 s32 e1000_read_pcie_cap_reg(struct e1000_hw *hw, u32 reg, u16 *value);
82410680SMin.Xu@Sun.COM s32 e1000_write_pcie_cap_reg(struct e1000_hw *hw, u32 reg, u16 *value);
8254919Sxy150489 void e1000_read_pci_cfg(struct e1000_hw *hw, u32 reg, u16 *value);
8264919Sxy150489 void e1000_write_pci_cfg(struct e1000_hw *hw, u32 reg, u16 *value);
8274919Sxy150489 
8284919Sxy150489 #ifdef __cplusplus
8294919Sxy150489 }
8304919Sxy150489 #endif
8314919Sxy150489 
8324919Sxy150489 #endif	/* _E1000_HW_H_ */
833