1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 #define IEOB_NORSET 0x80
23 #define IEOB_ONAIR 0x40
24 #define IEOB_ATTEN 0x20
25 #define IEOB_IENAB 0x10
26 #define IEOB_XXXXX 0x08
27 #define IEOB_XCVRL2 0x04
28 #define IEOB_BUSERR 0x02
29 #define IEOB_INT 0x01
30
31
32 #define IE_OBIO 0xc0000
33 #define IE_IRQ 3
34
35
36
37
38 #define SCP_DEFAULT_ADDRESS 0xfffff4
39
40
41
42
43
44
45 struct scp_struct
46 {
47 unsigned short zero_dum0;
48 unsigned char sysbus;
49 unsigned char zero_dum1;
50 unsigned short zero_dum2;
51 unsigned short zero_dum3;
52 char *iscp;
53 };
54
55
56
57
58
59 struct iscp_struct
60 {
61 unsigned char busy;
62 unsigned char zero_dummy;
63 unsigned short scb_offset;
64 char *scb_base;
65 };
66
67
68
69
70 struct scb_struct
71 {
72 unsigned char rus;
73 unsigned char cus;
74 unsigned char cmd_ruc;
75 unsigned char cmd_cuc;
76 unsigned short cbl_offset;
77 unsigned short rfa_offset;
78 unsigned short crc_errs;
79 unsigned short aln_errs;
80 unsigned short rsc_errs;
81 unsigned short ovrn_errs;
82 };
83
84
85
86
87 #define RUC_MASK 0x0070
88 #define RUC_NOP 0x0000
89 #define RUC_START 0x0010
90 #define RUC_RESUME 0x0020
91 #define RUC_SUSPEND 0x0030
92 #define RUC_ABORT 0x0040
93
94 #define CUC_MASK 0x07
95 #define CUC_NOP 0x00
96 #define CUC_START 0x01
97 #define CUC_RESUME 0x02
98 #define CUC_SUSPEND 0x03
99 #define CUC_ABORT 0x04
100
101 #define ACK_MASK 0xf0
102 #define ACK_CX 0x80
103 #define ACK_FR 0x40
104 #define ACK_CNA 0x20
105 #define ACK_RNR 0x10
106
107
108
109
110 #define STAT_MASK 0xf0
111 #define STAT_CX 0x80
112 #define STAT_FR 0x40
113 #define STAT_CNA 0x20
114 #define STAT_RNR 0x10
115
116 #define CU_STATUS 0x7
117 #define CU_SUSPEND 0x1
118 #define CU_ACTIVE 0x2
119
120 #define RU_STATUS 0x70
121 #define RU_SUSPEND 0x10
122 #define RU_NOSPACE 0x20
123 #define RU_READY 0x40
124
125
126
127
128 struct rfd_struct
129 {
130 unsigned char stat_low;
131 unsigned char stat_high;
132 unsigned char rfd_sf;
133 unsigned char last;
134 unsigned short next;
135 unsigned short rbd_offset;
136 unsigned char dest[ETH_ALEN];
137 unsigned char source[ETH_ALEN];
138 unsigned short length;
139 unsigned short zero_dummy;
140 };
141
142 #define RFD_LAST 0x80
143 #define RFD_SUSP 0x40
144 #define RFD_COMPL 0x80
145 #define RFD_OK 0x20
146 #define RFD_BUSY 0x40
147 #define RFD_ERR_LEN 0x10
148 #define RFD_ERR_CRC 0x08
149 #define RFD_ERR_ALGN 0x04
150 #define RFD_ERR_RNR 0x02
151 #define RFD_ERR_OVR 0x01
152
153 #define RFD_ERR_FTS 0x0080
154 #define RFD_ERR_NEOP 0x0040
155 #define RFD_ERR_TRUN 0x0020
156 #define RFD_MATCHADD 0x0002
157 #define RFD_COLLDET 0x0001
158
159
160
161
162 struct rbd_struct
163 {
164 unsigned short status;
165 unsigned short next;
166 char *buffer;
167 unsigned short size;
168 unsigned short zero_dummy;
169 };
170
171 #define RBD_LAST 0x8000
172 #define RBD_USED 0x4000
173 #define RBD_MASK 0x3fff
174
175
176
177
178 #define STAT_COMPL 0x8000
179 #define STAT_BUSY 0x4000
180 #define STAT_OK 0x2000
181
182
183
184
185 #define CMD_NOP 0x0000
186 #define CMD_IASETUP 0x0001
187 #define CMD_CONFIGURE 0x0002
188 #define CMD_MCSETUP 0x0003
189 #define CMD_XMIT 0x0004
190 #define CMD_TDR 0x0005
191 #define CMD_DUMP 0x0006
192 #define CMD_DIAGNOSE 0x0007
193
194
195
196
197 #define CMD_LAST 0x8000
198 #define CMD_SUSPEND 0x4000
199 #define CMD_INT 0x2000
200
201
202
203
204 struct nop_cmd_struct
205 {
206 unsigned short cmd_status;
207 unsigned short cmd_cmd;
208 unsigned short cmd_link;
209 };
210
211
212
213
214 struct iasetup_cmd_struct
215 {
216 unsigned short cmd_status;
217 unsigned short cmd_cmd;
218 unsigned short cmd_link;
219 unsigned char iaddr[6];
220 };
221
222
223
224
225 struct configure_cmd_struct
226 {
227 unsigned short cmd_status;
228 unsigned short cmd_cmd;
229 unsigned short cmd_link;
230 unsigned char byte_cnt;
231 unsigned char fifo;
232 unsigned char sav_bf;
233 unsigned char adr_len;
234 unsigned char priority;
235 unsigned char ifs;
236 unsigned char time_low;
237 unsigned char time_high;
238 unsigned char promisc;
239 unsigned char carr_coll;
240 unsigned char fram_len;
241 unsigned char dummy;
242 };
243
244
245
246
247 struct mcsetup_cmd_struct
248 {
249 unsigned short cmd_status;
250 unsigned short cmd_cmd;
251 unsigned short cmd_link;
252 unsigned short mc_cnt;
253 unsigned char mc_list[0][6];
254 };
255
256
257
258
259 struct dump_cmd_struct
260 {
261 unsigned short cmd_status;
262 unsigned short cmd_cmd;
263 unsigned short cmd_link;
264 unsigned short dump_offset;
265 };
266
267
268
269
270 struct transmit_cmd_struct
271 {
272 unsigned short cmd_status;
273 unsigned short cmd_cmd;
274 unsigned short cmd_link;
275 unsigned short tbd_offset;
276 unsigned char dest[6];
277 unsigned short length;
278 };
279
280 #define TCMD_ERRMASK 0x0fa0
281 #define TCMD_MAXCOLLMASK 0x000f
282 #define TCMD_MAXCOLL 0x0020
283 #define TCMD_HEARTBEAT 0x0040
284 #define TCMD_DEFERRED 0x0080
285 #define TCMD_UNDERRUN 0x0100
286 #define TCMD_LOSTCTS 0x0200
287 #define TCMD_NOCARRIER 0x0400
288 #define TCMD_LATECOLL 0x0800
289
290 struct tdr_cmd_struct
291 {
292 unsigned short cmd_status;
293 unsigned short cmd_cmd;
294 unsigned short cmd_link;
295 unsigned short status;
296 };
297
298 #define TDR_LNK_OK 0x8000
299 #define TDR_XCVR_PRB 0x4000
300 #define TDR_ET_OPN 0x2000
301 #define TDR_ET_SRT 0x1000
302 #define TDR_TIMEMASK 0x07ff
303
304
305
306
307 struct tbd_struct
308 {
309 unsigned short size;
310 unsigned short next;
311 char *buffer;
312 };
313
314 #define TBD_LAST 0x8000
315
316
317
318