2 * Mach Operating System
3 * Copyright (c) 1991,1990,1989 Carnegie Mellon University
6 * Permission to use, copy, modify and distribute this software and its
7 * documentation is hereby granted, provided that both the copyright
8 * notice and this permission notice appear in all copies of the
9 * software, derivative works or modified versions, and any portions
10 * thereof, and that both notices appear in supporting documentation.
12 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
13 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
16 * Carnegie Mellon requests users of this software to return to
18 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
19 * School of Computer Science
20 * Carnegie Mellon University
21 * Pittsburgh PA 15213-3890
23 * any improvements or extensions that they make and grant Carnegie Mellon
24 * the rights to redistribute these changes.
26 * $FreeBSD: src/sys/i386/isa/ic/if_wl_i82586.h,v 1.1.10.1 2000/08/03 01:01:25 peter Exp $
27 * $DragonFly: src/sys/dev/netif/wl/if_wl_i82586.h,v 1.2 2003/06/17 04:28:37 dillon Exp $
30 Copyright 1988, 1989 by Olivetti Advanced Technology Center, Inc.,
31 Cupertino, California.
35 Permission to use, copy, modify, and distribute this software and
36 its documentation for any purpose and without fee is hereby
37 granted, provided that the above copyright notice appears in all
38 copies and that both the copyright notice and this permission notice
39 appear in supporting documentation, and that the name of Olivetti
40 not be used in advertising or publicity pertaining to distribution
41 of the software without specific, written prior permission.
43 OLIVETTI DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
44 INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
45 IN NO EVENT SHALL OLIVETTI BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
46 CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
47 LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
48 NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUR OF OR IN CONNECTION
49 WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
53 * Defines for managing the status word of the 82586 cpu. For details see
54 * the Intel LAN Component User's Manual starting at p. 2-14.
58 #define SCB_SW_INT 0xf000
59 #define SCB_SW_CX 0x8000 /* CU finished w/ int. bit set */
60 #define SCB_SW_FR 0x4000 /* RU finished receiving a frame */
61 #define SCB_SW_CNA 0x2000 /* CU left active state */
62 #define SCB_SW_RNR 0x1000 /* RU left ready state */
65 * Defines for managing the Command Unit Status portion of the 82586
66 * System Control Block.
70 #define SCB_CUS_IDLE 0x0000
71 #define SCB_CUS_SUSPND 0x0100
72 #define SCB_CUS_ACTV 0x0200
75 * Defines for managing the Receive Unit Status portion of the System
80 #define SCB_RUS_IDLE 0x0000
81 #define SCB_RUS_SUSPND 0x0010
82 #define SCB_RUS_NORESRC 0x0020
83 #define SCB_RUS_READY 0x0040
86 * Defines that manage portions of the Command Word in the System Control
87 * Block of the 82586. Below are the Interrupt Acknowledge Bits and their
92 #define SCB_ACK_CX 0x8000
93 #define SCB_ACK_FR 0x4000
94 #define SCB_ACK_CNA 0x2000
95 #define SCB_ACK_RNR 0x1000
98 * Defines for managing the Command Unit Control word, and the Receive
99 * Unit Control word. The software RESET bit is also defined.
103 #define SCB_CU_STRT 0x0100
104 #define SCB_CU_RSUM 0x0200
105 #define SCB_CU_SUSPND 0x0300
106 #define SCB_CU_ABRT 0x0400
108 #define SCB_RESET 0x0080
110 #define SCB_RU_STRT 0x0010
111 #define SCB_RU_RSUM 0x0020
112 #define SCB_RU_SUSPND 0x0030
113 #define SCB_RU_ABRT 0x0040
117 * The following define Action Commands for the 82586 chip.
122 #define AC_IASETUP 0x01
123 #define AC_CONFIGURE 0x02
124 #define AC_MCSETUP 0x03
125 #define AC_TRANSMIT 0x04
128 #define AC_DIAGNOSE 0x07
132 * Defines for General Format for Action Commands, both Status Words, and
137 #define AC_SW_C 0x8000
138 #define AC_SW_B 0x4000
139 #define AC_SW_OK 0x2000
140 #define AC_SW_A 0x1000
141 #define TC_CARRIER 0x0400
142 #define TC_CLS 0x0200
143 #define TC_DMA 0x0100
144 #define TC_DEFER 0x0080
145 #define TC_SQE 0x0040
146 #define TC_COLLISION 0x0020
147 #define AC_CW_EL 0x8000
148 #define AC_CW_S 0x4000
149 #define AC_CW_I 0x2000
152 * Specific defines for the transmit action command.
156 #define TBD_SW_EOF 0x8000
157 #define TBD_SW_COUNT 0x3fff
160 * Specific defines for the receive frame actions.
164 #define RBD_SW_EOF 0x8000
165 #define RBD_SW_COUNT 0x3fff
167 #define RFD_DONE 0x8000
168 #define RFD_BUSY 0x4000
169 #define RFD_OK 0x2000
170 #define RFD_CRC 0x0800
171 #define RFD_ALN 0x0400
172 #define RFD_RSC 0x0200
173 #define RFD_DMA 0x0100
174 #define RFD_SHORT 0x0080
175 #define RFD_EOF 0x0040
176 #define RFD_EL 0x8000
177 #define RFD_SUSP 0x4000
179 * 82586 chip specific structure definitions. For details, see the Intel
180 * LAN Components manual.
187 u_short scp_unused[2];
189 u_short scp_iscp_base;
195 u_short iscp_scb_offset;
197 u_short iscp_scb_base;
204 u_short scb_cbl_offset;
205 u_short scb_rfa_offset;
209 u_short scb_ovrnerrs;
221 u_short fifolim_bytecnt;
222 u_short addrlen_mode;
223 u_short linprio_interframe;
226 u_short min_frame_len;
233 u_short ac_link_offset;
236 configure_t configure;
244 u_short next_tbd_offset;
255 u_char destination[6];
263 u_short next_rbd_offset;