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