Sync usage with man page.
[netbsd-mini2440.git] / sys / dev / i2o / i2odpt.h
blob2553ff0a02994848affc12722d180bb05d21bfc6
1 /* $NetBSD: i2odpt.h,v 1.4 2008/04/28 20:23:48 martin Exp $ */
3 /*-
4 * Copyright (c) 2001 The NetBSD Foundation, Inc.
5 * All rights reserved.
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Andrew Doran.
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.
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
33 * Copyright (c) 1996-2000 Distributed Processing Technology Corporation
34 * Copyright (c) 2000 Adaptec Corporation.
35 * All rights reserved.
37 * Redistribution and use in source form, with or without modification, are
38 * permitted provided that redistributions of source code must retain the
39 * above copyright notice, this list of conditions and the following disclaimer.
41 * This software is provided `as is' by Distributed Processing Technology and
42 * any express or implied warranties, including, but not limited to, the
43 * implied warranties of merchantability and fitness for a particular purpose,
44 * are disclaimed. In no event shall Distributed Processing Technology be
45 * liable for any direct, indirect, incidental, special, exemplary or
46 * consequential damages (including, but not limited to, procurement of
47 * substitute goods or services; loss of use, data, or profits; or business
48 * interruptions) however caused and on any theory of liability, whether in
49 * contract, strict liability, or tort (including negligence or otherwise)
50 * arising in any way out of the use of this driver software, even if advised
51 * of the possibility of such damage.
55 #ifndef _I2O_I2ODPT_H_
56 #define _I2O_I2ODPT_H_
59 * ================= Messages =================
62 #define I2O_DPT_SCSI_SCB_EXEC I2O_SCSI_SCB_EXEC
63 struct i2o_dpt_scsi_scb_exec {
64 u_int32_t msgflags;
65 u_int32_t msgictx;
66 u_int32_t msgtctx;
67 u_int32_t privfunc;
68 u_int32_t tid; /* bit 16: interpret; bit 17: phys */
69 u_int32_t flags;
70 u_int32_t scbflags;
71 u_int8_t cdb[16];
72 u_int32_t bytecount;
73 } __packed;
75 #define I2O_DPT_FLASH_REGION_SIZE 0x0100
76 #define I2O_DPT_FLASH_REGION_READ 0x0101
77 #define I2O_DPT_FLASH_REGION_WRITE 0x0102
78 #define I2O_DPT_FLASH_REGION_CRC 0x0103
79 struct i2o_dpt_flash_region {
80 u_int32_t msgflags;
81 u_int32_t msgfunc;
82 u_int32_t msgictx;
83 u_int32_t msgtctx;
84 u_int32_t privfunc;
85 u_int32_t region;
86 u_int32_t regionoffset;
87 u_int32_t bytecount;
88 } __packed;
90 #define DPT_FLASH_REGION_OP_FIRMWARE 0x00
91 #define DPT_FLASH_REGION_SOFTWARE 0x01
92 #define DPT_FLASH_REGION_OEM_NVRAM 0x02
93 #define DPT_FLASH_REGION_SERIAL 0x03
94 #define DPT_FLASH_REGION_BOOT_FIRMWARE 0x04
96 #define I2O_DPT_DRIVER_PRINTF 0x0200
97 struct i2o_dpt_driver_printf {
98 u_int32_t msgflags;
99 u_int32_t msgfunc;
100 u_int32_t msgictx;
101 u_int32_t msgtctx;
102 u_int32_t privfunc;
103 u_int32_t printbuffersize;
104 u_int8_t printbuffer[1];
105 } __packed;
107 #define I2O_DPT_DIAG_ENABLE 0x0201
108 struct i2o_dpt_diag_enable {
109 u_int32_t msgflags;
110 u_int32_t msgfunc;
111 u_int32_t msgictx;
112 u_int32_t msgtctx;
113 u_int32_t privfunc;
114 } __packed;
116 #define I2O_DPT_DRIVER_GET 0x0300
117 struct i2o_dpt_driver_get {
118 u_int32_t msgflags;
119 u_int32_t msgfunc;
120 u_int32_t msgictx;
121 u_int32_t msgtctx;
122 u_int32_t privfunc;
123 u_int32_t offset;
124 u_int32_t bytecount;
126 /* SGL follows. */
127 } __packed;
129 #define I2O_DPT_DRIVER_SET 0x0301
130 struct i2o_dpt_driver_set {
131 u_int32_t msgflags;
132 u_int32_t msgfunc;
133 u_int32_t msgictx;
134 u_int32_t msgtctx;
135 u_int32_t privfunc;
136 u_int32_t offset;
137 u_int32_t bytecount;
139 /* SGL follows. */
140 } __packed;
143 * ================= Parameter groups =================
146 #define I2O_DPT_PARAM_DEVICE_INFO 0x8000
147 struct i2o_dpt_param_device_info {
148 u_int8_t devicetype; /* as I2O_PARAM_SCSI_DEVICE_INFO */
149 u_int8_t flags; /* as I2O_PARAM_SCSI_DEVICE_INFO */
150 u_int16_t bus;
151 u_int32_t identifier;
152 u_int8_t luninfo[8];
153 } __packed;
155 #define I2O_DPT_PARAM_EXEC_IOP_BUFFERS 0x8000
156 struct i2o_dpt_param_exec_iop_buffers {
157 u_int32_t serialoutputoff;
158 u_int32_t serialoutputsize;
159 u_int32_t serialheadersize;
160 u_int32_t serialflagssupported;
161 } __packed;
163 #endif /* _I2O_I2ODPT_H_ */