xref: /netbsd/sys/dev/ic/i82586reg.h (revision bf9ec67e)
1 /*	$NetBSD: i82586reg.h,v 1.9 2001/11/26 23:31:00 fredette Exp $	*/
2 
3 /*-
4  * Copyright (c) 1998 The NetBSD Foundation, Inc.
5  * All rights reserved.
6  *
7  * This code is derived from software contributed to The NetBSD Foundation
8  * by Paul Kranenburg.
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions
12  * are met:
13  * 1. Redistributions of source code must retain the above copyright
14  *    notice, this list of conditions and the following disclaimer.
15  * 2. Redistributions in binary form must reproduce the above copyright
16  *    notice, this list of conditions and the following disclaimer in the
17  *    documentation and/or other materials provided with the distribution.
18  * 3. All advertising materials mentioning features or use of this software
19  *    must display the following acknowledgement:
20  *        This product includes software developed by the NetBSD
21  *        Foundation, Inc. and its contributors.
22  * 4. Neither the name of The NetBSD Foundation nor the names of its
23  *    contributors may be used to endorse or promote products derived
24  *    from this software without specific prior written permission.
25  *
26  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36  * POSSIBILITY OF SUCH DAMAGE.
37  */
38 
39 /*-
40  * Copyright (c) 1992, University of Vermont and State Agricultural College.
41  * Copyright (c) 1992, Garrett A. Wollman.
42  * All rights reserved.
43  *
44  * Redistribution and use in source and binary forms, with or without
45  * modification, are permitted provided that the following conditions
46  * are met:
47  * 1. Redistributions of source code must retain the above copyright
48  *    notice, this list of conditions and the following disclaimer.
49  * 2. Redistributions in binary form must reproduce the above copyright
50  *    notice, this list of conditions and the following disclaimer in the
51  *    documentation and/or other materials provided with the distribution.
52  * 3. All advertising materials mentioning features or use of this software
53  *    must display the following acknowledgement:
54  *	This product includes software developed by the University of
55  *	Vermont and State Agricultural College and Garrett A. Wollman.
56  * 4. Neither the name of the University nor the name of the author
57  *    may be used to endorse or promote products derived from this software
58  *    without specific prior written permission.
59  *
60  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
61  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
62  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
63  * ARE DISCLAIMED.  IN NO EVENT SHALL THE UNIVERSITY OR AUTHOR BE LIABLE
64  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
65  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
66  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
67  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
68  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
69  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
70  * SUCH DAMAGE.
71  */
72 
73 /*
74  * Intel 82586 Ethernet chip
75  * Register, bit, and structure definitions.
76  *
77  * Written by GAW with reference to the Clarkson Packet Driver code for this
78  * chip written by Russ Nelson and others.
79  */
80 
81 /*
82  * NOTE, the structure definitions in here are for reference only.
83  * We use integer offsets exclusively to access the i82586 data structures.
84  */
85 
86 /*
87  * The i82596 has a hardware port that can be used to command the
88  * chip to perform special functions.  For all but IE_PORT_RESET,
89  * a 16-byte aligned memory address is ORed into the port command.
90  */
91 #define IE_PORT_RESET		0x00	/* software reset */
92 #define IE_PORT_SELF_TEST	0x01	/* self-test */
93 #define IE_PORT_ALT_SCP		0x02	/* set alternate SCP address */
94 #define IE_PORT_DUMP		0x03	/* dump state */
95 
96 /*
97  * This is the master configuration block.
98  * It tells the hardware where all the rest of the stuff is.
99  *-
100 struct __ie_sys_conf_ptr {
101 	u_int16_t	mbz;			// must be zero
102 	u_int8_t	ie_bus_use;		// true if 8-bit only
103 	u_int8_t	mbz2[5];		// must be zero
104 	u_int32_t	ie_iscp_ptr;		// 24-bit physaddr of ISCP
105 };
106  */
107 #define IE_SCP_SZ		12
108 #define IE_SCP_BUS_USE(base)	((base) + 2)
109 #define IE_SCP_ISCP(base)	((base) + 8)
110 
111 /*
112  * SYSBUS byte flags.  Most are specific to the i82596, and so
113  * far we always run an i82596 in i82586-compatible mode.
114  */
115 #define IE_SYSBUS_16BIT		(0x0 << 0)
116 #define IE_SYSBUS_8BIT		(0x1 << 0)
117 #define IE_SYSBUS_596_82586	(0x0 << 1)
118 #define IE_SYSBUS_596_32SEG	(0x1 << 1)
119 #define IE_SYSBUS_596_LINEAR	(0x2 << 1)
120 #define IE_SYSBUS_596_TRGINT	(0x0 << 3)
121 #define IE_SYSBUS_596_TRGEXT	(0x1 << 3)
122 #define IE_SYSBUS_596_NOLOCK	(0x0 << 4)
123 #define IE_SYSBUS_596_LOCK	(0x1 << 4)
124 #define IE_SYSBUS_596_INTHIGH	(0x0 << 4)
125 #define IE_SYSBUS_596_INTLOW	(0x1 << 5)
126 #define IE_SYSBUS_596_RSVD_SET	(0x1 << 6)
127 #define IE_SYSBUS_596_LE	(0x0 << 7)
128 #define IE_SYSBUS_596_BE	(0x1 << 7)
129 
130 /*
131  * Note that this is wired in hardware; the SCP is always located here, no
132  * matter what.
133  */
134 #define IE_SCP_ADDR 0xfffff4
135 
136 /*
137  * The tells the hardware where all the rest of the stuff is, too.
138  * FIXME: some of these should be re-commented after we figure out their
139  * REAL function.
140  *-
141 struct __ie_int_sys_conf_ptr {
142 	u_int8_t	ie_busy;	// zeroed after init
143 	u_int8_t	mbz;
144 	u_int16_t	ie_scb_offset;	// 16-bit physaddr of next struct
145 	caddr_t		ie_base;	// 24-bit physaddr for all 16-bit vars
146 };
147  */
148 #define IE_ISCP_SZ		8
149 #define IE_ISCP_BUSY(base)	((base) + 0)
150 #define IE_ISCP_SCB(base)	((base) + 2)
151 #define IE_ISCP_BASE(base)	((base) + 4)
152 
153 /*
154  * This FINALLY tells the hardware what to do and where to put it.
155  *-
156 struct __ie_sys_ctl_block {
157 	u_int16_t ie_status;		// status word
158 	u_int16_t ie_command;		// command word
159 	u_int16_t ie_command_list;	// 16-pointer to command block list
160 	u_int16_t ie_recv_list;		// 16-pointer to receive frame list
161 	u_int16_t ie_err_crc;		// CRC errors
162 	u_int16_t ie_err_align;		// Alignment errors
163 	u_int16_t ie_err_resource;	// Resource errors
164 	u_int16_t ie_err_overrun;	// Overrun errors
165 };
166  */
167 #define IE_SCB_SZ		16
168 #define IE_SCB_STATUS(base)	((base) + 0)
169 #define IE_SCB_CMD(base)	((base) + 2)
170 #define IE_SCB_CMDLST(base)	((base) + 4)
171 #define IE_SCB_RCVLST(base)	((base) + 6)
172 #define IE_SCB_ERRCRC(base)	((base) + 8)
173 #define IE_SCB_ERRALN(base)	((base) + 10)
174 #define IE_SCB_ERRRES(base)	((base) + 12)
175 #define IE_SCB_ERROVR(base)	((base) + 14)
176 
177 /* Command values */
178 #define IE_RUC_MASK	0x0070	/* mask for RU command */
179 #define IE_RUC_NOP	0	/* for completeness */
180 #define IE_RUC_START	0x0010	/* start receive unit command */
181 #define IE_RUC_RESUME	0x0020	/* resume a suspended receiver command */
182 #define IE_RUC_SUSPEND	0x0030	/* suspend receiver command */
183 #define IE_RUC_ABORT	0x0040	/* abort current receive operation */
184 
185 #define IE_CUC_MASK	0x0700	/* mask for CU command */
186 #define IE_CUC_NOP	0	/* included for completeness */
187 #define IE_CUC_START	0x0100	/* do-command command */
188 #define IE_CUC_RESUME	0x0200	/* resume a suspended cmd list */
189 #define IE_CUC_SUSPEND	0x0300	/* suspend current command */
190 #define IE_CUC_ABORT	0x0400	/* abort current command */
191 
192 #define IE_ACK_COMMAND	0xf000	/* mask for ACK command */
193 #define IE_ACK_CX	0x8000	/* ack IE_ST_CX */
194 #define IE_ACK_FR	0x4000	/* ack IE_ST_FR */
195 #define IE_ACK_CNA	0x2000	/* ack IE_ST_CNA */
196 #define IE_ACK_RNR	0x1000	/* ack IE_ST_RNR */
197 
198 #define IE_ACTION_COMMAND(x) (((x) & IE_CUC_MASK) == IE_CUC_START)
199 				/* is this command an action command? */
200 
201 /* Status values */
202 #define IE_ST_WHENCE	0xf000	/* mask for cause of interrupt */
203 #define IE_ST_CX	0x8000	/* command with I bit completed */
204 #define IE_ST_FR	0x4000	/* frame received */
205 #define IE_ST_CNA	0x2000	/* all commands completed */
206 #define IE_ST_RNR	0x1000	/* receive not ready */
207 
208 #define IE_CUS_MASK	0x0700	/* mask for command unit status */
209 #define IE_CUS_ACTIVE	0x0200	/* command unit is active */
210 #define IE_CUS_SUSPEND	0x0100	/* command unit is suspended */
211 
212 #define IE_RUS_MASK	0x0070	/* mask for receiver unit status */
213 #define IE_RUS_SUSPEND	0x0010	/* receiver is suspended */
214 #define IE_RUS_NOSPACE	0x0020	/* receiver has no resources */
215 #define IE_RUS_READY	0x0040	/* receiver is ready */
216 
217 /*
218  * This is filled in partially by the chip, partially by us.
219  *-
220 struct __ie_recv_frame_desc {
221 	u_int16_t	ie_fd_status;	// status for this frame
222 	u_int16_t	ie_fd_last;	// end of frame list flag
223 	u_int16_t	ie_fd_next;	// 16-pointer to next RFD
224 	u_int16_t	ie_fd_buf_desc;	// 16-pointer to list of buffer descs
225 	struct __ie_en_addr dest;	// destination ether
226 	struct __ie_en_addr src;	// source ether
227 	u_int16_t	ie_length;	// 802 length/Ether type
228 	u_short		mbz;		// must be zero
229 };
230  */
231 #define IE_RFRAME_SZ			24
232 #define IE_RFRAME_ADDR(base,i)		((base) + (i) * IE_RFRAME_SZ)
233 #define IE_RFRAME_STATUS(b,i)		(IE_RFRAME_ADDR(b,i) + 0)
234 #define IE_RFRAME_LAST(b,i)		(IE_RFRAME_ADDR(b,i) + 2)
235 #define IE_RFRAME_NEXT(b,i)		(IE_RFRAME_ADDR(b,i) + 4)
236 #define IE_RFRAME_BUFDESC(b,i)		(IE_RFRAME_ADDR(b,i) + 6)
237 #define IE_RFRAME_EDST(b,i)		(IE_RFRAME_ADDR(b,i) + 8)
238 #define IE_RFRAME_ESRC(b,i)		(IE_RFRAME_ADDR(b,i) + 14)
239 #define IE_RFRAME_ELEN(b,i)		(IE_RFRAME_ADDR(b,i) + 20)
240 
241 /* "last" bits */
242 #define IE_FD_EOL	0x8000	/* last rfd in list */
243 #define IE_FD_SUSP	0x4000	/* suspend RU after receipt */
244 
245 /* status field bits */
246 #define IE_FD_COMPLETE	0x8000	/* frame is complete */
247 #define IE_FD_BUSY	0x4000	/* frame is busy */
248 #define IE_FD_OK	0x2000	/* frame is ok */
249 #define IE_FD_CRC	0x0800	/* CRC error */
250 #define IE_FD_ALGN	0x0400	/* Alignment error */
251 #define IE_FD_RNR	0x0200	/* receiver out of resources here */
252 #define IE_FD_OVR	0x0100	/* DMA overrun */
253 #define IE_FD_SHORT	0x0080	/* Short frame */
254 #define IE_FD_NOEOF	0x0040	/* no EOF (?) */
255 #define IE_FD_ERRMASK		/* all error bits */ \
256 	(IE_FD_CRC|IE_FD_ALGN|IE_FD_RNR|IE_FD_OVR|IE_FD_SHORT|IE_FD_NOEOF)
257 #define IE_FD_STATUSBITS	\
258 	"\20\20COMPLT\17BUSY\16OK\14CRC\13ALGN\12RNR\11OVR\10SHORT\7NOEOF"
259 
260 /*
261  * linked list of buffers...
262  *-
263 struct __ie_recv_buf_desc {
264 	u_int16_t	ie_rbd_status;	// status for this buffer
265 	u_int16_t	ie_rbd_next;	// 16-pointer to next RBD
266 	caddr_t		ie_rbd_buffer;	// 24-pointer to buffer for this RBD
267 	u_int16_t	ie_rbd_length;	// length of the buffer
268 	u_int16_t	mbz;		// must be zero
269 };
270  */
271 #define IE_RBD_SZ			12
272 #define IE_RBD_ADDR(base,i)		((base) + (i) * IE_RBD_SZ)
273 #define IE_RBD_STATUS(b,i)		(IE_RBD_ADDR(b,i) + 0)
274 #define IE_RBD_NEXT(b,i)		(IE_RBD_ADDR(b,i) + 2)
275 #define IE_RBD_BUFADDR(b,i)		(IE_RBD_ADDR(b,i) + 4)
276 #define IE_RBD_BUFLEN(b,i)		(IE_RBD_ADDR(b,i) + 8)
277 
278 /* RBD status fields */
279 #define IE_RBD_LAST	0x8000		/* last buffer */
280 #define IE_RBD_USED	0x4000		/* this buffer has data */
281 #define IE_RBD_CNTMASK	0x3fff		/* byte count of buffer data */
282 
283 /* RDB `End Of List' flag; encoded in `buffer length' field */
284 #define IE_RBD_EOL	0x8000		/* last buffer */
285 
286 
287 /*
288  * All commands share this in common.
289  *-
290 struct __ie_cmd_common {
291 	u_int16_t ie_cmd_status;	// status of this command
292 	u_int16_t ie_cmd_cmd;		// command word
293 	u_int16_t ie_cmd_link;		// link to next command
294 };
295  */
296 #define IE_CMD_COMMON_SZ		6
297 #define IE_CMD_COMMON_STATUS(base)	((base) + 0)
298 #define IE_CMD_COMMON_CMD(base)		((base) + 2)
299 #define IE_CMD_COMMON_LINK(base)	((base) + 4)
300 
301 #define IE_STAT_COMPL	0x8000	/* command is completed */
302 #define IE_STAT_BUSY	0x4000	/* command is running now */
303 #define IE_STAT_OK	0x2000	/* command completed successfully */
304 #define IE_STAT_ABORT	0x1000  /* command was aborted */
305 
306 #define IE_CMD_NOP	0x0000	/* NOP */
307 #define IE_CMD_IASETUP	0x0001	/* initial address setup */
308 #define IE_CMD_CONFIG	0x0002	/* configure command */
309 #define IE_CMD_MCAST	0x0003	/* multicast setup command */
310 #define IE_CMD_XMIT	0x0004	/* transmit command */
311 #define IE_CMD_TDR	0x0005	/* time-domain reflectometer command */
312 #define IE_CMD_DUMP	0x0006	/* dump command */
313 #define IE_CMD_DIAGNOSE	0x0007	/* diagnostics command */
314 
315 #define IE_CMD_LAST	0x8000	/* this is the last command in the list */
316 #define IE_CMD_SUSPEND	0x4000	/* suspend CU after this command */
317 #define IE_CMD_INTR	0x2000	/* post an interrupt after completion */
318 
319 /*
320  * No-op commands; just like COMMON but "indexable"
321  */
322 #define IE_CMD_NOP_SZ			IE_CMD_COMMON_SZ
323 #define IE_CMD_NOP_ADDR(base,i)		((base) + (i) * IE_CMD_NOP_SZ)
324 #define IE_CMD_NOP_STATUS(b,i)		(IE_CMD_NOP_ADDR(b,i) + 0)
325 #define IE_CMD_NOP_CMD(b,i)		(IE_CMD_NOP_ADDR(b,i) + 2)
326 #define IE_CMD_NOP_LINK(b,i)		(IE_CMD_NOP_ADDR(b,i) + 4)
327 
328 
329 /*
330  * This is the command to transmit a frame.
331  *-
332 struct __ie_xmit_cmd {
333 	struct __ie_cmd_common	com;		// common part
334 #define __ie_xmit_status	com.ie_cmd_status
335 
336 	u_int16_t	ie_xmit_desc;		// pointer to buffer descriptor
337 	struct __ie_en_addr ie_xmit_addr;	// destination address
338 	u_int16_t	ie_xmit_length;		// 802.3 length/Ether type field
339 };
340  */
341 #define IE_CMD_XMIT_SZ			(IE_CMD_COMMON_SZ + 10)
342 #define IE_CMD_XMIT_ADDR(base,i)	((base) + (i) * IE_CMD_XMIT_SZ)
343 #define IE_CMD_XMIT_STATUS(b,i)		\
344 	(IE_CMD_XMIT_ADDR(b,i) + 0)	/* == CMD_COMMON_STATUS */
345 #define IE_CMD_XMIT_CMD(b,i)		\
346 	(IE_CMD_XMIT_ADDR(b,i) + 2)	/* == CMD_COMMON_CMD */
347 #define IE_CMD_XMIT_LINK(b,i)		\
348 	(IE_CMD_XMIT_ADDR(b,i) + 4)	/* == CMD_COMMON_LINK */
349 #define IE_CMD_XMIT_DESC(b,i)		\
350 	(IE_CMD_XMIT_ADDR(b,i) + IE_CMD_COMMON_SZ + 0)
351 #define IE_CMD_XMIT_EADDR(b,i)		\
352 	(IE_CMD_XMIT_ADDR(b,i) + IE_CMD_COMMON_SZ + 2)
353 #define IE_CMD_XMIT_LEN(b,i)		\
354 	(IE_CMD_XMIT_ADDR(b,i) + IE_CMD_COMMON_SZ + 8)
355 
356 #define IE_XS_MAXCOLL  	0x000f	/* number of collisions during transmit */
357 #define IE_XS_EXCMAX	0x0020	/* exceeded maximum number of collisions */
358 #define IE_XS_SQE	0x0040	/* SQE positive */
359 #define IE_XS_DEFERRED	0x0080	/* transmission deferred */
360 #define IE_XS_UNDERRUN	0x0100	/* DMA underrun */
361 #define IE_XS_LOSTCTS	0x0200	/* Lost CTS */
362 #define IE_XS_NOCARRIER	0x0400	/* No Carrier */
363 #define	IE_XS_LATECOLL	0x0800	/* Late collision */
364 
365 /*
366  * This is a buffer descriptor for a frame to be transmitted.
367  *-
368 struct __ie_xmit_buf {
369 	u_int16_t ie_xmit_flags;	// see below
370 	u_int16_t ie_xmit_next;		// 16-pointer to next desc
371 	caddr_t ie_xmit_buf;		// 24-pointer to the actual buffer
372 };
373  */
374 #define IE_XBD_SZ			8
375 #define IE_XBD_ADDR(base,i)		((base) + (i) * IE_XBD_SZ)
376 #define IE_XBD_FLAGS(b,i)		(IE_XBD_ADDR(b,i) + 0)
377 #define IE_XBD_NEXT(b,i)		(IE_XBD_ADDR(b,i) + 2)
378 #define IE_XBD_BUF(b,i)			(IE_XBD_ADDR(b,i) + 4)
379 
380 #define IE_TBD_EOL	0x8000		/* this TBD is the last one */
381 #define IE_TBD_CNTMASK	0x3fff		/* The rest of the `flags' word
382 					   is actually the length. */
383 
384 
385 /*
386  * Multicast setup command.
387  *-
388 struct __ie_mcast_cmd {
389 	struct __ie_cmd_common	com;	// common part
390 #define ie_mcast_status		com.ie_cmd_status
391 
392 	// size (in bytes) of multicast addresses
393 	u_short		ie_mcast_bytes;
394 	struct __ie_en_addr ie_mcast_addrs[IE_MAXMCAST + 1];// space for them
395 };
396  */
397 #define IE_CMD_MCAST_SZ			(IE_CMD_COMMON_SZ + 2 /* + XXX */)
398 #define IE_CMD_MCAST_BYTES(base)	((base) + IE_CMD_COMMON_SZ + 0)
399 #define IE_CMD_MCAST_MADDR(base)	((base) + IE_CMD_COMMON_SZ + 2)
400 
401 /*
402  * Time Domain Reflectometer command.
403  *-
404 struct __ie_tdr_cmd {
405 	struct __ie_cmd_common com;	// common part
406 #define ie_tdr_status com.ie_cmd_status
407 	u_short ie_tdr_time;		// error bits and time
408 };
409  */
410 #define IE_CMD_TDR_SZ		(IE_CMD_COMMON_SZ + 2)
411 #define IE_CMD_TDR_TIME(base)	((base) + IE_CMD_COMMON_SZ + 0)
412 
413 #define IE_TDR_SUCCESS	0x8000	/* TDR succeeded without error */
414 #define IE_TDR_XCVR	0x4000	/* detected a transceiver problem */
415 #define IE_TDR_OPEN	0x2000	/* detected an incorrect termination ("open") */
416 #define IE_TDR_SHORT	0x1000	/* TDR detected a short circuit */
417 #define IE_TDR_TIME	0x07ff	/* mask for reflection time */
418 
419 /*
420  * Initial Address Setup command
421  *-
422 struct __ie_iasetup_cmd {
423 	struct __ie_cmd_common com;
424 #define ie_iasetup_status com.ie_cmd_status
425 	struct __ie_en_addr ie_address;
426 };
427  */
428 #define IE_CMD_IAS_SZ		(IE_CMD_COMMON_SZ + 6)
429 #define IE_CMD_IAS_EADDR(base)	((base) + IE_CMD_COMMON_SZ + 0)
430 
431 /*
432  * Configuration command
433  *-
434 struct __ie_config_cmd {
435 	struct __ie_cmd_common com;	// common part
436 #define ie_config_status com.ie_cmd_status
437 
438 	u_int8_t ie_config_count;	// byte count (0x0c)
439 	u_int8_t ie_fifo;		// fifo (8)
440 	u_int8_t ie_save_bad;		// save bad frames (0x40)
441 	u_int8_t ie_addr_len;		// address length (0x2e) (AL-LOC == 1)
442 	u_int8_t ie_priority;		// priority and backoff (0x0)
443 	u_int8_t ie_ifs;		// inter-frame spacing (0x60)
444 	u_int8_t ie_slot_low;		// slot time, LSB (0x0)
445 	u_int8_t ie_slot_high;		// slot time, MSN, and retries (0xf2)
446 	u_int8_t ie_promisc;		// 1 if promiscuous, else 0
447 	u_int8_t ie_crs_cdt;		// CSMA/CD parameters (0x0)
448 	u_int8_t ie_min_len;		// min frame length (0x40)
449 	u_int8_t ie_junk;		// stuff for 82596 (0xff)
450 };
451  */
452 #define IE_CMD_CFG_SZ			(IE_CMD_COMMON_SZ + 12)
453 #define IE_CMD_CFG_CNT(base)		((base) + IE_CMD_COMMON_SZ + 0)
454 #define IE_CMD_CFG_FIFO(base)		((base) + IE_CMD_COMMON_SZ + 1)
455 #define IE_CMD_CFG_SAVEBAD(base)	((base) + IE_CMD_COMMON_SZ + 2)
456 #define IE_CMD_CFG_ADDRLEN(base)	((base) + IE_CMD_COMMON_SZ + 3)
457 #define IE_CMD_CFG_PRIORITY(base)	((base) + IE_CMD_COMMON_SZ + 4)
458 #define IE_CMD_CFG_IFS(base)		((base) + IE_CMD_COMMON_SZ + 5)
459 #define IE_CMD_CFG_SLOT_LOW(base)	((base) + IE_CMD_COMMON_SZ + 6)
460 #define IE_CMD_CFG_SLOT_HIGH(base)	((base) + IE_CMD_COMMON_SZ + 7)
461 #define IE_CMD_CFG_PROMISC(base)	((base) + IE_CMD_COMMON_SZ + 8)
462 #define IE_CMD_CFG_CRSCDT(base)		((base) + IE_CMD_COMMON_SZ + 9)
463 #define IE_CMD_CFG_MINLEN(base)		((base) + IE_CMD_COMMON_SZ + 10)
464 #define IE_CMD_CFG_JUNK(base)		((base) + IE_CMD_COMMON_SZ + 11)
465