i2odpt.h revision 1.1.34.1 1 1.1.34.1 kent /* $NetBSD: i2odpt.h,v 1.1.34.1 2005/04/29 11:28:47 kent Exp $ */
2 1.1 ad
3 1.1 ad /*-
4 1.1 ad * Copyright (c) 2001 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 * Copyright (c) 1996-2000 Distributed Processing Technology Corporation
41 1.1 ad * Copyright (c) 2000 Adaptec Corporation.
42 1.1 ad * All rights reserved.
43 1.1 ad *
44 1.1 ad * Redistribution and use in source form, with or without modification, are
45 1.1 ad * permitted provided that redistributions of source code must retain the
46 1.1 ad * above copyright notice, this list of conditions and the following disclaimer.
47 1.1 ad *
48 1.1 ad * This software is provided `as is' by Distributed Processing Technology and
49 1.1 ad * any express or implied warranties, including, but not limited to, the
50 1.1 ad * implied warranties of merchantability and fitness for a particular purpose,
51 1.1 ad * are disclaimed. In no event shall Distributed Processing Technology be
52 1.1 ad * liable for any direct, indirect, incidental, special, exemplary or
53 1.1 ad * consequential damages (including, but not limited to, procurement of
54 1.1 ad * substitute goods or services; loss of use, data, or profits; or business
55 1.1 ad * interruptions) however caused and on any theory of liability, whether in
56 1.1 ad * contract, strict liability, or tort (including negligence or otherwise)
57 1.1 ad * arising in any way out of the use of this driver software, even if advised
58 1.1 ad * of the possibility of such damage.
59 1.1 ad *
60 1.1 ad */
61 1.1 ad
62 1.1 ad #ifndef _I2O_I2ODPT_H_
63 1.1 ad #define _I2O_I2ODPT_H_
64 1.1 ad
65 1.1 ad /*
66 1.1 ad * ================= Messages =================
67 1.1 ad */
68 1.1 ad
69 1.1 ad #define I2O_DPT_SCSI_SCB_EXEC I2O_SCSI_SCB_EXEC
70 1.1 ad struct i2o_dpt_scsi_scb_exec {
71 1.1 ad u_int32_t msgflags;
72 1.1 ad u_int32_t msgictx;
73 1.1 ad u_int32_t msgtctx;
74 1.1 ad u_int32_t privfunc;
75 1.1 ad u_int32_t tid; /* bit 16: interpret; bit 17: phys */
76 1.1 ad u_int32_t flags;
77 1.1 ad u_int32_t scbflags;
78 1.1 ad u_int8_t cdb[16];
79 1.1 ad u_int32_t bytecount;
80 1.1 ad } __attribute__ ((__packed__));
81 1.1 ad
82 1.1 ad #define I2O_DPT_FLASH_REGION_SIZE 0x0100
83 1.1 ad #define I2O_DPT_FLASH_REGION_READ 0x0101
84 1.1 ad #define I2O_DPT_FLASH_REGION_WRITE 0x0102
85 1.1 ad #define I2O_DPT_FLASH_REGION_CRC 0x0103
86 1.1 ad struct i2o_dpt_flash_region {
87 1.1 ad u_int32_t msgflags;
88 1.1 ad u_int32_t msgfunc;
89 1.1 ad u_int32_t msgictx;
90 1.1 ad u_int32_t msgtctx;
91 1.1 ad u_int32_t privfunc;
92 1.1 ad u_int32_t region;
93 1.1 ad u_int32_t regionoffset;
94 1.1 ad u_int32_t bytecount;
95 1.1 ad } __attribute__ ((__packed__));
96 1.1 ad
97 1.1 ad #define DPT_FLASH_REGION_OP_FIRMWARE 0x00
98 1.1 ad #define DPT_FLASH_REGION_SOFTWARE 0x01
99 1.1 ad #define DPT_FLASH_REGION_OEM_NVRAM 0x02
100 1.1 ad #define DPT_FLASH_REGION_SERIAL 0x03
101 1.1 ad #define DPT_FLASH_REGION_BOOT_FIRMWARE 0x04
102 1.1 ad
103 1.1 ad #define I2O_DPT_DRIVER_PRINTF 0x0200
104 1.1 ad struct i2o_dpt_driver_printf {
105 1.1 ad u_int32_t msgflags;
106 1.1 ad u_int32_t msgfunc;
107 1.1 ad u_int32_t msgictx;
108 1.1 ad u_int32_t msgtctx;
109 1.1 ad u_int32_t privfunc;
110 1.1 ad u_int32_t printbuffersize;
111 1.1 ad u_int8_t printbuffer[1];
112 1.1 ad } __attribute__ ((__packed__));
113 1.1 ad
114 1.1 ad #define I2O_DPT_DIAG_ENABLE 0x0201
115 1.1 ad struct i2o_dpt_diag_enable {
116 1.1 ad u_int32_t msgflags;
117 1.1 ad u_int32_t msgfunc;
118 1.1 ad u_int32_t msgictx;
119 1.1 ad u_int32_t msgtctx;
120 1.1 ad u_int32_t privfunc;
121 1.1 ad } __attribute__ ((__packed__));
122 1.1 ad
123 1.1 ad #define I2O_DPT_DRIVER_GET 0x0300
124 1.1 ad struct i2o_dpt_driver_get {
125 1.1 ad u_int32_t msgflags;
126 1.1 ad u_int32_t msgfunc;
127 1.1 ad u_int32_t msgictx;
128 1.1 ad u_int32_t msgtctx;
129 1.1 ad u_int32_t privfunc;
130 1.1 ad u_int32_t offset;
131 1.1 ad u_int32_t bytecount;
132 1.1 ad
133 1.1 ad /* SGL follows. */
134 1.1 ad } __attribute__ ((__packed__));
135 1.1 ad
136 1.1 ad #define I2O_DPT_DRIVER_SET 0x0301
137 1.1 ad struct i2o_dpt_driver_set {
138 1.1 ad u_int32_t msgflags;
139 1.1 ad u_int32_t msgfunc;
140 1.1 ad u_int32_t msgictx;
141 1.1 ad u_int32_t msgtctx;
142 1.1 ad u_int32_t privfunc;
143 1.1 ad u_int32_t offset;
144 1.1 ad u_int32_t bytecount;
145 1.1 ad
146 1.1 ad /* SGL follows. */
147 1.1 ad } __attribute__ ((__packed__));
148 1.1 ad
149 1.1 ad /*
150 1.1 ad * ================= Parameter groups =================
151 1.1 ad */
152 1.1.34.1 kent
153 1.1 ad #define I2O_DPT_PARAM_DEVICE_INFO 0x8000
154 1.1 ad struct i2o_dpt_param_device_info {
155 1.1 ad u_int8_t devicetype; /* as I2O_PARAM_SCSI_DEVICE_INFO */
156 1.1 ad u_int8_t flags; /* as I2O_PARAM_SCSI_DEVICE_INFO */
157 1.1 ad u_int16_t bus;
158 1.1 ad u_int32_t identifier;
159 1.1 ad u_int8_t luninfo[8];
160 1.1 ad } __attribute__ ((__packed__));
161 1.1 ad
162 1.1 ad #define I2O_DPT_PARAM_EXEC_IOP_BUFFERS 0x8000
163 1.1 ad struct i2o_dpt_param_exec_iop_buffers {
164 1.1 ad u_int32_t serialoutputoff;
165 1.1 ad u_int32_t serialoutputsize;
166 1.1 ad u_int32_t serialheadersize;
167 1.1 ad u_int32_t serialflagssupported;
168 1.1 ad } __attribute__ ((__packed__));
169 1.1 ad
170 1.1 ad #endif /* _I2O_I2ODPT_H_ */
171