⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 e1000_defines.h

📁 Intel 82546系列lan driver源码
💻 H
📖 第 1 页 / 共 5 页
字号:
/*******************************************************************************  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_DEFINES_H_#define _E1000_DEFINES_H_/* Number of Transmit and Receive Descriptors must be a multiple of 8 */#define REQ_TX_DESCRIPTOR_MULTIPLE  8#define REQ_RX_DESCRIPTOR_MULTIPLE  8/* Definitions for power management and wakeup registers *//* Wake Up Control */#define E1000_WUC_APME       0x00000001 /* APM Enable */#define E1000_WUC_PME_EN     0x00000002 /* PME Enable */#define E1000_WUC_PME_STATUS 0x00000004 /* PME Status */#define E1000_WUC_APMPME     0x00000008 /* Assert PME on APM Wakeup */#define E1000_WUC_LSCWE      0x00000010 /* Link Status wake up enable */#define E1000_WUC_LSCWO      0x00000020 /* Link Status wake up override */#define E1000_WUC_SPM        0x80000000 /* Enable SPM */#define E1000_WUC_PHY_WAKE   0x00000100 /* if PHY supports wakeup *//* Wake Up Filter Control */#define E1000_WUFC_LNKC 0x00000001 /* Link Status Change Wakeup Enable */#define E1000_WUFC_MAG  0x00000002 /* Magic Packet Wakeup Enable */#define E1000_WUFC_EX   0x00000004 /* Directed Exact Wakeup Enable */#define E1000_WUFC_MC   0x00000008 /* Directed Multicast Wakeup Enable */#define E1000_WUFC_BC   0x00000010 /* Broadcast Wakeup Enable */#define E1000_WUFC_ARP  0x00000020 /* ARP Request Packet Wakeup Enable */#define E1000_WUFC_IPV4 0x00000040 /* Directed IPv4 Packet Wakeup Enable */#define E1000_WUFC_IPV6 0x00000080 /* Directed IPv6 Packet Wakeup Enable */#define E1000_WUFC_IGNORE_TCO_PHY 0x00000800 /* Ignore WakeOn TCO packets */#define E1000_WUFC_FLX0_PHY      0x00001000 /* Flexible Filter 0 Enable */#define E1000_WUFC_FLX1_PHY      0x00002000 /* Flexible Filter 1 Enable */#define E1000_WUFC_FLX2_PHY      0x00004000 /* Flexible Filter 2 Enable */#define E1000_WUFC_FLX3_PHY      0x00008000 /* Flexible Filter 3 Enable */#define E1000_WUFC_IGNORE_TCO   0x00008000 /* Ignore WakeOn TCO packets */#define E1000_WUFC_FLX0 0x00010000 /* Flexible Filter 0 Enable */#define E1000_WUFC_FLX1 0x00020000 /* Flexible Filter 1 Enable */#define E1000_WUFC_FLX2 0x00040000 /* Flexible Filter 2 Enable */#define E1000_WUFC_FLX3 0x00080000 /* Flexible Filter 3 Enable */#define E1000_WUFC_ALL_FILTERS_PHY_4 0x0000F0FF /*Mask for all wakeup filters*/#define E1000_WUFC_FLX_OFFSET_PHY 12 /* Offset to the Flexible Filters bits */#define E1000_WUFC_FLX_FILTERS_PHY_4 0x0000F000 /*Mask for 4 flexible filters*/#define E1000_WUFC_ALL_FILTERS  0x000F00FF /* Mask for all wakeup filters */#define E1000_WUFC_FLX_OFFSET   16 /* Offset to the Flexible Filters bits */#define E1000_WUFC_FLX_FILTERS  0x000F0000 /*Mask for the 4 flexible filters *//* Wake Up Status */#define E1000_WUS_LNKC         E1000_WUFC_LNKC#define E1000_WUS_MAG          E1000_WUFC_MAG#define E1000_WUS_EX           E1000_WUFC_EX#define E1000_WUS_MC           E1000_WUFC_MC#define E1000_WUS_BC           E1000_WUFC_BC#define E1000_WUS_ARP          E1000_WUFC_ARP#define E1000_WUS_IPV4         E1000_WUFC_IPV4#define E1000_WUS_IPV6         E1000_WUFC_IPV6#define E1000_WUS_FLX0_PHY      E1000_WUFC_FLX0_PHY#define E1000_WUS_FLX1_PHY      E1000_WUFC_FLX1_PHY#define E1000_WUS_FLX2_PHY      E1000_WUFC_FLX2_PHY#define E1000_WUS_FLX3_PHY      E1000_WUFC_FLX3_PHY#define E1000_WUS_FLX_FILTERS_PHY_4        E1000_WUFC_FLX_FILTERS_PHY_4#define E1000_WUS_FLX0         E1000_WUFC_FLX0#define E1000_WUS_FLX1         E1000_WUFC_FLX1#define E1000_WUS_FLX2         E1000_WUFC_FLX2#define E1000_WUS_FLX3         E1000_WUFC_FLX3#define E1000_WUS_FLX_FILTERS  E1000_WUFC_FLX_FILTERS/* Wake Up Packet Length */#define E1000_WUPL_LENGTH_MASK 0x0FFF   /* Only the lower 12 bits are valid *//* Four Flexible Filters are supported */#define E1000_FLEXIBLE_FILTER_COUNT_MAX 4/* Each Flexible Filter is at most 128 (0x80) bytes in length */#define E1000_FLEXIBLE_FILTER_SIZE_MAX  128#define E1000_FFLT_SIZE E1000_FLEXIBLE_FILTER_COUNT_MAX#define E1000_FFMT_SIZE E1000_FLEXIBLE_FILTER_SIZE_MAX#define E1000_FFVT_SIZE E1000_FLEXIBLE_FILTER_SIZE_MAX/* Extended Device Control */#define E1000_CTRL_EXT_GPI0_EN   0x00000001 /* Maps SDP4 to GPI0 */#define E1000_CTRL_EXT_GPI1_EN   0x00000002 /* Maps SDP5 to GPI1 */#define E1000_CTRL_EXT_PHYINT_EN E1000_CTRL_EXT_GPI1_EN#define E1000_CTRL_EXT_GPI2_EN   0x00000004 /* Maps SDP6 to GPI2 */#define E1000_CTRL_EXT_GPI3_EN   0x00000008 /* Maps SDP7 to GPI3 *//* Reserved (bits 4,5) in >= 82575 */#define E1000_CTRL_EXT_SDP4_DATA 0x00000010 /* Value of SW Definable Pin 4 */#define E1000_CTRL_EXT_SDP5_DATA 0x00000020 /* Value of SW Definable Pin 5 */#define E1000_CTRL_EXT_PHY_INT   E1000_CTRL_EXT_SDP5_DATA#define E1000_CTRL_EXT_SDP6_DATA 0x00000040 /* Value of SW Definable Pin 6 */#define E1000_CTRL_EXT_SDP7_DATA 0x00000080 /* Value of SW Definable Pin 7 *//* SDP 4/5 (bits 8,9) are reserved in >= 82575 */#define E1000_CTRL_EXT_SDP4_DIR  0x00000100 /* Direction of SDP4 0=in 1=out */#define E1000_CTRL_EXT_SDP5_DIR  0x00000200 /* Direction of SDP5 0=in 1=out */#define E1000_CTRL_EXT_SDP6_DIR  0x00000400 /* Direction of SDP6 0=in 1=out */#define E1000_CTRL_EXT_SDP7_DIR  0x00000800 /* Direction of SDP7 0=in 1=out */#define E1000_CTRL_EXT_ASDCHK    0x00001000 /* Initiate an ASD sequence */#define E1000_CTRL_EXT_EE_RST    0x00002000 /* Reinitialize from EEPROM */#define E1000_CTRL_EXT_IPS       0x00004000 /* Invert Power State */#define E1000_CTRL_EXT_SPD_BYPS  0x00008000 /* Speed Select Bypass */#define E1000_CTRL_EXT_RO_DIS    0x00020000 /* Relaxed Ordering disable */#define E1000_CTRL_EXT_LINK_MODE_MASK 0x00C00000#define E1000_CTRL_EXT_LINK_MODE_GMII 0x00000000#define E1000_CTRL_EXT_LINK_MODE_TBI  0x00C00000#define E1000_CTRL_EXT_LINK_MODE_KMRN    0x00000000#define E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES  0x00C00000#define E1000_CTRL_EXT_LINK_MODE_PCIX_SERDES  0x00800000#define E1000_CTRL_EXT_LINK_MODE_SGMII   0x00800000#define E1000_CTRL_EXT_EIAME          0x01000000#define E1000_CTRL_EXT_IRCA           0x00000001#define E1000_CTRL_EXT_WR_WMARK_MASK  0x03000000#define E1000_CTRL_EXT_WR_WMARK_256   0x00000000#define E1000_CTRL_EXT_WR_WMARK_320   0x01000000#define E1000_CTRL_EXT_WR_WMARK_384   0x02000000#define E1000_CTRL_EXT_WR_WMARK_448   0x03000000#define E1000_CTRL_EXT_CANC           0x04000000 /* Int delay cancellation */#define E1000_CTRL_EXT_DRV_LOAD       0x10000000 /* Driver loaded bit for FW *//* IAME enable bit (27) was removed in >= 82575 */#define E1000_CTRL_EXT_IAME           0x08000000 /* Int acknowledge Auto-mask */#define E1000_CTRL_EXT_INT_TIMER_CLR  0x20000000 /* Clear Interrupt timers                                                  * after IMS clear */#define E1000_CRTL_EXT_PB_PAREN       0x01000000 /* packet buffer parity error                                                  * detection enabled */#define E1000_CTRL_EXT_DF_PAREN       0x02000000 /* descriptor FIFO parity                                                  * error detection enable */#define E1000_CTRL_EXT_GHOST_PAREN    0x40000000#define E1000_CTRL_EXT_PBA_CLR        0x80000000 /* PBA Clear */#define E1000_CTRL_EXT_LSECCK         0x00001000#define E1000_I2CCMD_REG_ADDR_SHIFT   16#define E1000_I2CCMD_REG_ADDR         0x00FF0000#define E1000_I2CCMD_PHY_ADDR_SHIFT   24#define E1000_I2CCMD_PHY_ADDR         0x07000000#define E1000_I2CCMD_OPCODE_READ      0x08000000#define E1000_I2CCMD_OPCODE_WRITE     0x00000000#define E1000_I2CCMD_RESET            0x10000000#define E1000_I2CCMD_READY            0x20000000#define E1000_I2CCMD_INTERRUPT_ENA    0x40000000#define E1000_I2CCMD_ERROR            0x80000000#define E1000_MAX_SGMII_PHY_REG_ADDR  255#define E1000_I2CCMD_PHY_TIMEOUT      200/* Receive Descriptor bit definitions */#define E1000_RXD_STAT_DD       0x01    /* Descriptor Done */#define E1000_RXD_STAT_EOP      0x02    /* End of Packet */#define E1000_RXD_STAT_IXSM     0x04    /* Ignore checksum */#define E1000_RXD_STAT_VP       0x08    /* IEEE VLAN Packet */#define E1000_RXD_STAT_UDPCS    0x10    /* UDP xsum calculated */#define E1000_RXD_STAT_TCPCS    0x20    /* TCP xsum calculated */#define E1000_RXD_STAT_IPCS     0x40    /* IP xsum calculated */#define E1000_RXD_STAT_PIF      0x80    /* passed in-exact filter */#define E1000_RXD_STAT_CRCV     0x100   /* Speculative CRC Valid */#define E1000_RXD_STAT_IPIDV    0x200   /* IP identification valid */#define E1000_RXD_STAT_UDPV     0x400   /* Valid UDP checksum */#define E1000_RXD_STAT_DYNINT   0x800   /* Pkt caused INT via DYNINT */#define E1000_RXD_STAT_ACK      0x8000  /* ACK Packet indication */#define E1000_RXD_ERR_CE        0x01    /* CRC Error */#define E1000_RXD_ERR_SE        0x02    /* Symbol Error */#define E1000_RXD_ERR_SEQ       0x04    /* Sequence Error */#define E1000_RXD_ERR_CXE       0x10    /* Carrier Extension Error */#define E1000_RXD_ERR_TCPE      0x20    /* TCP/UDP Checksum Error */#define E1000_RXD_ERR_IPE       0x40    /* IP Checksum Error */#define E1000_RXD_ERR_RXE       0x80    /* Rx Data Error */#define E1000_RXD_SPC_VLAN_MASK 0x0FFF  /* VLAN ID is in lower 12 bits */#define E1000_RXD_SPC_PRI_MASK  0xE000  /* Priority is in upper 3 bits */#define E1000_RXD_SPC_PRI_SHIFT 13#define E1000_RXD_SPC_CFI_MASK  0x1000  /* CFI is bit 12 */#define E1000_RXD_SPC_CFI_SHIFT 12#define E1000_RXDEXT_STATERR_CE    0x01000000#define E1000_RXDEXT_STATERR_SE    0x02000000#define E1000_RXDEXT_STATERR_SEQ   0x04000000#define E1000_RXDEXT_STATERR_CXE   0x10000000#define E1000_RXDEXT_STATERR_TCPE  0x20000000#define E1000_RXDEXT_STATERR_IPE   0x40000000#define E1000_RXDEXT_STATERR_RXE   0x80000000#define E1000_RXDEXT_LSECH                0x01000000#define E1000_RXDEXT_LSECE_MASK           0x60000000#define E1000_RXDEXT_LSECE_NO_ERROR       0x00000000#define E1000_RXDEXT_LSECE_NO_SA_MATCH    0x20000000#define E1000_RXDEXT_LSECE_REPLAY_DETECT  0x40000000#define E1000_RXDEXT_LSECE_BAD_SIG        0x60000000/* mask to determine if packets should be dropped due to frame errors */#define E1000_RXD_ERR_FRAME_ERR_MASK ( \    E1000_RXD_ERR_CE  |                \    E1000_RXD_ERR_SE  |                \    E1000_RXD_ERR_SEQ |                \    E1000_RXD_ERR_CXE |                \    E1000_RXD_ERR_RXE)/* Same mask, but for extended and packet split descriptors */#define E1000_RXDEXT_ERR_FRAME_ERR_MASK ( \    E1000_RXDEXT_STATERR_CE  |            \    E1000_RXDEXT_STATERR_SE  |            \    E1000_RXDEXT_STATERR_SEQ |            \    E1000_RXDEXT_STATERR_CXE |            \    E1000_RXDEXT_STATERR_RXE)#define E1000_MRQC_ENABLE_MASK                 0x00000007#define E1000_MRQC_ENABLE_RSS_2Q               0x00000001#define E1000_MRQC_ENABLE_RSS_INT              0x00000004#define E1000_MRQC_RSS_FIELD_MASK              0xFFFF0000#define E1000_MRQC_RSS_FIELD_IPV4_TCP          0x00010000#define E1000_MRQC_RSS_FIELD_IPV4              0x00020000#define E1000_MRQC_RSS_FIELD_IPV6_TCP_EX       0x00040000#define E1000_MRQC_RSS_FIELD_IPV6_EX           0x00080000#define E1000_MRQC_RSS_FIELD_IPV6              0x00100000#define E1000_MRQC_RSS_FIELD_IPV6_TCP          0x00200000#define E1000_RXDPS_HDRSTAT_HDRSP              0x00008000#define E1000_RXDPS_HDRSTAT_HDRLEN_MASK        0x000003FF/* Management Control */#define E1000_MANC_SMBUS_EN      0x00000001 /* SMBus Enabled - RO */#define E1000_MANC_ASF_EN        0x00000002 /* ASF Enabled - RO */#define E1000_MANC_R_ON_FORCE    0x00000004 /* Reset on Force TCO - RO */#define E1000_MANC_RMCP_EN       0x00000100 /* Enable RCMP 026Fh Filtering */#define E1000_MANC_0298_EN       0x00000200 /* Enable RCMP 0298h Filtering */#define E1000_MANC_IPV4_EN       0x00000400 /* Enable IPv4 */#define E1000_MANC_IPV6_EN       0x00000800 /* Enable IPv6 */#define E1000_MANC_SNAP_EN       0x00001000 /* Accept LLC/SNAP */#define E1000_MANC_ARP_EN        0x00002000 /* Enable ARP Request Filtering *//* Enable Neighbor Discovery Filtering */#define E1000_MANC_NEIGHBOR_EN   0x00004000#define E1000_MANC_ARP_RES_EN    0x00008000 /* Enable ARP response Filtering */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -