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