📄 e1000.h
字号:
UINT32 AdapterStopped; /* Adapter has been reset */ UINT32 FullDuplex; /* current duplex mode */ UINT32 FlowControl; /* Enable/Disable flow control */ UINT32 OriginalFlowControl; UINT RxPciPriority; /* Receive data priority */ uint_t flags; /* Misc board flags */ BOOLEAN LongPacket; /* Long Packet Enable Status */ UINT RxBufferLen; UINT32 tag_mode; /* iANS tag mode (none, IEEE, ISL) */ #ifdef IANS IANS_BD_LINK_STATUS ans_link; UINT32 ans_speed; UINT32 ans_duplex; #endif /* PCI configuration parameters */ UINT PciCommandWord; /* Stores boot-up PCI command word */ UINT DeviceNum; /* The bus+dev value for the card */ UINT PciConfigMethod; /* CONFIG1 or 2 for scan */ UINT RevID; /* Revision ID for the board */ UINT32 LinkIsActive; /* Link status */ UINT DoRxResetFlag; UINT AutoNegFailed; /* Auto-negotiation status flag */ UINT TxcwRegValue; /* Original Transmit control word */ UINT TxIntDelay; /* Transmit Interrupt delay */ UINT RxIntDelay; /* Receive Interrupt delay */ UINT MaxDpcCount; /* Interrupt optimization count */ UCHAR ExternalSerDes; /* PCI information for the adapter */ ulong_t io_base; /* IO base address */ ulong_t mem_base; /* Memory base address */ uchar_t irq; /* IRQ level */ int irq_level; int bd_number; /* Board Number */ int tx_pad[2]; /* Click */ /* Transmit descriptor definitions */ PE1000_TRANSMIT_DESCRIPTOR FirstTxDescriptor; /* transmit descriptor ring start */ PE1000_TRANSMIT_DESCRIPTOR LastTxDescriptor; /* transmit descriptor ring end */ PE1000_TRANSMIT_DESCRIPTOR NextAvailTxDescriptor; /* next free tmd */ PE1000_TRANSMIT_DESCRIPTOR OldestUsedTxDescriptor; /* next tmd to reclaim (used) */ UINT NumTxDescriptors; PE1000_TRANSMIT_DESCRIPTOR e1000_tbd_data; /* pointer to buffer descriptor area */ struct sk_buff **TxSkBuffs; /* one per xmit descriptor */ int rx_pad[1]; /* Click */ /* Receive definitions */ UINT NumRxDescriptors; UINT MulticastFilterType; /* Receive descriptor definitions */ PE1000_RECEIVE_DESCRIPTOR FirstRxDescriptor; /* receive descriptor ring 1 start */ PE1000_RECEIVE_DESCRIPTOR LastRxDescriptor; /* receive descriptor ring 1 end */ PE1000_RECEIVE_DESCRIPTOR NextRxDescriptorToCheck; /* next chip rmd ring 1 */ /* we've taken this descriptor's buffer, please alloc another */ int NextRxIndexToFill; PE1000_RECEIVE_DESCRIPTOR e1000_rlast1p; /* last free rmd ring 1 */ struct sk_buff **RxSkBuffs; /* one per recv descriptor */ PE1000_RECEIVE_DESCRIPTOR e1000_rbd_data; /* pointer to rx buffer descriptor area */ pmltcst_cb_t pmc_buff; /* pointer to multi cast addrs */ UINT NumberOfMcAddresses; UINT MaxNumReceivePackets; UINT MaxRcvPktMinThresh; UINT MaxRcvPktMaxThresh; /* Lock defintions for the driver */ spinlock_t bd_intr_lock; /* Interrupt lock */ UINT32 cur_line_speed; /* current line speed */ uchar_t brdcst_dsbl; /* if set, disables broadcast */ uchar_t TransmitTimeout; /* detects transmit lockup */ uchar_t ReportTxEarly; /* 1 => RS bit, 0 => RPS bit */ pci_dev_t *pci_dev; /* pci device struct pointer */ /************************************************************************* * Hardware Statistics from the E1000 registers *************************************************************************/ UINT RcvCrcErrors; /* Receive packets with CRC errors */ UINT RcvSymbolErrors; /* Receive packets with symbol errors */ UINT RcvMissedPacketsErrors; /* Packets missed due to receive FIFO full */ UINT DeferCount; /* Packet not transmitted due to either of the * reasons- transmitter busy * IPG timer not expired * Xoff frame received * link not up */ UINT RcvSequenceErrors; /* Receive sequence errors on the wire */ UINT RcvLengthErrors; /* Counts undersized and oversized packets */ UINT RcvXonFrame; /* Receive XON frame */ UINT TxXonFrame; /* Transmit XON frame */ UINT RcvXoffFrame; /* Receive XOFF frame */ UINT TxXoffFrame; /* Transmit XOFF frame */ UINT Rcv64; /* Received packets of size 64 */ UINT Rcv65; /* Received packets of size 65-127 */ UINT Rcv128; /* Received packets of size 128-255 */ UINT Rcv256; /* Received packets of size 256-511 */ UINT Rcv512; /* Received packets of size 512-1023 */ UINT Rcv1024; /* Received packets of size 1024-1522 */ UINT GoodReceives; /* Non-error legal length packets */ UINT RcvBroadcastPkts; /* Received broadcast packets */ UINT RcvMulticastPkts; /* Received multicast packets */ UINT GoodTransmits; /* Good packets transmitted */ UINT Rnbc; /* No Receive buffers available ( Receive queue full) */ UINT RcvUndersizeCnt; /* Received packet is less than 64 bytes */ UINT RcvOversizeCnt; /* Received packet greater than max ethernet packet */ UINT RcvJabberCnt; /* Received packet > max size + bad CRC */ UINT TotPktRcv; /* Total packets received */ UINT TotPktTransmit; /* Total packets transmitted */ UINT TrsPkt64; /* 64 byte packet transmitted */ UINT TrsPkt65; /* Transmitted pkt 65-127 bytes */ UINT TrsPkt128; /* Transmitted pkt 128-255 bytes */ UINT TrsPkt256; /* Transmitted pkt 256-511 */ UINT TrsPkt512; /* Transmitted pkt 512-1023 */ UINT TrsPkt1024; /* Transmitted Pkt 1024-1522 */ UINT TrsMulticastPkt; /* Transmitted Multicast Packet */ UINT TrsBroadcastPkt; /* Transmitted broadcast packet */ UINT TxAbortExcessCollisions; /* Excessive Coillision count */ UINT TxLateCollisions; /* Late collision count */ UINT TotalCollisions; /* Total collision count */ UINT SingleCollisions; UINT MultiCollisions; UINT FCUnsupported; UINT RcvGoodOct; UINT TrsGoodOct; UINT RcvFragment; UINT RcvTotalOct; UINT TrsTotalOct; /* Livengood Statistics */ UINT AlignmentErrors; UINT TotalRcvErrors; UINT TrsUnderRun; UINT TrsNoCRS; UINT CarrierExtErrors; UINT RcvDMATooEarly;} ADAPTER_STRUCT, *PADAPTER_STRUCT;/*- Ethernet 14-byte Header */typedef struct _eth_header_t { uchar_t eth_dest[ETH_LENGTH_OF_ADDRESS]; uchar_t eth_src[ETH_LENGTH_OF_ADDRESS]; ushort eth_typelen;} eth_header_t, *peth_header_t;/* * e1000_dlpi.h * * This file supports all the defines that are specific to the Streams * sturcture and the DLPI interface *//* * STREAMS structures *//* * All the DLPI functions that are global and have been pre-fixed with DL should * be given the prefix e1000 */#define DL_NAME "e1000"#define DLdevflag e1000devflag#define DLinfo e1000info#define DLrminfo e1000rminfo#define DLwminfo e1000wminfo#define DLrinit e1000rinit#define DLwinit e1000winit#define DLstrlog e1000strlog#define DLifstats e1000ifstats#define DLboards e1000boards#define DLconfig e1000config#define DLid_string e1000id_string#define MBLK_LEN( X ) (X->b_wptr - X->b_rptr)#define PHYS_ADDR( X ) vtop((caddr_t)( X ), NULL )#define MBLK_NEXT( X ) ( X->b_cont )/* * Flow control definnitions for STREAMS */#define DL_MIN_PACKET 0#define DL_MAX_PACKET 1500#define DL_MAX_PACKET_LLC (DL_MAX_PACKET - 3)#define DL_MAX_PACKET_SNAP (DL_MAX_PACKET_LLC - 5)#define DL_HIWATER (64 * 1024)#define DL_LOWATER (20 * 1024) /* set to 20k */#define USER_MAX_SIZE DL_MAX_PACKET#define USER_MIN_SIZE 46#ifdef MDI/* * Flag definitions used for various states */#define DRV_LOADED 0x800#define BOARD_PRESENT 0x01#define BOARD_DISABLED 0x02#define PROMISCUOUS 0x100#define ALL_MULTI 0x200#define BOARD_OPEN 0x010/* * Board structure definition only necessary for a MDI driver. This structure * defines all the NOS related fields that would be associated with each board. * This definition is a part of the dlpi_ether header file for * the UW212 driver, so it is not defined for the UW212 driver */typedef struct bdconfig { #ifdef IANS void *iANSReserved; piANSsupport_t iANSdata; #endif struct bdconfig *bd_next; /* pointer to next bd in chain */ struct bdconfig *bd_prev; /* pointer to prev bd in chain */ uint unit; /* from mdi_get_unit */ major_t major; /* major number for device */ ulong_t io_start; /* start of I/O base address */ ulong_t io_end; /* end of I/O base address */ paddr_t mem_start; /* start of base mem address */ paddr_t mem_end; /* start of base mem address */ int irq_level; /* interrupt request level */ int open_cnt; int bd_number; /* board number in multi-board setup */ int flags; /* board management flags */ int tx_flags; /* tx management flags */ int rx_flags; /* rx management flags */ struct timer_list timer_id; /* watchdog timer ID */ int timer_val; /* watchdog timer value */ int multicast_cnt; /* count of multicast address sets */ DL_eaddr_t eaddr; /* Ethernet address storage */ ADAPTER_STRUCT *bddp; /* board struct */ mltcst_cb_t *mc_data; /* pointer to the mc addr for the bd */ uint_t tx_count; /* these are linux only */ struct sk_buff *last_mp_fail; device_t *device; uchar_t pci_bus; uchar_t pci_dev_fun; ushort_t vendor; void *base_tx_tbds; void *base_rx_rbds; struct net_device_stats net_stats; int pre_tx_out_pad[8]; int tx_out_res; int post_tx_out_pad[8];} bd_config_t;#endif /* MDI *//************************************************************************** ** Module Name: *
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -