Home | History | Annotate | Line # | Download | only in pci
if_stgereg.h revision 1.4.10.1
      1  1.4.10.1      yamt /*	$NetBSD: if_stgereg.h,v 1.4.10.1 2008/05/16 02:24:44 yamt Exp $	*/
      2       1.1   thorpej 
      3       1.1   thorpej /*-
      4       1.1   thorpej  * Copyright (c) 2001 The NetBSD Foundation, Inc.
      5       1.1   thorpej  * All rights reserved.
      6       1.1   thorpej  *
      7       1.1   thorpej  * This code is derived from software contributed to The NetBSD Foundation
      8       1.1   thorpej  * by Jason R. Thorpe.
      9       1.1   thorpej  *
     10       1.1   thorpej  * Redistribution and use in source and binary forms, with or without
     11       1.1   thorpej  * modification, are permitted provided that the following conditions
     12       1.1   thorpej  * are met:
     13       1.1   thorpej  * 1. Redistributions of source code must retain the above copyright
     14       1.1   thorpej  *    notice, this list of conditions and the following disclaimer.
     15       1.1   thorpej  * 2. Redistributions in binary form must reproduce the above copyright
     16       1.1   thorpej  *    notice, this list of conditions and the following disclaimer in the
     17       1.1   thorpej  *    documentation and/or other materials provided with the distribution.
     18       1.1   thorpej  *
     19       1.1   thorpej  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     20       1.1   thorpej  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     21       1.1   thorpej  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     22       1.1   thorpej  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     23       1.1   thorpej  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     24       1.1   thorpej  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     25       1.1   thorpej  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     26       1.1   thorpej  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     27       1.1   thorpej  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     28       1.1   thorpej  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     29       1.1   thorpej  * POSSIBILITY OF SUCH DAMAGE.
     30       1.1   thorpej  */
     31       1.1   thorpej 
     32       1.1   thorpej #ifndef _DEV_PCI_IF_STGEREG_H_
     33       1.1   thorpej #define	_DEV_PCI_IF_STGEREG_H_
     34       1.1   thorpej 
     35       1.1   thorpej /*
     36       1.1   thorpej  * Register description for the Sundance Tech. TC9021 10/100/1000
     37       1.1   thorpej  * Ethernet controller.
     38       1.1   thorpej  *
     39       1.1   thorpej  * Note that while DMA addresses are all in 64-bit fields, only
     40       1.1   thorpej  * the lower 40 bits of a DMA address are valid.
     41       1.1   thorpej  */
     42       1.1   thorpej 
     43       1.1   thorpej /*
     44       1.1   thorpej  * TC9021 buffer fragment descriptor.
     45       1.1   thorpej  */
     46       1.1   thorpej struct stge_frag {
     47       1.1   thorpej 	uint64_t	frag_word0;	/* address, length */
     48       1.4     perry } __packed;
     49       1.1   thorpej 
     50       1.1   thorpej #define	FRAG_ADDR(x)	(((uint64_t)(x)) << 0)
     51       1.1   thorpej #define	FRAG_ADDR_MASK	FRAG_ADDR(0xfffffffffULL)
     52       1.1   thorpej #define	FRAG_LEN(x)	(((uint64_t)(x)) << 48)
     53       1.1   thorpej #define	FRAG_LEN_MASK	FRAG_LEN(0xffffULL)
     54       1.1   thorpej 
     55       1.1   thorpej /*
     56       1.1   thorpej  * TC9021 Transmit Frame Descriptor.  Note the number of fragments
     57       1.2     enami  * here is arbitrary, but we can't have any more than 15.
     58       1.1   thorpej  */
     59       1.1   thorpej #define	STGE_NTXFRAGS	12
     60       1.1   thorpej struct stge_tfd {
     61       1.1   thorpej 	uint64_t	tfd_next;	/* next TFD in list */
     62       1.1   thorpej 	uint64_t	tfd_control;	/* control bits */
     63       1.1   thorpej 					/* the buffer fragments */
     64       1.1   thorpej 	struct stge_frag tfd_frags[STGE_NTXFRAGS];
     65       1.4     perry } __packed;
     66       1.1   thorpej 
     67       1.1   thorpej #define	TFD_FrameId(x)		((x) << 0)
     68       1.1   thorpej #define	TFD_FrameId_MAX		0xffff
     69       1.1   thorpej #define	TFD_WordAlign(x)	((x) << 16)
     70       1.1   thorpej #define	TFD_WordAlign_dword	0		/* align to dword in TxFIFO */
     71       1.1   thorpej #define	TFD_WordAlign_word	2		/* align to word in TxFIFO */
     72       1.1   thorpej #define	TFD_WordAlign_disable	1		/* disable alignment */
     73       1.1   thorpej #define	TFD_TCPChecksumEnable	(1ULL << 18)
     74       1.1   thorpej #define	TFD_UDPChecksumEnable	(1ULL << 19)
     75       1.1   thorpej #define	TFD_IPChecksumEnable	(1ULL << 20)
     76       1.1   thorpej #define	TFD_FcsAppendDisable	(1ULL << 21)
     77       1.1   thorpej #define	TFD_TxIndicate		(1ULL << 22)
     78       1.1   thorpej #define	TFD_TxDMAIndicate	(1ULL << 23)
     79       1.1   thorpej #define	TFD_FragCount(x)	((x) << 24)
     80       1.1   thorpej #define	TFD_VLANTagInsert	(1ULL << 28)
     81       1.1   thorpej #define	TFD_TFDDone		(1ULL << 31)
     82       1.1   thorpej #define	TFD_VID(x)		(((uint64_t)(x)) << 32)
     83       1.1   thorpej #define	TFD_CFI			(1ULL << 44)
     84       1.1   thorpej #define	TFD_UserPriority(x)	(((uint64_t)(x)) << 45)
     85       1.1   thorpej 
     86       1.1   thorpej /*
     87       1.1   thorpej  * TC9021 Receive Frame Descriptor.  Each RFD has a single fragment
     88       1.1   thorpej  * in it, and the chip tells us the beginning and end of the frame.
     89       1.1   thorpej  */
     90       1.1   thorpej struct stge_rfd {
     91       1.1   thorpej 	uint64_t	rfd_next;	/* next RFD in list */
     92       1.1   thorpej 	uint64_t	rfd_status;	/* status bits */
     93       1.1   thorpej 	struct stge_frag rfd_frag;	/* the buffer */
     94       1.4     perry } __packed;
     95       1.1   thorpej 
     96       1.1   thorpej #define	RFD_RxDMAFrameLen(x)	((x) & 0xffff)
     97       1.1   thorpej #define	RFD_RxFIFOOverrun	(1ULL << 16)
     98       1.1   thorpej #define	RFD_RxRuntFrame		(1ULL << 17)
     99       1.1   thorpej #define	RFD_RxAlignmentError	(1ULL << 18)
    100       1.1   thorpej #define	RFD_RxFCSError		(1ULL << 19)
    101       1.1   thorpej #define	RFD_RxOversizedFrame	(1ULL << 20)
    102       1.1   thorpej #define	RFD_RxLengthError	(1ULL << 21)
    103       1.1   thorpej #define	RFD_VLANDetected	(1ULL << 22)
    104       1.1   thorpej #define	RFD_TCPDetected		(1ULL << 23)
    105       1.1   thorpej #define	RFD_TCPError		(1ULL << 24)
    106       1.1   thorpej #define	RFD_UDPDetected		(1ULL << 25)
    107       1.1   thorpej #define	RFD_UDPError		(1ULL << 26)
    108       1.1   thorpej #define	RFD_IPDetected		(1ULL << 27)
    109       1.1   thorpej #define	RFD_IPError		(1ULL << 28)
    110       1.1   thorpej #define	RFD_FrameStart		(1ULL << 29)
    111       1.1   thorpej #define	RFD_FrameEnd		(1ULL << 30)
    112       1.1   thorpej #define	RFD_RFDDone		(1ULL << 31)
    113       1.1   thorpej #define	RFD_TCI(x)		((((uint64_t)(x)) >> 32) & 0xffff)
    114       1.1   thorpej 
    115       1.1   thorpej /*
    116       1.1   thorpej  * PCI configuration registers used by the TC9021.
    117       1.1   thorpej  */
    118       1.1   thorpej 
    119       1.1   thorpej #define	STGE_PCI_IOBA		(PCI_MAPREG_START + 0x00)
    120       1.1   thorpej #define	STGE_PCI_MMBA		(PCI_MAPREG_START + 0x04)
    121       1.1   thorpej 
    122       1.1   thorpej /*
    123       1.1   thorpej  * EEPROM offsets.
    124       1.1   thorpej  */
    125       1.1   thorpej #define	STGE_EEPROM_ConfigParam		0x00
    126       1.1   thorpej #define	STGE_EEPROM_AsicCtrl		0x01
    127       1.1   thorpej #define	STGE_EEPROM_SubSystemVendorId	0x02
    128       1.1   thorpej #define	STGE_EEPROM_SubSystemId		0x03
    129       1.1   thorpej #define	STGE_EEPROM_StationAddress0	0x10
    130       1.1   thorpej #define	STGE_EEPROM_StationAddress1	0x11
    131       1.1   thorpej #define	STGE_EEPROM_StationAddress2	0x12
    132       1.1   thorpej 
    133       1.1   thorpej /*
    134       1.1   thorpej  * The TC9021 register space.
    135       1.1   thorpej  */
    136       1.1   thorpej 
    137       1.1   thorpej #define	STGE_DMACtrl			0x00
    138       1.1   thorpej #define	DMAC_RxDMAComplete		(1U << 3)
    139       1.1   thorpej #define	DMAC_RxDMAPollNow		(1U << 4)
    140       1.1   thorpej #define	DMAC_TxDMAComplete		(1U << 11)
    141       1.1   thorpej #define	DMAC_TxDMAPollNow		(1U << 12)
    142       1.1   thorpej #define	DMAC_TxDMAInProg		(1U << 15)
    143       1.1   thorpej #define	DMAC_RxEarlyDisable		(1U << 16)
    144       1.1   thorpej #define	DMAC_MWIDisable			(1U << 18)
    145       1.1   thorpej #define	DMAC_TxWiteBackDisable		(1U << 19)
    146       1.1   thorpej #define	DMAC_TxBurstLimit(x)		((x) << 20)
    147       1.1   thorpej #define	DMAC_TargetAbort		(1U << 30)
    148       1.1   thorpej #define	DMAC_MasterAbort		(1U << 31)
    149       1.1   thorpej 
    150       1.1   thorpej #define	STGE_RxDMAStatus		0x08
    151       1.1   thorpej 
    152       1.1   thorpej #define	STGE_TFDListPtrLo		0x10
    153       1.1   thorpej 
    154       1.1   thorpej #define	STGE_TFDListPtrHi		0x14
    155       1.1   thorpej 
    156       1.1   thorpej #define	STGE_TxDMABurstThresh		0x18	/* 8-bit */
    157       1.1   thorpej 
    158       1.1   thorpej #define	STGE_TxDMAUrgentThresh		0x19	/* 8-bit */
    159       1.1   thorpej 
    160       1.1   thorpej #define	STGE_TxDMAPollPeriod		0x1a	/* 8-bit */
    161       1.1   thorpej 
    162       1.1   thorpej #define	STGE_RFDListPtrLo		0x1c
    163       1.1   thorpej 
    164       1.1   thorpej #define	STGE_RFDListPtrHi		0x20
    165       1.1   thorpej 
    166       1.1   thorpej #define	STGE_RxDMABurstThresh		0x24	/* 8-bit */
    167       1.1   thorpej 
    168       1.1   thorpej #define	STGE_RxDMAUrgentThresh		0x25	/* 8-bit */
    169       1.1   thorpej 
    170       1.1   thorpej #define	STGE_RxDMAPollPeriod		0x26	/* 8-bit */
    171       1.1   thorpej 
    172       1.1   thorpej #define	STGE_RxDMAIntCtrl		0x28
    173       1.1   thorpej #define	RDIC_RxFrameCount(x)		((x) & 0xff)
    174       1.1   thorpej #define	RDIC_PriorityThresh(x)		((x) << 10)
    175       1.1   thorpej #define	RDIC_RxDMAWaitTime(x)		((x) << 16)
    176       1.1   thorpej 
    177       1.1   thorpej #define	STGE_DebugCtrl			0x2c	/* 16-bit */
    178       1.1   thorpej #define	DC_GPIO0Ctrl			(1U << 0)
    179       1.1   thorpej #define	DC_GPIO1Ctrl			(1U << 1)
    180       1.1   thorpej #define	DC_GPIO0			(1U << 2)
    181       1.1   thorpej #define	DC_GPIO1			(1U << 3)
    182       1.1   thorpej 
    183       1.1   thorpej #define	STGE_AsicCtrl			0x30
    184       1.1   thorpej #define	AC_ExpRomDisable		(1U << 0)
    185       1.1   thorpej #define	AC_ExpRomSize			(1U << 1)
    186       1.1   thorpej #define	AC_PhySpeed10			(1U << 4)
    187       1.1   thorpej #define	AC_PhySpeed100			(1U << 5)
    188       1.1   thorpej #define	AC_PhySpeed1000			(1U << 6)
    189       1.1   thorpej #define	AC_PhyMedia			(1U << 7)
    190       1.1   thorpej #define	AC_ForcedConfig(x)		((x) << 8)
    191       1.1   thorpej #define	AC_ForcedConfig_MASK		AC_ForcedConfig(7)
    192       1.1   thorpej #define	AC_D3ResetDisable		(1U << 11)
    193       1.1   thorpej #define	AC_SpeedupMode			(1U << 13)
    194       1.1   thorpej #define	AC_LEDMode			(1U << 14)
    195       1.1   thorpej #define	AC_RstOutPolarity		(1U << 15)
    196       1.1   thorpej #define	AC_GlobalReset			(1U << 16)
    197       1.1   thorpej #define	AC_RxReset			(1U << 17)
    198       1.1   thorpej #define	AC_TxReset			(1U << 18)
    199       1.1   thorpej #define	AC_DMA				(1U << 19)
    200       1.1   thorpej #define	AC_FIFO				(1U << 20)
    201       1.1   thorpej #define	AC_Network			(1U << 21)
    202       1.1   thorpej #define	AC_Host				(1U << 22)
    203       1.1   thorpej #define	AC_AutoInit			(1U << 23)
    204       1.1   thorpej #define	AC_RstOut			(1U << 24)
    205       1.1   thorpej #define	AC_InterruptRequest		(1U << 25)
    206       1.1   thorpej #define	AC_ResetBusy			(1U << 26)
    207       1.1   thorpej 
    208       1.1   thorpej #define	STGE_FIFOCtrl			0x38	/* 16-bit */
    209       1.1   thorpej #define	FC_RAMTestMode			(1U << 0)
    210       1.1   thorpej #define	FC_Transmitting			(1U << 14)
    211       1.1   thorpej #define	FC_Receiving			(1U << 15)
    212       1.1   thorpej 
    213       1.1   thorpej #define	STGE_RxEarlyThresh		0x3a	/* 16-bit */
    214       1.1   thorpej 
    215       1.1   thorpej #define	STGE_FlowOffThresh		0x3c	/* 16-bit */
    216       1.1   thorpej 
    217       1.1   thorpej #define	STGE_FlowOnTresh		0x3e	/* 16-bit */
    218       1.1   thorpej 
    219       1.1   thorpej #define	STGE_TxStartThresh		0x44	/* 16-bit */
    220       1.1   thorpej 
    221       1.1   thorpej #define	STGE_EepromData			0x48	/* 16-bit */
    222       1.1   thorpej 
    223       1.1   thorpej #define	STGE_EepromCtrl			0x4a	/* 16-bit */
    224       1.1   thorpej #define	EC_EepromAddress(x)		((x) & 0xff)
    225       1.1   thorpej #define	EC_EepromOpcode(x)		((x) << 8)
    226       1.1   thorpej #define	EC_OP_WE			0
    227       1.1   thorpej #define	EC_OP_WR			1
    228       1.1   thorpej #define	EC_OP_RR			2
    229       1.1   thorpej #define	EC_OP_ER			3
    230       1.1   thorpej #define	EC_EepromBusy			(1U << 15)
    231       1.1   thorpej 
    232       1.1   thorpej #define	STGE_ExpRomAddr			0x4c
    233       1.1   thorpej 
    234       1.1   thorpej #define	STGE_ExpRomData			0x50	/* 8-bit */
    235       1.1   thorpej 
    236       1.1   thorpej #define	STGE_WakeEvent			0x51	/* 8-bit */
    237       1.1   thorpej 
    238       1.1   thorpej #define	STGE_Countdown			0x54
    239       1.1   thorpej #define	CD_Count(x)			((x) & 0xffff)
    240       1.1   thorpej #define	CD_CountdownSpeed		(1U << 24)
    241       1.1   thorpej #define	CD_CountdownMode		(1U << 25)
    242       1.1   thorpej #define	CD_CountdownIntEnabled		(1U << 26)
    243       1.1   thorpej 
    244       1.1   thorpej #define	STGE_IntStatusAck		0x5a	/* 16-bit */
    245       1.1   thorpej 
    246       1.3  christos #define	STGE_IntStatus			0x5e	/* 16-bit */
    247       1.3  christos 
    248       1.1   thorpej #define	STGE_IntEnable			0x5c	/* 16-bit */
    249       1.1   thorpej 
    250       1.1   thorpej #define	IS_InterruptStatus		(1U << 0)
    251       1.3  christos #define	IS_HostError			(1U << 1)
    252       1.3  christos #define	IS_TxComplete			(1U << 2)
    253       1.3  christos #define	IS_MACControlFrame		(1U << 3)
    254       1.3  christos #define	IS_RxComplete			(1U << 4)
    255       1.3  christos #define	IS_RxEarly			(1U << 5)
    256       1.3  christos #define	IS_InRequested			(1U << 6)
    257       1.3  christos #define	IS_UpdateStats			(1U << 7)
    258       1.3  christos #define	IS_LinkEvent			(1U << 8)
    259       1.3  christos #define	IS_TxDMAComplete		(1U << 9)
    260       1.3  christos #define	IS_RxDMAComplete		(1U << 10)
    261       1.3  christos #define	IS_RFDListEnd			(1U << 11)
    262       1.3  christos #define	IS_RxDMAPriority		(1U << 12)
    263       1.1   thorpej 
    264       1.1   thorpej #define	STGE_TxStatus			0x60
    265       1.1   thorpej #define	TS_TxError			(1U << 0)
    266       1.1   thorpej #define	TS_LateCollision		(1U << 2)
    267       1.1   thorpej #define	TS_MaxCollisions		(1U << 3)
    268       1.1   thorpej #define	TS_TxUnderrun			(1U << 4)
    269       1.1   thorpej #define	TS_TxIndicateReqd		(1U << 6)
    270       1.1   thorpej #define	TS_TxComplete			(1U << 7)
    271       1.1   thorpej #define	TS_TxFrameId_get(x)		((x) >> 16)
    272       1.1   thorpej 
    273       1.1   thorpej #define	STGE_MACCtrl			0x6c
    274       1.1   thorpej #define	MC_IFSSelect(x)			((x) & 3)
    275       1.1   thorpej #define	MC_DuplexSelect			(1U << 5)
    276       1.1   thorpej #define	MC_RcvLargeFrames		(1U << 6)
    277       1.1   thorpej #define	MC_TxFlowControlEnable		(1U << 7)
    278       1.1   thorpej #define	MC_RxFlowControlEnable		(1U << 8)
    279       1.1   thorpej #define	MC_RcvFCS			(1U << 9)
    280       1.1   thorpej #define	MC_FIFOLoopback			(1U << 10)
    281       1.1   thorpej #define	MC_MACLoopback			(1U << 11)
    282       1.1   thorpej #define	MC_AutoVLANtagging		(1U << 12)
    283       1.1   thorpej #define	MC_AutoVLANuntagging		(1U << 13)
    284       1.1   thorpej #define	MC_CollisionDetect		(1U << 16)
    285       1.1   thorpej #define	MC_CarrierSense			(1U << 17)
    286       1.1   thorpej #define	MC_StatisticsEnable		(1U << 21)
    287       1.1   thorpej #define	MC_StatisticsDisable		(1U << 22)
    288       1.1   thorpej #define	MC_StatisticsEnabled		(1U << 23)
    289       1.1   thorpej #define	MC_TxEnable			(1U << 24)
    290       1.1   thorpej #define	MC_TxDisable			(1U << 25)
    291       1.1   thorpej #define	MC_TxEnabled			(1U << 26)
    292       1.1   thorpej #define	MC_RxEnable			(1U << 27)
    293       1.1   thorpej #define	MC_RxDisable			(1U << 28)
    294       1.1   thorpej #define	MC_RxEnabled			(1U << 29)
    295       1.1   thorpej #define	MC_Paused			(1U << 30)
    296       1.1   thorpej 
    297       1.1   thorpej #define	STGE_VLANTag			0x70
    298       1.1   thorpej 
    299       1.1   thorpej #define	STGE_PhyCtrl			0x76	/* 8-bit */
    300       1.1   thorpej #define	PC_MgmtClk			(1U << 0)
    301       1.1   thorpej #define	PC_MgmtData			(1U << 1)
    302       1.1   thorpej #define	PC_MgmtDir			(1U << 2)	/* MAC->PHY */
    303       1.1   thorpej #define	PC_PhyDuplexPolarity		(1U << 3)
    304       1.1   thorpej #define	PC_PhyDuplexStatus		(1U << 4)
    305       1.1   thorpej #define	PC_PhyLnkPolarity		(1U << 5)
    306       1.1   thorpej #define	PC_LinkSpeed(x)			(((x) >> 6) & 3)
    307       1.1   thorpej #define	PC_LinkSpeed_Down		0
    308       1.1   thorpej #define	PC_LinkSpeed_10			1
    309       1.1   thorpej #define	PC_LinkSpeed_100		2
    310       1.1   thorpej #define	PC_LinkSpeed_1000		3
    311       1.1   thorpej 
    312       1.1   thorpej #define	STGE_StationAddress0		0x78	/* 16-bit */
    313       1.1   thorpej 
    314       1.1   thorpej #define	STGE_StationAddress1		0x7a	/* 16-bit */
    315       1.1   thorpej 
    316       1.1   thorpej #define	STGE_StationAddress2		0x7c	/* 16-bit */
    317       1.1   thorpej 
    318       1.1   thorpej #define	STGE_VLANHashTable		0x7e	/* 16-bit */
    319       1.1   thorpej 
    320       1.1   thorpej #define	STGE_VLANId			0x80
    321       1.1   thorpej 
    322       1.1   thorpej #define	STGE_MaxFrameSize		0x84
    323       1.1   thorpej 
    324       1.1   thorpej #define	STGE_ReceiveMode		0x88	/* 16-bit */
    325       1.1   thorpej #define	RM_ReceiveUnicast		(1U << 0)
    326       1.1   thorpej #define	RM_ReceiveMulticast		(1U << 1)
    327       1.1   thorpej #define	RM_ReceiveBroadcast		(1U << 2)
    328       1.1   thorpej #define	RM_ReceiveAllFrames		(1U << 3)
    329       1.1   thorpej #define	RM_ReceiveMulticastHash		(1U << 4)
    330       1.1   thorpej #define	RM_ReceiveIPMulticast		(1U << 5)
    331       1.1   thorpej #define	RM_ReceiveVLANMatch		(1U << 8)
    332       1.1   thorpej #define	RM_ReceiveVLANHash		(1U << 9)
    333       1.1   thorpej 
    334       1.1   thorpej #define	STGE_HashTable0			0x8c
    335       1.1   thorpej 
    336       1.1   thorpej #define	STGE_HashTable1			0x90
    337       1.1   thorpej 
    338       1.1   thorpej #define	STGE_RMONStatisticsMask		0x98	/* set to disable */
    339       1.1   thorpej 
    340       1.1   thorpej #define	STGE_StatisticsMask		0x9c	/* set to disable */
    341       1.1   thorpej 
    342       1.1   thorpej #define	STGE_RxJumboFrames		0xbc	/* 16-bit */
    343       1.1   thorpej 
    344       1.1   thorpej #define	STGE_TCPCheckSumErrors		0xc0	/* 16-bit */
    345       1.1   thorpej 
    346       1.1   thorpej #define	STGE_IPCheckSumErrors		0xc2	/* 16-bit */
    347       1.1   thorpej 
    348       1.1   thorpej #define	STGE_UDPCheckSumErrors		0xc4	/* 16-bit */
    349       1.1   thorpej 
    350       1.1   thorpej #define	STGE_TxJumboFrames		0xf4	/* 16-bit */
    351       1.1   thorpej 
    352       1.1   thorpej /*
    353       1.1   thorpej  * TC9021 statistics.  Available memory and I/O mapped.
    354       1.1   thorpej  */
    355       1.1   thorpej 
    356       1.1   thorpej #define	STGE_OctetRcvOk			0xa8
    357       1.1   thorpej 
    358       1.1   thorpej #define	STGE_McstOctetRcvdOk		0xac
    359       1.1   thorpej 
    360       1.1   thorpej #define	STGE_BcstOctetRcvdOk		0xb0
    361       1.1   thorpej 
    362       1.1   thorpej #define	STGE_FramesRcvdOk		0xb4
    363       1.1   thorpej 
    364       1.1   thorpej #define	STGE_McstFramesRcvdOk		0xb8
    365       1.1   thorpej 
    366       1.1   thorpej #define	STGE_BcstFramesRcvdOk		0xbe	/* 16-bit */
    367       1.1   thorpej 
    368       1.1   thorpej #define	STGE_MacControlFramesRcvd	0xc6	/* 16-bit */
    369       1.1   thorpej 
    370       1.1   thorpej #define	STGE_FrameTooLongErrors		0xc8	/* 16-bit */
    371       1.1   thorpej 
    372       1.1   thorpej #define	STGE_InRangeLengthErrors	0xca	/* 16-bit */
    373       1.1   thorpej 
    374       1.1   thorpej #define	STGE_FramesCheckSeqErrors	0xcc	/* 16-bit */
    375       1.1   thorpej 
    376       1.1   thorpej #define	STGE_FramesLostRxErrors		0xce	/* 16-bit */
    377       1.1   thorpej 
    378       1.1   thorpej #define	STGE_OctetXmtdOk		0xd0
    379       1.1   thorpej 
    380       1.1   thorpej #define	STGE_McstOctetXmtdOk		0xd4
    381       1.1   thorpej 
    382       1.1   thorpej #define	STGE_BcstOctetXmtdOk		0xd8
    383       1.1   thorpej 
    384       1.1   thorpej #define	STGE_FramesXmtdOk		0xdc
    385       1.1   thorpej 
    386       1.1   thorpej #define	STGE_McstFramesXmtdOk		0xe0
    387       1.1   thorpej 
    388       1.1   thorpej #define	STGE_FramesWDeferredXmt		0xe4
    389       1.1   thorpej 
    390       1.1   thorpej #define	STGE_LateCollisions		0xe8
    391       1.1   thorpej 
    392       1.1   thorpej #define	STGE_MultiColFrames		0xec
    393       1.1   thorpej 
    394       1.1   thorpej #define	STGE_SingleColFrames		0xf0
    395       1.1   thorpej 
    396       1.1   thorpej #define	STGE_BcstFramesXmtdOk		0xf6	/* 16-bit */
    397       1.1   thorpej 
    398       1.1   thorpej #define	STGE_CarrierSenseErrors		0xf8	/* 16-bit */
    399       1.1   thorpej 
    400       1.1   thorpej #define	STGE_MacControlFramesXmtd	0xfa	/* 16-bit */
    401       1.1   thorpej 
    402       1.1   thorpej #define	STGE_FramesAbortXSColls		0xfc	/* 16-bit */
    403       1.1   thorpej 
    404       1.1   thorpej #define	STGE_FramesWEXDeferal		0xfe	/* 16-bit */
    405       1.1   thorpej 
    406       1.1   thorpej /*
    407       1.1   thorpej  * RMON-compatible statistics.  Only accessible if memory-mapped.
    408       1.1   thorpej  */
    409       1.1   thorpej 
    410       1.1   thorpej #define	STGE_EtherStatsCollisions			0x100
    411       1.1   thorpej 
    412       1.1   thorpej #define	STGE_EtherStatsOctetsTransmit			0x104
    413       1.1   thorpej 
    414       1.1   thorpej #define	STGE_EtherStatsPktsTransmit			0x108
    415       1.1   thorpej 
    416       1.1   thorpej #define	STGE_EtherStatsPkts64OctetsTransmit		0x10c
    417       1.1   thorpej 
    418       1.1   thorpej #define	STGE_EtherStatsPkts64to127OctetsTransmit	0x110
    419       1.1   thorpej 
    420       1.1   thorpej #define	STGE_EtherStatsPkts128to255OctetsTransmit	0x114
    421       1.1   thorpej 
    422       1.1   thorpej #define	STGE_EtherStatsPkts256to511OctetsTransmit	0x118
    423       1.1   thorpej 
    424       1.1   thorpej #define	STGE_EtherStatsPkts512to1023OctetsTransmit	0x11c
    425       1.1   thorpej 
    426       1.1   thorpej #define	STGE_EtherStatsPkts1024to1518OctetsTransmit	0x120
    427       1.1   thorpej 
    428       1.1   thorpej #define	STGE_EtherStatsCRCAlignErrors			0x124
    429       1.1   thorpej 
    430       1.1   thorpej #define	STGE_EtherStatsUndersizePkts			0x128
    431       1.1   thorpej 
    432       1.1   thorpej #define	STGE_EtherStatsFragments			0x12c
    433       1.1   thorpej 
    434       1.1   thorpej #define	STGE_EtherStatsJabbers				0x130
    435       1.1   thorpej 
    436       1.1   thorpej #define	STGE_EtherStatsOctets				0x134
    437       1.1   thorpej 
    438       1.1   thorpej #define	STGE_EtherStatsPkts				0x138
    439       1.1   thorpej 
    440       1.1   thorpej #define	STGE_EtherStatsPkts64Octets			0x13c
    441       1.1   thorpej 
    442       1.1   thorpej #define	STGE_EtherStatsPkts65to127Octets		0x140
    443       1.1   thorpej 
    444       1.1   thorpej #define	STGE_EtherStatsPkts128to255Octets		0x144
    445       1.1   thorpej 
    446       1.1   thorpej #define	STGE_EtherStatsPkts256to511Octets		0x148
    447       1.1   thorpej 
    448       1.1   thorpej #define	STGE_EtherStatsPkts512to1023Octets		0x14c
    449       1.1   thorpej 
    450       1.1   thorpej #define	STGE_EtherStatsPkts1024to1518Octets		0x150
    451       1.1   thorpej 
    452       1.1   thorpej #endif /* _DEV_PCI_IF_STGEREG_H_ */
    453