📄 hw.h
字号:
/******************************************************************************* Intel PRO/1000 Linux driver Copyright(c) 1999 - 2008 Intel Corporation. This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License, version 2, as published by the Free Software Foundation. This program is distributed in the hope it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. The full GNU General Public License is included in this distribution in the file called "COPYING". Contact Information: Linux NICS <linux.nics@intel.com> e1000-devel Mailing List <e1000-devel@lists.sourceforge.net> Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497*******************************************************************************/#ifndef _E1000_HW_H_#define _E1000_HW_H_#include "e1000_regs.h"#include "e1000_defines.h"struct e1000_hw;#define E1000_DEV_ID_82571EB_COPPER 0x105E#define E1000_DEV_ID_82571EB_FIBER 0x105F#define E1000_DEV_ID_82571EB_SERDES 0x1060#define E1000_DEV_ID_82571EB_SERDES_DUAL 0x10D9#define E1000_DEV_ID_82571EB_SERDES_QUAD 0x10DA#define E1000_DEV_ID_82571EB_QUAD_COPPER 0x10A4#define E1000_DEV_ID_82571PT_QUAD_COPPER 0x10D5#define E1000_DEV_ID_82571EB_QUAD_FIBER 0x10A5#define E1000_DEV_ID_82571EB_QUAD_COPPER_LP 0x10BC#define E1000_DEV_ID_82572EI_COPPER 0x107D#define E1000_DEV_ID_82572EI_FIBER 0x107E#define E1000_DEV_ID_82572EI_SERDES 0x107F#define E1000_DEV_ID_82572EI 0x10B9#define E1000_DEV_ID_82573E 0x108B#define E1000_DEV_ID_82573E_IAMT 0x108C#define E1000_DEV_ID_82573L 0x109A#define E1000_DEV_ID_82574L 0x10D3#define E1000_DEV_ID_80003ES2LAN_COPPER_DPT 0x1096#define E1000_DEV_ID_80003ES2LAN_SERDES_DPT 0x1098#define E1000_DEV_ID_80003ES2LAN_COPPER_SPT 0x10BA#define E1000_DEV_ID_80003ES2LAN_SERDES_SPT 0x10BB#define E1000_DEV_ID_ICH8_IGP_M_AMT 0x1049#define E1000_DEV_ID_ICH8_IGP_AMT 0x104A#define E1000_DEV_ID_ICH8_IGP_C 0x104B#define E1000_DEV_ID_ICH8_IFE 0x104C#define E1000_DEV_ID_ICH8_IFE_GT 0x10C4#define E1000_DEV_ID_ICH8_IFE_G 0x10C5#define E1000_DEV_ID_ICH8_IGP_M 0x104D#define E1000_DEV_ID_ICH9_IGP_M 0x10BF#define E1000_DEV_ID_ICH9_IGP_M_AMT 0x10F5#define E1000_DEV_ID_ICH9_IGP_M_V 0x10CB#define E1000_DEV_ID_ICH9_IGP_AMT 0x10BD#define E1000_DEV_ID_ICH9_BM 0x10E5#define E1000_DEV_ID_ICH9_IGP_C 0x294C#define E1000_DEV_ID_ICH9_IFE 0x10C0#define E1000_DEV_ID_ICH9_IFE_GT 0x10C3#define E1000_DEV_ID_ICH9_IFE_G 0x10C2#define E1000_DEV_ID_ICH10_R_BM_LM 0x10CC#define E1000_DEV_ID_ICH10_R_BM_LF 0x10CD#define E1000_DEV_ID_ICH10_R_BM_V 0x10CE#define E1000_DEV_ID_ICH10_D_BM_LM 0x10DE#define E1000_DEV_ID_ICH10_D_BM_LF 0x10DF#define E1000_REVISION_0 0#define E1000_REVISION_1 1#define E1000_REVISION_2 2#define E1000_REVISION_3 3#define E1000_REVISION_4 4#define E1000_FUNC_0 0#define E1000_FUNC_1 1enum e1000_mac_type { e1000_undefined = 0, e1000_82571, e1000_82572, e1000_82573, e1000_82574, e1000_80003es2lan, e1000_ich8lan, e1000_ich9lan, e1000_ich10lan, e1000_num_macs /* List is 1-based, so subtract 1 for true count. */};enum e1000_media_type { e1000_media_type_unknown = 0, e1000_media_type_copper = 1, e1000_media_type_fiber = 2, e1000_media_type_internal_serdes = 3, e1000_num_media_types};enum e1000_nvm_type { e1000_nvm_unknown = 0, e1000_nvm_none, e1000_nvm_eeprom_spi, e1000_nvm_flash_hw, e1000_nvm_flash_sw};enum e1000_nvm_override { e1000_nvm_override_none = 0, e1000_nvm_override_spi_small, e1000_nvm_override_spi_large,};enum e1000_phy_type { e1000_phy_unknown = 0, e1000_phy_none, e1000_phy_m88, e1000_phy_igp, e1000_phy_igp_2, e1000_phy_gg82563, e1000_phy_igp_3, e1000_phy_ife, e1000_phy_bm,};enum e1000_bus_type { e1000_bus_type_unknown = 0, e1000_bus_type_pci, e1000_bus_type_pcix, e1000_bus_type_pci_express, e1000_bus_type_reserved};enum e1000_bus_speed { e1000_bus_speed_unknown = 0, e1000_bus_speed_33, e1000_bus_speed_66, e1000_bus_speed_100, e1000_bus_speed_120, e1000_bus_speed_133, e1000_bus_speed_2500, e1000_bus_speed_5000, e1000_bus_speed_reserved};enum e1000_bus_width { e1000_bus_width_unknown = 0, e1000_bus_width_pcie_x1, e1000_bus_width_pcie_x2, e1000_bus_width_pcie_x4 = 4, e1000_bus_width_pcie_x8 = 8, e1000_bus_width_32, e1000_bus_width_64, e1000_bus_width_reserved};enum e1000_1000t_rx_status { e1000_1000t_rx_status_not_ok = 0, e1000_1000t_rx_status_ok, e1000_1000t_rx_status_undefined = 0xFF};enum e1000_rev_polarity { e1000_rev_polarity_normal = 0, e1000_rev_polarity_reversed, e1000_rev_polarity_undefined = 0xFF};enum e1000_fc_mode { e1000_fc_none = 0, e1000_fc_rx_pause, e1000_fc_tx_pause, e1000_fc_full, e1000_fc_default = 0xFF};enum e1000_ms_type { e1000_ms_hw_default = 0, e1000_ms_force_master, e1000_ms_force_slave, e1000_ms_auto};enum e1000_smart_speed { e1000_smart_speed_default = 0, e1000_smart_speed_on, e1000_smart_speed_off};/* Receive Descriptor */struct e1000_rx_desc { __le64 buffer_addr; /* Address of the descriptor's data buffer */ __le16 length; /* Length of data DMAed into data buffer */ __le16 csum; /* Packet checksum */ u8 status; /* Descriptor status */ u8 errors; /* Descriptor Errors */ __le16 special;};/* Receive Descriptor - Extended */union e1000_rx_desc_extended { struct { __le64 buffer_addr; __le64 reserved; } read; struct { struct { __le32 mrq; /* Multiple Rx Queues */ union { __le32 rss; /* RSS Hash */ struct { __le16 ip_id; /* IP id */ __le16 csum; /* Packet Checksum */ } csum_ip; } hi_dword; } lower; struct { __le32 status_error; /* ext status/error */ __le16 length; __le16 vlan; /* VLAN tag */ } upper; } wb; /* writeback */};#define MAX_PS_BUFFERS 4/* Receive Descriptor - Packet Split */union e1000_rx_desc_packet_split { struct { /* one buffer for protocol header(s), three data buffers */ __le64 buffer_addr[MAX_PS_BUFFERS]; } read; struct { struct { __le32 mrq; /* Multiple Rx Queues */ union { __le32 rss; /* RSS Hash */ struct { __le16 ip_id; /* IP id */ __le16 csum; /* Packet Checksum */ } csum_ip; } hi_dword; } lower; struct { __le32 status_error; /* ext status/error */ __le16 length0; /* length of buffer 0 */ __le16 vlan; /* VLAN tag */ } middle; struct { __le16 header_status; __le16 length[3]; /* length of buffers 1-3 */ } upper; __le64 reserved; } wb; /* writeback */};/* Transmit Descriptor */struct e1000_tx_desc { __le64 buffer_addr; /* Address of the descriptor's data buffer */ union { __le32 data; struct { __le16 length; /* Data buffer length */ u8 cso; /* Checksum offset */ u8 cmd; /* Descriptor control */ } flags; } lower; union { __le32 data; struct { u8 status; /* Descriptor status */ u8 css; /* Checksum start */ __le16 special; } fields; } upper;};/* Offload Context Descriptor */struct e1000_context_desc { union { __le32 ip_config; struct { u8 ipcss; /* IP checksum start */ u8 ipcso; /* IP checksum offset */ __le16 ipcse; /* IP checksum end */ } ip_fields; } lower_setup; union { __le32 tcp_config; struct { u8 tucss; /* TCP checksum start */ u8 tucso; /* TCP checksum offset */ __le16 tucse; /* TCP checksum end */ } tcp_fields; } upper_setup; __le32 cmd_and_length; union { __le32 data; struct { u8 status; /* Descriptor status */ u8 hdr_len; /* Header length */ __le16 mss; /* Maximum segment size */ } fields; } tcp_seg_setup;};/* Offload data descriptor */struct e1000_data_desc { __le64 buffer_addr; /* Address of the descriptor's buffer address */ union { __le32 data; struct { __le16 length; /* Data buffer length */ u8 typ_len_ext; u8 cmd; } flags; } lower; union { __le32 data; struct { u8 status; /* Descriptor status */ u8 popts; /* Packet Options */ __le16 special; } fields; } upper;};/* Statistics counters collected by the MAC */struct e1000_hw_stats { u64 crcerrs;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -