i2o.h revision 1.2 1 1.2 ad /* $NetBSD: i2o.h,v 1.2 2000/12/03 13:17:03 ad Exp $ */
2 1.1 ad
3 1.1 ad /*-
4 1.1 ad * Copyright (c) 2000 The NetBSD Foundation, Inc.
5 1.1 ad * All rights reserved.
6 1.1 ad *
7 1.1 ad * This code is derived from software contributed to The NetBSD Foundation
8 1.1 ad * by Andrew Doran.
9 1.1 ad *
10 1.1 ad * Redistribution and use in source and binary forms, with or without
11 1.1 ad * modification, are permitted provided that the following conditions
12 1.1 ad * are met:
13 1.1 ad * 1. Redistributions of source code must retain the above copyright
14 1.1 ad * notice, this list of conditions and the following disclaimer.
15 1.1 ad * 2. Redistributions in binary form must reproduce the above copyright
16 1.1 ad * notice, this list of conditions and the following disclaimer in the
17 1.1 ad * documentation and/or other materials provided with the distribution.
18 1.1 ad * 3. All advertising materials mentioning features or use of this software
19 1.1 ad * must display the following acknowledgement:
20 1.1 ad * This product includes software developed by the NetBSD
21 1.1 ad * Foundation, Inc. and its contributors.
22 1.1 ad * 4. Neither the name of The NetBSD Foundation nor the names of its
23 1.1 ad * contributors may be used to endorse or promote products derived
24 1.1 ad * from this software without specific prior written permission.
25 1.1 ad *
26 1.1 ad * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27 1.1 ad * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28 1.1 ad * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 1.1 ad * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30 1.1 ad * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 1.1 ad * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 1.1 ad * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 1.1 ad * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 1.1 ad * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 1.1 ad * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 1.1 ad * POSSIBILITY OF SUCH DAMAGE.
37 1.1 ad */
38 1.1 ad
39 1.1 ad /*
40 1.1 ad * I2O structures and constants, as presented by the I2O specification
41 1.1 ad * revision 1.5 (obtainable from http://www.i2osig.org/). Currently, only
42 1.1 ad * what's useful to us is defined in this file.
43 1.1 ad */
44 1.1 ad
45 1.1 ad #ifndef _I2O_I2O_H_
46 1.1 ad #define _I2O_I2O_H_
47 1.1 ad
48 1.1 ad /*
49 1.1 ad * ================= Miscellenous definitions =================
50 1.1 ad */
51 1.1 ad
52 1.2 ad /* Organisation IDs */
53 1.2 ad #define I2O_ORG_DPT 0x001b
54 1.2 ad #define I2O_ORG_AMI 0x1000
55 1.2 ad
56 1.1 ad /* Macros to assist in building message headers */
57 1.1 ad #define I2O_MSGFLAGS(s) (I2O_VERSION_11 | (sizeof(struct s) << 14))
58 1.1 ad #define I2O_MSGFUNC(t, f) ((t) | (I2O_TID_HOST << 12) | ((f) << 24))
59 1.1 ad
60 1.1 ad /* Common message function codes with no payload or an undefined payload */
61 1.1 ad #define I2O_UTIL_NOP 0x00
62 1.1 ad #define I2O_EXEC_IOP_CLEAR 0xbe
63 1.1 ad #define I2O_EXEC_SYS_QUIESCE 0xc3
64 1.1 ad #define I2O_EXEC_SYS_ENABLE 0xd1
65 1.1 ad #define I2O_PRIVATE_MESSAGE 0xff
66 1.1 ad
67 1.1 ad /* Device class codes */
68 1.1 ad #define I2O_CLASS_EXECUTIVE 0x00
69 1.1 ad #define I2O_CLASS_DDM 0x01
70 1.1 ad #define I2O_CLASS_RANDOM_BLOCK_STORAGE 0x10
71 1.1 ad #define I2O_CLASS_SEQUENTIAL_STORAGE 0x11
72 1.1 ad #define I2O_CLASS_LAN 0x20
73 1.1 ad #define I2O_CLASS_WAN 0x30
74 1.1 ad #define I2O_CLASS_FIBRE_CHANNEL_PORT 0x40
75 1.1 ad #define I2O_CLASS_FIBRE_CHANNEL_PERIPHERAL 0x41
76 1.1 ad #define I2O_CLASS_SCSI_PERIPHERAL 0x51
77 1.1 ad #define I2O_CLASS_ATE_PORT 0x60
78 1.1 ad #define I2O_CLASS_ATE_PERIPHERAL 0x61
79 1.1 ad #define I2O_CLASS_FLOPPY_CONTROLLER 0x70
80 1.1 ad #define I2O_CLASS_FLOPPY_DEVICE 0x71
81 1.1 ad #define I2O_CLASS_BUS_ADAPTER_PORT 0x80
82 1.1 ad
83 1.1 ad #define I2O_CLASS_ANY 0xffffffff
84 1.1 ad
85 1.1 ad /* Reply status codes */
86 1.1 ad #define I2O_STATUS_SUCCESS 0x00
87 1.1 ad #define I2O_STATUS_ABORT_DIRTY 0x01
88 1.1 ad #define I2O_STATUS_ABORT_NO_DATA_XFER 0x02
89 1.1 ad #define I2O_STATUS_ABORT_PARTIAL_XFER 0x03
90 1.1 ad #define I2O_STATUS_ERROR_DIRTY 0x04
91 1.1 ad #define I2O_STATUS_ERROR_NO_DATA_XFER 0x05
92 1.1 ad #define I2O_STATUS_ERROR_PARTIAL_XFER 0x06
93 1.1 ad #define I2O_STATUS_PROCESS_ABORT_DIRTY 0x08
94 1.1 ad #define I2O_STATUS_PROCESS_ABORT_NO_DATA_XFER 0x09
95 1.1 ad #define I2O_STATUS_PROCESS_ABORT_PARTIAL_XFER 0x0a
96 1.1 ad #define I2O_STATUS_TRANSACTION_ERROR 0x0b
97 1.1 ad #define I2O_STATUS_PROGRESS_REPORT 0x80
98 1.1 ad
99 1.1 ad /* Message versions */
100 1.1 ad #define I2O_VERSION_10 0x00
101 1.1 ad #define I2O_VERSION_11 0x01
102 1.1 ad #define I2O_VERSION_20 0x02
103 1.1 ad
104 1.1 ad /* Commonly used TIDs */
105 1.1 ad #define I2O_TID_IOP 0
106 1.1 ad #define I2O_TID_HOST 1
107 1.1 ad #define I2O_TID_NONE 4095
108 1.1 ad
109 1.1 ad /* SGL flags. This list covers only a fraction of the possibilities. */
110 1.2 ad #define I2O_SGL_IGNORE 0x00000000
111 1.2 ad #define I2O_SGL_SIMPLE 0x10000000
112 1.2 ad
113 1.2 ad #define I2O_SGL_BC_32BIT 0x01000000
114 1.2 ad #define I2O_SGL_BC_64BIT 0x02000000
115 1.2 ad #define I2O_SGL_BC_96BIT 0x03000000
116 1.1 ad #define I2O_SGL_DATA_OUT 0x04000000
117 1.1 ad #define I2O_SGL_END_BUFFER 0x40000000
118 1.1 ad #define I2O_SGL_END 0x80000000
119 1.1 ad
120 1.1 ad /* Serial number formats */
121 1.1 ad #define I2O_SNFMT_UNKNOWN 0
122 1.1 ad #define I2O_SNFMT_BINARY 1
123 1.1 ad #define I2O_SNFMT_ASCII 2
124 1.1 ad #define I2O_SNFMT_UNICODE 3
125 1.1 ad #define I2O_SNFMT_LAN_MAC 4
126 1.1 ad #define I2O_SNFMT_WAN_MAC 5
127 1.1 ad
128 1.1 ad /*
129 1.1 ad * ================= Common structures =================
130 1.1 ad */
131 1.1 ad
132 1.1 ad /*
133 1.1 ad * Standard I2O message frame. All message frames begin with this.
134 1.1 ad *
135 1.1 ad * Bits Field Meaning
136 1.1 ad * ---- ------------- ----------------------------------------------------
137 1.1 ad * 0-2 msgflags Message header version. Must be 001 (little endian).
138 1.1 ad * 3 msgflags Reserved.
139 1.1 ad * 4-7 msgflags Offset to SGLs expressed as # of 32-bit words.
140 1.1 ad * 8-15 msgflags Control flags.
141 1.1 ad * 16-31 msgflags Message frame size expressed as # of 32-bit words.
142 1.1 ad * 0-11 msgfunc TID of target.
143 1.1 ad * 12-23 msgfunc TID of initiator.
144 1.1 ad * 24-31 msgfunc Function (i.e., type of message).
145 1.1 ad */
146 1.1 ad struct i2o_msg {
147 1.1 ad u_int32_t msgflags;
148 1.1 ad u_int32_t msgfunc;
149 1.1 ad u_int32_t msgictx; /* Initiator context */
150 1.1 ad u_int32_t msgtctx; /* Transaction context */
151 1.1 ad
152 1.1 ad /* Message payload */
153 1.1 ad
154 1.1 ad } __attribute__ ((__packed__));
155 1.1 ad
156 1.1 ad #define I2O_MSGFLAGS_STATICMF 0x0100
157 1.1 ad #define I2O_MSGFLAGS_64BIT 0x0200
158 1.1 ad #define I2O_MSGFLAGS_MULTI 0x1000
159 1.1 ad #define I2O_MSGFLAGS_CANT_PROCESS 0x2000
160 1.1 ad #define I2O_MSGFLAGS_LAST_REPLY 0x4000
161 1.1 ad #define I2O_MSGFLAGS_REPLY 0x8000
162 1.1 ad
163 1.1 ad /*
164 1.1 ad * Standard reply frame. msgflags, msgfunc, msgictx and msgtctx have the
165 1.1 ad * same meaning as in `struct i2o_msg'.
166 1.1 ad */
167 1.1 ad struct i2o_reply {
168 1.1 ad u_int32_t msgflags;
169 1.1 ad u_int32_t msgfunc;
170 1.1 ad u_int32_t msgictx;
171 1.1 ad u_int32_t msgtctx;
172 1.2 ad u_int16_t detail; /* Detailed status code */
173 1.1 ad u_int8_t reserved;
174 1.2 ad u_int8_t reqstatus; /* Request status code */
175 1.1 ad
176 1.1 ad /* Reply payload */
177 1.1 ad
178 1.1 ad } __attribute__ ((__packed__));
179 1.1 ad
180 1.1 ad /*
181 1.1 ad * Hardware resource table. Not documented here.
182 1.1 ad */
183 1.1 ad struct i2o_hrt_entry {
184 1.1 ad u_int32_t adapterid;
185 1.2 ad u_int16_t controllingtid;
186 1.2 ad u_int8_t busnumber;
187 1.2 ad u_int8_t bustype;
188 1.1 ad u_int8_t businfo[8];
189 1.1 ad } __attribute__ ((__packed__));
190 1.1 ad
191 1.1 ad struct i2o_hrt {
192 1.2 ad u_int16_t numentries;
193 1.1 ad u_int8_t entrysize;
194 1.1 ad u_int8_t hrtversion;
195 1.1 ad u_int32_t changeindicator;
196 1.1 ad struct i2o_hrt_entry entry[1];
197 1.1 ad } __attribute__ ((__packed__));
198 1.1 ad
199 1.1 ad /*
200 1.1 ad * Logical configuration table entry. Bitfields are broken down as follows:
201 1.1 ad *
202 1.1 ad * Bits Field Meaning
203 1.1 ad * ----- -------------- ---------------------------------------------------
204 1.1 ad * 0-11 classid Class ID.
205 1.1 ad * 12-15 classid Class version.
206 1.1 ad * 0-11 usertid User TID
207 1.1 ad * 12-23 usertid Parent TID.
208 1.1 ad * 24-31 usertid BIOS info.
209 1.1 ad */
210 1.1 ad struct i2o_lct_entry {
211 1.1 ad u_int16_t entrysize;
212 1.1 ad u_int16_t localtid; /* Bits 0-12 only */
213 1.1 ad u_int32_t changeindicator;
214 1.1 ad u_int32_t deviceflags;
215 1.1 ad u_int16_t classid;
216 1.1 ad u_int16_t orgid;
217 1.1 ad u_int32_t subclassinfo;
218 1.1 ad u_int32_t usertid;
219 1.1 ad u_int8_t identitytag[8];
220 1.1 ad u_int32_t eventcaps;
221 1.1 ad } __attribute__ ((__packed__));
222 1.1 ad
223 1.1 ad /*
224 1.1 ad * Logical configuration table header.
225 1.1 ad */
226 1.1 ad struct i2o_lct {
227 1.1 ad u_int16_t tablesize;
228 1.2 ad u_int16_t flags;
229 1.1 ad u_int32_t iopflags;
230 1.1 ad u_int32_t changeindicator;
231 1.1 ad struct i2o_lct_entry entry[1];
232 1.1 ad } __attribute__ ((__packed__));
233 1.1 ad
234 1.1 ad /*
235 1.2 ad * IOP system table. Bitfields are broken down as follows:
236 1.1 ad *
237 1.1 ad * Bits Field Meaning
238 1.1 ad * ----- -------------- ---------------------------------------------------
239 1.1 ad * 0-11 iopid IOP ID.
240 1.1 ad * 12-31 iopid Reserved.
241 1.1 ad * 0-11 segnumber Segment number.
242 1.1 ad * 12-15 segnumber I2O version.
243 1.1 ad * 16-23 segnumber IOP state.
244 1.1 ad * 24-31 segnumber Messenger type.
245 1.1 ad */
246 1.2 ad struct i2o_systab_entry {
247 1.1 ad u_int16_t orgid;
248 1.1 ad u_int16_t reserved0;
249 1.1 ad u_int32_t iopid;
250 1.2 ad u_int32_t segnumber;
251 1.1 ad u_int16_t inboundmsgframesize;
252 1.1 ad u_int16_t reserved1;
253 1.1 ad u_int32_t lastchanged;
254 1.1 ad u_int32_t iopcaps;
255 1.1 ad u_int32_t inboundmsgportaddresslow;
256 1.1 ad u_int32_t inboundmsgportaddresshigh;
257 1.1 ad } __attribute__ ((__packed__));
258 1.1 ad
259 1.2 ad struct i2o_systab {
260 1.2 ad u_int8_t numentries;
261 1.2 ad u_int8_t version;
262 1.2 ad u_int16_t reserved0;
263 1.2 ad u_int32_t changeindicator;
264 1.2 ad u_int32_t reserved1[2];
265 1.2 ad struct i2o_systab_entry entry[1];
266 1.2 ad } __attribute__ ((__packed__));
267 1.2 ad
268 1.1 ad /*
269 1.1 ad * IOP status record. Bitfields are broken down as follows:
270 1.1 ad *
271 1.1 ad * Bits Field Meaning
272 1.1 ad * ----- -------------- ---------------------------------------------------
273 1.1 ad * 0-11 iopid IOP ID.
274 1.1 ad * 12-15 iopid Reserved.
275 1.1 ad * 16-31 iopid Host unit ID.
276 1.1 ad * 0-11 segnumber Segment number.
277 1.1 ad * 12-15 segnumber I2O version.
278 1.1 ad * 16-23 segnumber IOP state.
279 1.1 ad * 24-31 segnumber Messenger type.
280 1.1 ad */
281 1.1 ad struct i2o_status {
282 1.1 ad u_int16_t orgid;
283 1.1 ad u_int16_t reserved0;
284 1.2 ad u_int32_t iopid;
285 1.2 ad u_int32_t segnumber;
286 1.1 ad u_int16_t inboundmframesize;
287 1.1 ad u_int8_t initcode;
288 1.1 ad u_int8_t reserved1;
289 1.1 ad u_int32_t maxinboundmframes;
290 1.1 ad u_int32_t currentinboundmframes;
291 1.1 ad u_int32_t maxoutboundmframes;
292 1.1 ad u_int8_t productid[24];
293 1.1 ad u_int32_t expectedlctsize;
294 1.1 ad u_int32_t iopcaps;
295 1.1 ad u_int32_t desiredprivmemsize;
296 1.1 ad u_int32_t currentprivmemsize;
297 1.1 ad u_int32_t currentprivmembase;
298 1.1 ad u_int32_t desiredpriviosize;
299 1.1 ad u_int32_t currentpriviosize;
300 1.1 ad u_int32_t currentpriviobase;
301 1.1 ad u_int8_t reserved2[3];
302 1.1 ad u_int8_t syncbyte;
303 1.1 ad } __attribute__ ((__packed__));
304 1.1 ad
305 1.1 ad #define I2O_IOP_STATE_INITIALIZING 0x01
306 1.1 ad #define I2O_IOP_STATE_RESET 0x02
307 1.1 ad #define I2O_IOP_STATE_HOLD 0x04
308 1.1 ad #define I2O_IOP_STATE_READY 0x05
309 1.1 ad #define I2O_IOP_STATE_OPERATIONAL 0x08
310 1.1 ad #define I2O_IOP_STATE_FAILED 0x10
311 1.1 ad #define I2O_IOP_STATE_FAULTED 0x11
312 1.1 ad
313 1.1 ad /*
314 1.1 ad * ================= Executive class messages =================
315 1.1 ad */
316 1.1 ad
317 1.1 ad #define I2O_EXEC_STATUS_GET 0xa0
318 1.1 ad struct i2o_exec_status_get {
319 1.1 ad u_int32_t msgflags;
320 1.1 ad u_int32_t msgfunc;
321 1.1 ad u_int32_t reserved[4];
322 1.1 ad u_int32_t addrlow;
323 1.1 ad u_int32_t addrhigh;
324 1.1 ad u_int32_t length;
325 1.1 ad } __attribute__ ((__packed__));
326 1.1 ad
327 1.1 ad #define I2O_EXEC_OUTBOUND_INIT 0xa1
328 1.1 ad struct i2o_exec_outbound_init {
329 1.1 ad u_int32_t msgflags;
330 1.1 ad u_int32_t msgfunc;
331 1.1 ad u_int32_t msgictx;
332 1.1 ad u_int32_t msgtctx;
333 1.1 ad u_int32_t pagesize;
334 1.1 ad u_int32_t flags; /* init code, outbound msg size */
335 1.1 ad } __attribute__ ((__packed__));
336 1.1 ad
337 1.1 ad #define I2O_EXEC_OUTBOUND_INIT_IN_PROGRESS 1
338 1.1 ad #define I2O_EXEC_OUTBOUND_INIT_REJECTED 2
339 1.1 ad #define I2O_EXEC_OUTBOUND_INIT_FAILED 3
340 1.1 ad #define I2O_EXEC_OUTBOUND_INIT_COMPLETE 4
341 1.1 ad
342 1.1 ad #define I2O_EXEC_LCT_NOTIFY 0xa2
343 1.1 ad struct i2o_exec_lct_notify {
344 1.1 ad u_int32_t msgflags;
345 1.1 ad u_int32_t msgfunc;
346 1.1 ad u_int32_t msgictx;
347 1.1 ad u_int32_t msgtctx;
348 1.1 ad u_int32_t classid;
349 1.1 ad u_int32_t changeindicator;
350 1.1 ad } __attribute__ ((__packed__));
351 1.1 ad
352 1.1 ad #define I2O_EXEC_SYS_TAB_SET 0xa3
353 1.1 ad struct i2o_exec_sys_tab_set {
354 1.1 ad u_int32_t msgflags;
355 1.1 ad u_int32_t msgfunc;
356 1.1 ad u_int32_t msgictx;
357 1.1 ad u_int32_t msgtctx;
358 1.1 ad u_int32_t iopid;
359 1.1 ad u_int32_t segnumber;
360 1.1 ad } __attribute__ ((__packed__));
361 1.1 ad
362 1.1 ad #define I2O_EXEC_HRT_GET 0xa8
363 1.1 ad struct i2o_exec_hrt_get {
364 1.1 ad u_int32_t msgflags;
365 1.1 ad u_int32_t msgfunc;
366 1.1 ad u_int32_t msgictx;
367 1.1 ad u_int32_t msgtctx;
368 1.1 ad } __attribute__ ((__packed__));
369 1.1 ad
370 1.1 ad #define I2O_EXEC_IOP_RESET 0xbd
371 1.1 ad struct i2o_exec_iop_reset {
372 1.1 ad u_int32_t msgflags;
373 1.1 ad u_int32_t msgfunc;
374 1.1 ad u_int32_t reserved[4];
375 1.1 ad u_int32_t statuslow;
376 1.1 ad u_int32_t statushigh;
377 1.1 ad } __attribute__ ((__packed__));
378 1.1 ad
379 1.1 ad #define I2O_RESET_IN_PROGRESS 0x01
380 1.1 ad #define I2O_RESET_REJECTED 0x02
381 1.1 ad
382 1.1 ad /*
383 1.2 ad * ================= Executive class parameter groups =================
384 1.2 ad */
385 1.2 ad
386 1.2 ad #define I2O_PARAM_EXEC_LCT_SCALAR 0x0101
387 1.2 ad #define I2O_PARAM_EXEC_LCT_TABLE 0x0102
388 1.2 ad
389 1.2 ad /*
390 1.1 ad * ================= HBA class messages =================
391 1.1 ad */
392 1.1 ad
393 1.1 ad #define I2O_HBA_BUS_SCAN 0x89
394 1.1 ad struct i2o_hba_bus_scan {
395 1.1 ad u_int32_t msgflags;
396 1.1 ad u_int32_t msgfunc;
397 1.1 ad u_int32_t msgictx;
398 1.1 ad u_int32_t msgtctx;
399 1.2 ad } __attribute__ ((__packed__));
400 1.1 ad
401 1.1 ad /*
402 1.1 ad * ================= HBA class parameter groups =================
403 1.1 ad */
404 1.1 ad
405 1.1 ad #define I2O_PARAM_HBA_CTLR_INFO 0x0000
406 1.1 ad struct i2o_param_hba_ctlr_info {
407 1.1 ad u_int8_t bustype;
408 1.1 ad u_int8_t busstate;
409 1.1 ad u_int16_t reserved;
410 1.1 ad u_int8_t busname[12];
411 1.1 ad } __attribute__ ((__packed__));
412 1.1 ad
413 1.1 ad #define I2O_HBA_BUS_GENERIC 0x00
414 1.1 ad #define I2O_HBA_BUS_SCSI 0x01
415 1.1 ad #define I2O_HBA_BUS_FCA 0x10
416 1.1 ad
417 1.1 ad #define I2O_PARAM_HBA_SCSI_PORT_INFO 0x0001
418 1.1 ad struct i2o_param_hba_scsi_port_info {
419 1.1 ad u_int8_t physicalif;
420 1.1 ad u_int8_t electricalif;
421 1.1 ad u_int8_t isosynchonrous;
422 1.1 ad u_int8_t connectortype;
423 1.1 ad u_int8_t connectorgender;
424 1.1 ad u_int8_t reserved1;
425 1.1 ad u_int16_t reserved2;
426 1.1 ad u_int32_t maxnumberofdevices;
427 1.1 ad } __attribute__ ((__packed__));
428 1.1 ad
429 1.1 ad #define I2O_PARAM_HBA_SCSI_CTLR_INFO 0x0200
430 1.1 ad struct i2o_param_hba_scsi_ctlr_info {
431 1.1 ad u_int8_t scsitype;
432 1.1 ad u_int8_t protection;
433 1.1 ad u_int8_t settings;
434 1.1 ad u_int8_t reserved;
435 1.1 ad u_int32_t initiatorid;
436 1.1 ad u_int64_t scanlun0only;
437 1.1 ad u_int16_t disabledevice;
438 1.1 ad u_int8_t maxoffset;
439 1.1 ad u_int8_t maxdatawidth;
440 1.1 ad u_int64_t maxsyncrate;
441 1.1 ad } __attribute__ ((__packed__));
442 1.1 ad
443 1.1 ad /*
444 1.1 ad * ================= Utility messages =================
445 1.1 ad */
446 1.1 ad
447 1.2 ad #define I2O_UTIL_ABORT 0x01
448 1.2 ad struct i2o_util_abort {
449 1.2 ad u_int32_t msgflags;
450 1.2 ad u_int32_t msgfunc;
451 1.2 ad u_int32_t msgictx;
452 1.2 ad u_int32_t msgtctx;
453 1.2 ad u_int32_t flags; /* abort type and function type */
454 1.2 ad u_int32_t tctxabort;
455 1.2 ad } __attribute__ ((__packed__));
456 1.2 ad
457 1.2 ad #define I2O_UTIL_ABORT_EXACT 0x00000000
458 1.2 ad #define I2O_UTIL_ABORT_FUNCTION 0x00010000
459 1.2 ad #define I2O_UTIL_ABORT_TRANSACTION 0x00020000
460 1.2 ad #define I2O_UTIL_ABORT_WILD 0x00030000
461 1.2 ad
462 1.2 ad #define I2O_UTIL_ABORT_CLEAN 0x00040000
463 1.2 ad
464 1.2 ad struct i2o_util_abort_reply {
465 1.2 ad u_int32_t msgflags;
466 1.2 ad u_int32_t msgfunc;
467 1.2 ad u_int32_t msgictx;
468 1.2 ad u_int32_t msgtctx;
469 1.2 ad u_int32_t count;
470 1.2 ad } __attribute__ ((__packed__));
471 1.2 ad
472 1.2 ad #define I2O_UTIL_PARAMS_SET 0x05
473 1.1 ad #define I2O_UTIL_PARAMS_GET 0x06
474 1.2 ad struct i2o_util_params_op {
475 1.1 ad u_int32_t msgflags;
476 1.1 ad u_int32_t msgfunc;
477 1.1 ad u_int32_t msgictx;
478 1.1 ad u_int32_t msgtctx;
479 1.1 ad u_int32_t flags;
480 1.1 ad } __attribute__ ((__packed__));
481 1.1 ad
482 1.1 ad #define I2O_PARAMS_OP_FIELD_GET 1
483 1.1 ad #define I2O_PARAMS_OP_LIST_GET 2
484 1.1 ad #define I2O_PARAMS_OP_MORE_GET 3
485 1.1 ad #define I2O_PARAMS_OP_SIZE_GET 4
486 1.1 ad #define I2O_PARAMS_OP_TABLE_GET 5
487 1.1 ad #define I2O_PARAMS_OP_FIELD_SET 6
488 1.1 ad #define I2O_PARAMS_OP_LIST_SET 7
489 1.1 ad #define I2O_PARAMS_OP_ROW_ADD 8
490 1.1 ad #define I2O_PARAMS_OP_ROW_DELETE 9
491 1.1 ad #define I2O_PARAMS_OP_TABLE_CLEAR 10
492 1.1 ad
493 1.1 ad struct i2o_param_op_list_header {
494 1.1 ad u_int16_t count;
495 1.1 ad u_int16_t reserved;
496 1.1 ad } __attribute__ ((__packed__));
497 1.1 ad
498 1.1 ad struct i2o_param_op_all_template {
499 1.1 ad u_int16_t operation;
500 1.1 ad u_int16_t group;
501 1.1 ad u_int16_t fieldcount;
502 1.2 ad u_int16_t fields[1];
503 1.1 ad } __attribute__ ((__packed__));
504 1.1 ad
505 1.1 ad struct i2o_param_op_results {
506 1.1 ad u_int16_t count;
507 1.1 ad u_int16_t reserved;
508 1.1 ad } __attribute__ ((__packed__));
509 1.1 ad
510 1.1 ad struct i2o_param_read_results {
511 1.1 ad u_int16_t blocksize;
512 1.1 ad u_int8_t blockstatus;
513 1.1 ad u_int8_t errorinfosize;
514 1.1 ad } __attribute__ ((__packed__));
515 1.1 ad
516 1.2 ad struct i2o_param_table_results {
517 1.2 ad u_int16_t blocksize;
518 1.2 ad u_int8_t blockstatus;
519 1.2 ad u_int8_t errorinfosize;
520 1.2 ad u_int16_t rowcount;
521 1.2 ad u_int16_t moreflag;
522 1.2 ad } __attribute__ ((__packed__));
523 1.2 ad
524 1.1 ad #define I2O_UTIL_CLAIM 0x09
525 1.1 ad struct i2o_util_claim {
526 1.1 ad u_int32_t msgflags;
527 1.1 ad u_int32_t msgfunc;
528 1.1 ad u_int32_t msgictx;
529 1.1 ad u_int32_t msgtctx;
530 1.1 ad u_int32_t flags;
531 1.1 ad } __attribute__ ((__packed__));
532 1.1 ad
533 1.1 ad #define I2O_UTIL_CLAIM_RESET_SENSITIVE 0x00000002
534 1.1 ad #define I2O_UTIL_CLAIM_STATE_SENSITIVE 0x00000004
535 1.1 ad #define I2O_UTIL_CLAIM_CAPACITY_SENSITIVE 0x00000008
536 1.1 ad #define I2O_UTIL_CLAIM_NO_PEER_SERVICE 0x00000010
537 1.1 ad #define I2O_UTIL_CLAIM_NO_MANAGEMENT_SERVICE 0x00000020
538 1.2 ad
539 1.1 ad #define I2O_UTIL_CLAIM_PRIMARY_USER 0x01000000
540 1.1 ad #define I2O_UTIL_CLAIM_AUTHORIZED_USER 0x02000000
541 1.1 ad #define I2O_UTIL_CLAIM_SECONDARY_USER 0x03000000
542 1.1 ad #define I2O_UTIL_CLAIM_MANAGEMENT_USER 0x04000000
543 1.1 ad
544 1.2 ad #define I2O_UTIL_CLAIM_RELEASE 0x0b
545 1.2 ad struct i2o_util_claim_release {
546 1.2 ad u_int32_t msgflags;
547 1.2 ad u_int32_t msgfunc;
548 1.2 ad u_int32_t msgictx;
549 1.2 ad u_int32_t msgtctx;
550 1.2 ad u_int32_t flags; /* User flags as per I2O_UTIL_CLAIM */
551 1.2 ad } __attribute__ ((__packed__));
552 1.2 ad
553 1.2 ad #define I2O_UTIL_CLAIM_RELEASE_CONDITIONAL 0x00000001
554 1.2 ad
555 1.2 ad #define I2O_UTIL_CONFIG_DIALOG 0x10
556 1.2 ad struct i2o_util_config_dialog {
557 1.2 ad u_int32_t msgflags;
558 1.2 ad u_int32_t msgfunc;
559 1.2 ad u_int32_t msgictx;
560 1.2 ad u_int32_t msgtctx;
561 1.2 ad u_int32_t pageno;
562 1.2 ad } __attribute__ ((__packed__));
563 1.2 ad
564 1.2 ad #define I2O_UTIL_EVENT_REGISTER 0x13
565 1.2 ad struct i2o_util_event_register {
566 1.2 ad u_int32_t msgflags;
567 1.2 ad u_int32_t msgfunc;
568 1.2 ad u_int32_t msgictx;
569 1.2 ad u_int32_t msgtctx;
570 1.2 ad u_int32_t eventmask;
571 1.2 ad } __attribute__ ((__packed__));
572 1.2 ad
573 1.2 ad struct i2o_util_event_register_reply {
574 1.2 ad u_int32_t msgflags;
575 1.2 ad u_int32_t msgfunc;
576 1.2 ad u_int32_t msgictx;
577 1.2 ad u_int32_t msgtctx;
578 1.2 ad u_int32_t event;
579 1.2 ad u_int32_t eventdata[1];
580 1.2 ad } __attribute__ ((__packed__));
581 1.2 ad
582 1.2 ad /* Generic events. */
583 1.2 ad #define I2O_EVENT_GEN_DEVICE_STATE 0x00400000
584 1.2 ad #define I2O_EVENT_GEN_VENDOR_EVENT 0x00800000
585 1.2 ad #define I2O_EVENT_GEN_FIELD_MODIFIED 0x01000000
586 1.2 ad #define I2O_EVENT_GEN_EVENT_MASK_MODIFIED 0x02000000
587 1.2 ad #define I2O_EVENT_GEN_DEVICE_RESET 0x04000000
588 1.2 ad #define I2O_EVENT_GEN_CAPABILITY_CHANGE 0x08000000
589 1.2 ad #define I2O_EVENT_GEN_LOCK_RELEASE 0x10000000
590 1.2 ad #define I2O_EVENT_GEN_NEED_CONFIGURATION 0x20000000
591 1.2 ad #define I2O_EVENT_GEN_GENERAL_WARNING 0x40000000
592 1.2 ad #define I2O_EVENT_GEN_STATE_CHANGE 0x80000000
593 1.2 ad
594 1.2 ad /* Executive class events. */
595 1.2 ad #define I2O_EVENT_EXEC_RESOURCE_LIMITS 0x00000001
596 1.2 ad #define I2O_EVENT_EXEC_CONNECTION_FAIL 0x00000002
597 1.2 ad #define I2O_EVENT_EXEC_ADAPTER_FAULT 0x00000004
598 1.2 ad #define I2O_EVENT_EXEC_POWER_FAIL 0x00000008
599 1.2 ad #define I2O_EVENT_EXEC_RESET_PENDING 0x00000010
600 1.2 ad #define I2O_EVENT_EXEC_RESET_IMMINENT 0x00000020
601 1.2 ad #define I2O_EVENT_EXEC_HARDWARE_FAIL 0x00000040
602 1.2 ad #define I2O_EVENT_EXEC_XCT_CHANGE 0x00000080
603 1.2 ad #define I2O_EVENT_EXEC_NEW_LCT_ENTRY 0x00000100
604 1.2 ad #define I2O_EVENT_EXEC_MODIFIED_LCT 0x00000200
605 1.2 ad #define I2O_EVENT_EXEC_DDM_AVAILIBILITY 0x00000400
606 1.2 ad
607 1.1 ad /*
608 1.1 ad * ================= Utility parameter groups =================
609 1.1 ad */
610 1.1 ad
611 1.1 ad #define I2O_PARAM_DEVICE_IDENTITY 0xf100
612 1.1 ad struct i2o_param_device_identity {
613 1.1 ad u_int32_t classid;
614 1.1 ad u_int16_t ownertid;
615 1.1 ad u_int16_t parenttid;
616 1.1 ad u_int8_t vendorinfo[16];
617 1.1 ad u_int8_t productinfo[16];
618 1.1 ad u_int8_t description[16];
619 1.1 ad u_int8_t revlevel[8];
620 1.1 ad u_int8_t snformat;
621 1.1 ad u_int8_t serialnumber[1];
622 1.1 ad } __attribute__ ((__packed__));
623 1.1 ad
624 1.1 ad #define I2O_PARAM_DDM_IDENTITY 0xf101
625 1.1 ad struct i2o_param_ddm_identity {
626 1.1 ad u_int16_t ddmtid;
627 1.1 ad u_int8_t name[24];
628 1.1 ad u_int8_t revlevel[8];
629 1.1 ad u_int8_t snformat;
630 1.1 ad u_int8_t serialnumber[12];
631 1.1 ad } __attribute__ ((__packed__));
632 1.1 ad
633 1.1 ad /*
634 1.1 ad * ================= Block storage class messages =================
635 1.1 ad */
636 1.1 ad
637 1.1 ad #define I2O_RBS_BLOCK_READ 0x30
638 1.1 ad struct i2o_rbs_block_read {
639 1.1 ad u_int32_t msgflags;
640 1.1 ad u_int32_t msgfunc;
641 1.1 ad u_int32_t msgictx;
642 1.1 ad u_int32_t msgtctx;
643 1.1 ad u_int32_t flags; /* flags, time multipler, read ahead */
644 1.1 ad u_int32_t datasize;
645 1.1 ad u_int32_t lowoffset;
646 1.1 ad u_int32_t highoffset;
647 1.1 ad } __attribute__ ((__packed__));
648 1.1 ad
649 1.1 ad #define I2O_RBS_BLOCK_READ_NO_RETRY 0x01
650 1.1 ad #define I2O_RBS_BLOCK_READ_SOLO 0x02
651 1.1 ad #define I2O_RBS_BLOCK_READ_CACHE_READ 0x04
652 1.1 ad #define I2O_RBS_BLOCK_READ_PREFETCH 0x08
653 1.1 ad #define I2O_RBS_BLOCK_READ_CACHE_ONLY 0x10
654 1.1 ad
655 1.1 ad #define I2O_RBS_BLOCK_WRITE 0x31
656 1.1 ad struct i2o_rbs_block_write {
657 1.1 ad u_int32_t msgflags;
658 1.1 ad u_int32_t msgfunc;
659 1.1 ad u_int32_t msgictx;
660 1.1 ad u_int32_t msgtctx;
661 1.1 ad u_int32_t flags; /* flags, time multipler */
662 1.1 ad u_int32_t datasize;
663 1.1 ad u_int32_t lowoffset;
664 1.1 ad u_int32_t highoffset;
665 1.1 ad } __attribute__ ((__packed__));
666 1.1 ad
667 1.1 ad #define I2O_RBS_BLOCK_WRITE_NO_RETRY 0x01
668 1.1 ad #define I2O_RBS_BLOCK_WRITE_SOLO 0x02
669 1.1 ad #define I2O_RBS_BLOCK_WRITE_CACHE_NONE 0x04
670 1.1 ad #define I2O_RBS_BLOCK_WRITE_CACHE_WT 0x08
671 1.1 ad #define I2O_RBS_BLOCK_WRITE_CACHE_WB 0x10
672 1.1 ad
673 1.1 ad #define I2O_RBS_CACHE_FLUSH 0x37
674 1.1 ad struct i2o_rbs_cache_flush {
675 1.1 ad u_int32_t msgflags;
676 1.1 ad u_int32_t msgfunc;
677 1.1 ad u_int32_t msgictx;
678 1.1 ad u_int32_t msgtctx;
679 1.1 ad u_int32_t flags; /* flags, time multipler */
680 1.1 ad } __attribute__ ((__packed__));
681 1.1 ad
682 1.1 ad #define I2O_RBS_MEDIA_MOUNT 0x41
683 1.1 ad struct i2o_rbs_media_mount {
684 1.1 ad u_int32_t msgflags;
685 1.1 ad u_int32_t msgfunc;
686 1.1 ad u_int32_t msgictx;
687 1.1 ad u_int32_t msgtctx;
688 1.1 ad u_int32_t mediaid;
689 1.1 ad u_int32_t loadflags;
690 1.1 ad } __attribute__ ((__packed__));
691 1.1 ad
692 1.1 ad #define I2O_RBS_MEDIA_EJECT 0x43
693 1.1 ad struct i2o_rbs_media_eject {
694 1.1 ad u_int32_t msgflags;
695 1.1 ad u_int32_t msgfunc;
696 1.1 ad u_int32_t msgictx;
697 1.1 ad u_int32_t msgtctx;
698 1.1 ad u_int32_t mediaid;
699 1.1 ad } __attribute__ ((__packed__));
700 1.1 ad
701 1.1 ad #define I2O_RBS_MEDIA_LOCK 0x49
702 1.1 ad struct i2o_rbs_media_lock {
703 1.1 ad u_int32_t msgflags;
704 1.1 ad u_int32_t msgfunc;
705 1.1 ad u_int32_t msgictx;
706 1.1 ad u_int32_t msgtctx;
707 1.1 ad u_int32_t mediaid;
708 1.1 ad } __attribute__ ((__packed__));
709 1.1 ad
710 1.1 ad #define I2O_RBS_MEDIA_UNLOCK 0x4b
711 1.1 ad struct i2o_rbs_media_unlock {
712 1.1 ad u_int32_t msgflags;
713 1.1 ad u_int32_t msgfunc;
714 1.1 ad u_int32_t msgictx;
715 1.1 ad u_int32_t msgtctx;
716 1.1 ad u_int32_t mediaid;
717 1.1 ad } __attribute__ ((__packed__));
718 1.1 ad
719 1.1 ad /* Standard RBS reply frame. */
720 1.1 ad struct i2o_rbs_reply {
721 1.1 ad u_int32_t msgflags;
722 1.1 ad u_int32_t msgfunc;
723 1.1 ad u_int32_t msgictx;
724 1.1 ad u_int32_t msgtctx;
725 1.1 ad u_int16_t detail;
726 1.1 ad u_int8_t reserved;
727 1.1 ad u_int8_t reqstatus;
728 1.1 ad u_int32_t transfercount;
729 1.1 ad u_int64_t offset; /* Error replies only */
730 1.1 ad } __attribute__ ((__packed__));
731 1.1 ad
732 1.1 ad /*
733 1.1 ad * ================= Block storage class parameter groups =================
734 1.1 ad */
735 1.1 ad
736 1.1 ad #define I2O_PARAM_RBS_DEVICE_INFO 0x0000
737 1.1 ad struct i2o_param_rbs_device_info {
738 1.1 ad u_int8_t type;
739 1.1 ad u_int8_t npaths;
740 1.1 ad u_int16_t powerstate;
741 1.1 ad u_int32_t blocksize;
742 1.1 ad u_int64_t capacity;
743 1.1 ad u_int32_t capabilities;
744 1.1 ad u_int32_t state;
745 1.1 ad } __attribute__ ((__packed__));
746 1.1 ad
747 1.1 ad #define I2O_RBS_TYPE_DIRECT 0x00
748 1.1 ad #define I2O_RBS_TYPE_WORM 0x04
749 1.1 ad #define I2O_RBS_TYPE_CDROM 0x05
750 1.1 ad #define I2O_RBS_TYPE_OPTICAL 0x07
751 1.1 ad
752 1.1 ad #define I2O_RBS_CAP_CACHING 0x00000001
753 1.1 ad #define I2O_RBS_CAP_MULTI_PATH 0x00000002
754 1.1 ad #define I2O_RBS_CAP_DYNAMIC_CAPACITY 0x00000004
755 1.1 ad #define I2O_RBS_CAP_REMOVEABLE_MEDIA 0x00000008
756 1.1 ad #define I2O_RBS_CAP_REMOVEABLE_DEVICE 0x00000010
757 1.1 ad #define I2O_RBS_CAP_READ_ONLY 0x00000020
758 1.1 ad #define I2O_RBS_CAP_LOCKOUT 0x00000040
759 1.1 ad #define I2O_RBS_CAP_BOOT_BYPASS 0x00000080
760 1.1 ad #define I2O_RBS_CAP_COMPRESSION 0x00000100
761 1.1 ad #define I2O_RBS_CAP_DATA_SECURITY 0x00000200
762 1.1 ad #define I2O_RBS_CAP_RAID 0x00000400
763 1.1 ad
764 1.1 ad #define I2O_RBS_STATE_CACHING 0x00000001
765 1.1 ad #define I2O_RBS_STATE_POWERED_ON 0x00000002
766 1.1 ad #define I2O_RBS_STATE_READY 0x00000004
767 1.1 ad #define I2O_RBS_STATE_MEDIA_LOADED 0x00000008
768 1.1 ad #define I2O_RBS_STATE_DEVICE_LOADED 0x00000010
769 1.1 ad #define I2O_RBS_STATE_READ_ONLY 0x00000020
770 1.1 ad #define I2O_RBS_STATE_LOCKOUT 0x00000040
771 1.1 ad #define I2O_RBS_STATE_BOOT_BYPASS 0x00000080
772 1.1 ad #define I2O_RBS_STATE_COMPRESSION 0x00000100
773 1.1 ad #define I2O_RBS_STATE_DATA_SECURITY 0x00000200
774 1.1 ad #define I2O_RBS_STATE_RAID 0x00000400
775 1.1 ad
776 1.2 ad #define I2O_PARAM_RBS_OPERATION 0x0001
777 1.2 ad struct i2o_param_rbs_operation {
778 1.2 ad u_int8_t autoreass;
779 1.2 ad u_int8_t reasstolerance;
780 1.2 ad u_int8_t numretries;
781 1.2 ad u_int8_t reserved0;
782 1.2 ad u_int32_t reasssize;
783 1.2 ad u_int32_t expectedtimeout;
784 1.2 ad u_int32_t rwvtimeout;
785 1.2 ad u_int32_t rwvtimeoutbase;
786 1.2 ad u_int32_t timeoutbase;
787 1.2 ad u_int32_t orderedreqdepth;
788 1.2 ad u_int32_t atomicwritesize;
789 1.2 ad } __attribute__ ((__packed__));
790 1.2 ad
791 1.1 ad #define I2O_PARAM_RBS_CACHE_CONTROL 0x0003
792 1.1 ad struct i2o_param_rbs_cache_control {
793 1.1 ad u_int32_t totalcachesize;
794 1.1 ad u_int32_t readcachesize;
795 1.1 ad u_int32_t writecachesize;
796 1.1 ad u_int8_t writepolicy;
797 1.1 ad u_int8_t readpolicy;
798 1.1 ad u_int8_t errorcorrection;
799 1.1 ad u_int8_t reserved;
800 1.1 ad } __attribute__ ((__packed__));
801 1.1 ad
802 1.1 ad /*
803 1.1 ad * ================= SCSI peripheral class messages =================
804 1.1 ad */
805 1.1 ad
806 1.1 ad #define I2O_SCSI_DEVICE_RESET 0x27
807 1.1 ad struct i2o_scsi_device_reset {
808 1.1 ad u_int32_t msgflags;
809 1.1 ad u_int32_t msgfunc;
810 1.1 ad u_int32_t msgictx;
811 1.1 ad u_int32_t msgtctx;
812 1.1 ad } __attribute__ ((__packed__));
813 1.1 ad
814 1.1 ad #define I2O_SCSI_SCB_EXEC 0x81
815 1.1 ad struct i2o_scsi_scb_exec {
816 1.1 ad u_int32_t msgflags;
817 1.1 ad u_int32_t msgfunc;
818 1.1 ad u_int32_t msgictx;
819 1.1 ad u_int32_t msgtctx;
820 1.1 ad u_int32_t flags; /* CDB length and flags */
821 1.1 ad u_int8_t cdb[16];
822 1.1 ad u_int32_t datalen;
823 1.1 ad } __attribute__ ((__packed__));
824 1.1 ad
825 1.1 ad #define I2O_SCB_FLAG_SENSE_DATA_IN_MESSAGE 0x00200000
826 1.1 ad #define I2O_SCB_FLAG_SENSE_DATA_IN_BUFFER 0x00600000
827 1.1 ad #define I2O_SCB_FLAG_SIMPLE_QUEUE_TAG 0x00800000
828 1.1 ad #define I2O_SCB_FLAG_HEAD_QUEUE_TAG 0x01000000
829 1.1 ad #define I2O_SCB_FLAG_ORDERED_QUEUE_TAG 0x01800000
830 1.1 ad #define I2O_SCB_FLAG_ACA_QUEUE_TAG 0x02000000
831 1.1 ad #define I2O_SCB_FLAG_ENABLE_DISCONNECT 0x20000000
832 1.1 ad #define I2O_SCB_FLAG_XFER_FROM_DEVICE 0x40000000
833 1.1 ad #define I2O_SCB_FLAG_XFER_TO_DEVICE 0x80000000
834 1.1 ad
835 1.1 ad #define I2O_SCSI_SCB_ABORT 0x83
836 1.1 ad struct i2o_scsi_scb_abort {
837 1.1 ad u_int32_t msgflags;
838 1.1 ad u_int32_t msgfunc;
839 1.1 ad u_int32_t msgictx;
840 1.1 ad u_int32_t msgtctx;
841 1.1 ad u_int32_t tctxabort;
842 1.1 ad } __attribute__ ((__packed__));
843 1.1 ad
844 1.1 ad struct i2o_scsi_reply {
845 1.1 ad u_int32_t msgflags;
846 1.1 ad u_int32_t msgfunc;
847 1.1 ad u_int32_t msgictx;
848 1.1 ad u_int32_t msgtctx;
849 1.1 ad u_int16_t detail;
850 1.1 ad u_int8_t reserved;
851 1.1 ad u_int8_t reqstatus;
852 1.1 ad u_int32_t datalen;
853 1.1 ad u_int32_t senselen;
854 1.1 ad u_int8_t sense[40];
855 1.1 ad } __attribute__ ((__packed__));
856 1.1 ad
857 1.1 ad #define I2O_SCSI_DSC_SUCCESS 0x00
858 1.1 ad #define I2O_SCSI_DSC_REQUEST_ABORTED 0x02
859 1.1 ad #define I2O_SCSI_DSC_UNABLE_TO_ABORT 0x03
860 1.1 ad #define I2O_SCSI_DSC_COMPLETE_WITH_ERROR 0x04
861 1.1 ad #define I2O_SCSI_DSC_ADAPTER_BUSY 0x05
862 1.1 ad #define I2O_SCSI_DSC_REQUEST_INVALID 0x06
863 1.1 ad #define I2O_SCSI_DSC_PATH_INVALID 0x07
864 1.1 ad #define I2O_SCSI_DSC_DEVICE_NOT_PRESENT 0x08
865 1.1 ad #define I2O_SCSI_DSC_UNABLE_TO_TERMINATE 0x09
866 1.1 ad #define I2O_SCSI_DSC_SELECTION_TIMEOUT 0x0a
867 1.1 ad #define I2O_SCSI_DSC_COMMAND_TIMEOUT 0x0b
868 1.1 ad #define I2O_SCSI_DSC_MR_MESSAGE_RECEIVED 0x0d
869 1.1 ad #define I2O_SCSI_DSC_SCSI_BUS_RESET 0x0e
870 1.1 ad #define I2O_SCSI_DSC_PARITY_ERROR_FAILURE 0x0f
871 1.1 ad #define I2O_SCSI_DSC_AUTOSENSE_FAILED 0x10
872 1.1 ad #define I2O_SCSI_DSC_NO_ADAPTER 0x11
873 1.1 ad #define I2O_SCSI_DSC_DATA_OVERRUN 0x12
874 1.1 ad #define I2O_SCSI_DSC_UNEXPECTED_BUS_FREE 0x13
875 1.1 ad #define I2O_SCSI_DSC_SEQUENCE_FAILURE 0x14
876 1.1 ad #define I2O_SCSI_DSC_REQUEST_LENGTH_ERROR 0x15
877 1.1 ad #define I2O_SCSI_DSC_PROVIDE_FAILURE 0x16
878 1.1 ad #define I2O_SCSI_DSC_BDR_MESSAGE_SENT 0x17
879 1.1 ad #define I2O_SCSI_DSC_REQUEST_TERMINATED 0x18
880 1.1 ad #define I2O_SCSI_DSC_IDE_MESSAGE_SENT 0x33
881 1.1 ad #define I2O_SCSI_DSC_RESOURCE_UNAVAILABLE 0x34
882 1.1 ad #define I2O_SCSI_DSC_UNACKNOWLEDGED_EVENT 0x35
883 1.1 ad #define I2O_SCSI_DSC_MESSAGE_RECEIVED 0x36
884 1.1 ad #define I2O_SCSI_DSC_INVALID_CDB 0x37
885 1.1 ad #define I2O_SCSI_DSC_LUN_INVALID 0x38
886 1.1 ad #define I2O_SCSI_DSC_SCSI_TID_INVALID 0x39
887 1.1 ad #define I2O_SCSI_DSC_FUNCTION_UNAVAILABLE 0x3a
888 1.1 ad #define I2O_SCSI_DSC_NO_NEXUS 0x3b
889 1.1 ad #define I2O_SCSI_DSC_SCSI_IID_INVALID 0x3c
890 1.1 ad #define I2O_SCSI_DSC_CDB_RECEIVED 0x3d
891 1.1 ad #define I2O_SCSI_DSC_LUN_ALREADY_ENABLED 0x3e
892 1.1 ad #define I2O_SCSI_DSC_BUS_BUSY 0x3f
893 1.1 ad #define I2O_SCSI_DSC_QUEUE_FROZEN 0x40
894 1.1 ad
895 1.1 ad /*
896 1.1 ad * ================= SCSI peripheral class parameter groups =================
897 1.1 ad */
898 1.1 ad
899 1.1 ad #define I2O_PARAM_SCSI_DEVICE_INFO 0x0000
900 1.1 ad struct i2o_param_scsi_device_info {
901 1.1 ad u_int8_t devicetype;
902 1.1 ad u_int8_t flags;
903 1.1 ad u_int16_t reserved0;
904 1.1 ad u_int32_t identifier;
905 1.1 ad u_int8_t luninfo[8];
906 1.1 ad u_int32_t queuedepth;
907 1.1 ad u_int8_t reserved1;
908 1.1 ad u_int8_t negoffset;
909 1.1 ad u_int8_t negdatawidth;
910 1.1 ad u_int8_t reserved2;
911 1.1 ad u_int64_t negsyncrate;
912 1.1 ad } __attribute__ ((__packed__));
913 1.1 ad
914 1.1 ad #endif /* !defined _I2O_I2O_H_ */
915