scsi_changer.h revision 1.8.2.3 1 1.8.2.3 thorpej /* $NetBSD: scsi_changer.h,v 1.8.2.3 1997/10/14 10:25:05 thorpej Exp $ */
2 1.8.2.2 thorpej
3 1.8.2.2 thorpej /*
4 1.8.2.2 thorpej * Copyright (c) 1996 Jason R. Thorpe <thorpej (at) and.com>
5 1.8.2.2 thorpej * All rights reserved.
6 1.8.2.2 thorpej *
7 1.8.2.2 thorpej * Partially based on an autochanger driver written by Stefan Grefen
8 1.8.2.2 thorpej * and on an autochanger driver written by the Systems Programming Group
9 1.8.2.2 thorpej * at the University of Utah Computer Science Department.
10 1.8.2.2 thorpej *
11 1.8.2.2 thorpej * Redistribution and use in source and binary forms, with or without
12 1.8.2.2 thorpej * modification, are permitted provided that the following conditions
13 1.8.2.2 thorpej * are met:
14 1.8.2.2 thorpej * 1. Redistributions of source code must retain the above copyright
15 1.8.2.2 thorpej * notice, this list of conditions and the following disclaimer.
16 1.8.2.2 thorpej * 2. Redistributions in binary form must reproduce the above copyright
17 1.8.2.2 thorpej * notice, this list of conditions and the following disclaimer in the
18 1.8.2.2 thorpej * documentation and/or other materials provided with the distribution.
19 1.8.2.2 thorpej * 3. All advertising materials mentioning features or use of this software
20 1.8.2.2 thorpej * must display the following acknowledgements:
21 1.8.2.2 thorpej * This product includes software developed by Jason R. Thorpe
22 1.8.2.2 thorpej * for And Communications, http://www.and.com/
23 1.8.2.2 thorpej * 4. The name of the author may not be used to endorse or promote products
24 1.8.2.2 thorpej * derived from this software without specific prior written permission.
25 1.8.2.2 thorpej *
26 1.8.2.2 thorpej * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
27 1.8.2.2 thorpej * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
28 1.8.2.2 thorpej * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
29 1.8.2.2 thorpej * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
30 1.8.2.2 thorpej * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
31 1.8.2.2 thorpej * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32 1.8.2.2 thorpej * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
33 1.8.2.2 thorpej * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
34 1.8.2.2 thorpej * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 1.8.2.2 thorpej * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 1.8.2.2 thorpej * SUCH DAMAGE.
37 1.8.2.2 thorpej */
38 1.8.2.2 thorpej
39 1.8.2.2 thorpej /*
40 1.8.2.2 thorpej * SCSI changer interface description
41 1.8.2.2 thorpej */
42 1.8.2.2 thorpej
43 1.8.2.2 thorpej /*
44 1.8.2.2 thorpej * Partially derived from software written by Stefan Grefen
45 1.8.2.2 thorpej * (grefen (at) goofy.zdv.uni-mainz.de soon grefen (at) convex.com)
46 1.8.2.2 thorpej * based on the SCSI System by written Julian Elischer (julian (at) tfs.com)
47 1.8.2.2 thorpej * for TRW Financial Systems.
48 1.8.2.2 thorpej *
49 1.8.2.2 thorpej * TRW Financial Systems, in accordance with their agreement with Carnegie
50 1.8.2.2 thorpej * Mellon University, makes this software available to CMU to distribute
51 1.8.2.2 thorpej * or use in any manner that they see fit as long as this message is kept with
52 1.8.2.2 thorpej * the software. For this reason TFS also grants any other persons or
53 1.8.2.2 thorpej * organisations permission to use or modify this software.
54 1.8.2.2 thorpej *
55 1.8.2.2 thorpej * TFS supplies this software to be publicly redistributed
56 1.8.2.2 thorpej * on the understanding that TFS is not responsible for the correct
57 1.8.2.2 thorpej * functioning of this software in any circumstances.
58 1.8.2.2 thorpej *
59 1.8.2.2 thorpej * Ported to run under 386BSD by Julian Elischer (julian (at) tfs.com) Sept 1992
60 1.8.2.2 thorpej */
61 1.8.2.2 thorpej
62 1.8.2.2 thorpej #ifndef _SCSI_SCSI_CHANGER_H
63 1.8.2.2 thorpej #define _SCSI_SCSI_CHANGER_H 1
64 1.8.2.2 thorpej
65 1.8.2.2 thorpej /*
66 1.8.2.2 thorpej * SCSI command format
67 1.8.2.2 thorpej */
68 1.8.2.2 thorpej
69 1.8.2.2 thorpej /*
70 1.8.2.2 thorpej * Exchange the medium in the source element with the medium
71 1.8.2.2 thorpej * located at the destination element.
72 1.8.2.2 thorpej */
73 1.8.2.2 thorpej struct scsi_exchange_medium {
74 1.8.2.2 thorpej u_int8_t opcode;
75 1.8.2.2 thorpej #define EXCHANGE_MEDIUM 0xa6
76 1.8.2.2 thorpej u_int8_t byte2;
77 1.8.2.2 thorpej u_int8_t tea[2]; /* transport element address */
78 1.8.2.2 thorpej u_int8_t src[2]; /* source address */
79 1.8.2.2 thorpej u_int8_t fdst[2]; /* first destination address */
80 1.8.2.2 thorpej u_int8_t sdst[2]; /* second destination address */
81 1.8.2.2 thorpej u_int8_t flags;
82 1.8.2.2 thorpej #define EXCHANGE_MEDIUM_INV1 0x01
83 1.8.2.2 thorpej #define EXCHANGE_MEDIUM_INV2 0x02
84 1.8.2.2 thorpej u_int8_t control;
85 1.8.2.2 thorpej };
86 1.8.2.2 thorpej
87 1.8.2.2 thorpej /*
88 1.8.2.2 thorpej * Cause the medium changer to check all elements for medium and any
89 1.8.2.2 thorpej * other status relevant to the element.
90 1.8.2.2 thorpej */
91 1.8.2.3 thorpej struct scsi_initialize_element_status {
92 1.8.2.2 thorpej u_int8_t opcode;
93 1.8.2.2 thorpej #define INITIALIZE_ELEMENT_STATUS 0x07
94 1.8.2.2 thorpej u_int8_t byte2;
95 1.8.2.2 thorpej u_int8_t reserved[3];
96 1.8.2.2 thorpej u_int8_t control;
97 1.8.2.2 thorpej };
98 1.8.2.2 thorpej
99 1.8.2.2 thorpej /*
100 1.8.2.2 thorpej * Request the changer to move a unit of media from the source element
101 1.8.2.2 thorpej * to the destination element.
102 1.8.2.2 thorpej */
103 1.8.2.2 thorpej struct scsi_move_medium {
104 1.8.2.2 thorpej u_int8_t opcode;
105 1.8.2.2 thorpej #define MOVE_MEDIUM 0xa5
106 1.8.2.2 thorpej u_int8_t byte2;
107 1.8.2.2 thorpej u_int8_t tea[2]; /* transport element address */
108 1.8.2.2 thorpej u_int8_t src[2]; /* source element address */
109 1.8.2.2 thorpej u_int8_t dst[2]; /* destination element address */
110 1.8.2.2 thorpej u_int8_t reserved[2];
111 1.8.2.2 thorpej u_int8_t flags;
112 1.8.2.2 thorpej #define MOVE_MEDIUM_INVERT 0x01
113 1.8.2.2 thorpej u_int8_t control;
114 1.8.2.2 thorpej };
115 1.8.2.2 thorpej
116 1.8.2.2 thorpej /*
117 1.8.2.2 thorpej * Position the specified transport element (picker) in front of
118 1.8.2.2 thorpej * the destination element specified.
119 1.8.2.2 thorpej */
120 1.8.2.2 thorpej struct scsi_position_to_element {
121 1.8.2.2 thorpej u_int8_t opcode;
122 1.8.2.2 thorpej #define POSITION_TO_ELEMENT 0x2b
123 1.8.2.2 thorpej u_int8_t byte2;
124 1.8.2.2 thorpej u_int8_t tea[2]; /* transport element address */
125 1.8.2.2 thorpej u_int8_t dst[2]; /* destination element address */
126 1.8.2.2 thorpej u_int8_t reserved[2];
127 1.8.2.2 thorpej u_int8_t flags;
128 1.8.2.2 thorpej #define POSITION_TO_ELEMENT_INVERT 0x01
129 1.8.2.2 thorpej u_int8_t control;
130 1.8.2.2 thorpej };
131 1.8.2.2 thorpej
132 1.8.2.2 thorpej /*
133 1.8.2.2 thorpej * Request that the changer report the status of its internal elements.
134 1.8.2.2 thorpej */
135 1.8.2.2 thorpej struct scsi_read_element_status {
136 1.8.2.2 thorpej u_int8_t opcode;
137 1.8.2.2 thorpej #define READ_ELEMENT_STATUS 0xb8
138 1.8.2.2 thorpej u_int8_t byte2;
139 1.8.2.2 thorpej #define READ_ELEMENT_STATUS_VOLTAG 0x10 /* report volume tag info */
140 1.8.2.2 thorpej /* ...next 4 bits are an element type code... */
141 1.8.2.2 thorpej u_int8_t sea[2]; /* starting element address */
142 1.8.2.2 thorpej u_int8_t count[2]; /* number of elements */
143 1.8.2.2 thorpej u_int8_t reserved0;
144 1.8.2.2 thorpej u_int8_t len[3]; /* length of data buffer */
145 1.8.2.2 thorpej u_int8_t reserved1;
146 1.8.2.2 thorpej u_int8_t control;
147 1.8.2.2 thorpej };
148 1.8.2.2 thorpej
149 1.8.2.2 thorpej struct scsi_request_volume_element_address {
150 1.8.2.2 thorpej u_int8_t opcode;
151 1.8.2.2 thorpej #define REQUEST_VOLUME_ELEMENT_ADDRESS 0xb5
152 1.8.2.2 thorpej u_int8_t byte2;
153 1.8.2.2 thorpej #define REQUEST_VOLUME_ELEMENT_ADDRESS_VOLTAG 0x10
154 1.8.2.2 thorpej /* ...next 4 bits are an element type code... */
155 1.8.2.2 thorpej u_int8_t eaddr[2]; /* element address */
156 1.8.2.2 thorpej u_int8_t count[2]; /* number of elements */
157 1.8.2.2 thorpej u_int8_t reserved0;
158 1.8.2.2 thorpej u_int8_t len[3]; /* length of data buffer */
159 1.8.2.2 thorpej u_int8_t reserved1;
160 1.8.2.2 thorpej u_int8_t control;
161 1.8.2.2 thorpej };
162 1.8.2.2 thorpej
163 1.8.2.2 thorpej /* XXX scsi_release */
164 1.8.2.2 thorpej
165 1.8.2.2 thorpej /*
166 1.8.2.2 thorpej * Data returned by READ ELEMENT STATUS consists of an 8-byte header
167 1.8.2.2 thorpej * followed by one or more read_element_status_pages.
168 1.8.2.2 thorpej */
169 1.8.2.2 thorpej struct read_element_status_header {
170 1.8.2.2 thorpej u_int8_t fear[2]; /* first element address reported */
171 1.8.2.2 thorpej u_int8_t count[2]; /* number of elements available */
172 1.8.2.2 thorpej u_int8_t reserved;
173 1.8.2.2 thorpej u_int8_t nbytes[3]; /* byte count of all pages */
174 1.8.2.2 thorpej };
175 1.8.2.2 thorpej
176 1.8.2.2 thorpej struct read_element_status_page_header {
177 1.8.2.2 thorpej u_int8_t type; /* element type code; see type codes below */
178 1.8.2.2 thorpej u_int8_t flags;
179 1.8.2.2 thorpej #define READ_ELEMENT_STATUS_AVOLTAG 0x40
180 1.8.2.2 thorpej #define READ_ELEMENT_STATUS_PVOLTAG 0x80
181 1.8.2.2 thorpej u_int8_t edl[2]; /* element descriptor length */
182 1.8.2.2 thorpej u_int8_t reserved;
183 1.8.2.2 thorpej u_int8_t nbytes[3]; /* byte count of all descriptors */
184 1.8.2.2 thorpej };
185 1.8.2.2 thorpej
186 1.8.2.2 thorpej struct read_element_status_descriptor {
187 1.8.2.2 thorpej u_int8_t eaddr[2]; /* element address */
188 1.8.2.2 thorpej u_int8_t flags1;
189 1.8.2.2 thorpej
190 1.8.2.2 thorpej #define READ_ELEMENT_STATUS_FULL 0x01
191 1.8.2.2 thorpej #define READ_ELEMENT_STATUS_IMPEXP 0x02
192 1.8.2.2 thorpej #define READ_ELEMENT_STATUS_EXCEPT 0x04
193 1.8.2.2 thorpej #define READ_ELEMENT_STATUS_ACCESS 0x08
194 1.8.2.2 thorpej #define READ_ELEMENT_STATUS_EXENAB 0x10
195 1.8.2.2 thorpej #define READ_ELEMENT_STATUS_INENAB 0x20
196 1.8.2.2 thorpej
197 1.8.2.2 thorpej #define READ_ELEMENT_STATUS_MT_MASK1 0x05
198 1.8.2.2 thorpej #define READ_ELEMENT_STATUS_ST_MASK1 0x0c
199 1.8.2.2 thorpej #define READ_ELEMENT_STATUS_IE_MASK1 0x3f
200 1.8.2.2 thorpej #define READ_ELEMENT_STATUS_DT_MASK1 0x0c
201 1.8.2.2 thorpej
202 1.8.2.2 thorpej u_int8_t reserved0;
203 1.8.2.2 thorpej u_int8_t sense_code;
204 1.8.2.2 thorpej u_int8_t sense_qual;
205 1.8.2.2 thorpej
206 1.8.2.2 thorpej /*
207 1.8.2.2 thorpej * dt_scsi_flags and dt_scsi_addr are valid only on data transport
208 1.8.2.2 thorpej * elements. These bytes are undefined for all other element types.
209 1.8.2.2 thorpej */
210 1.8.2.2 thorpej u_int8_t dt_scsi_flags;
211 1.8.2.2 thorpej
212 1.8.2.2 thorpej #define READ_ELEMENT_STATUS_DT_LUNMASK 0x07
213 1.8.2.2 thorpej #define READ_ELEMENT_STATUS_DT_LUVALID 0x10
214 1.8.2.2 thorpej #define READ_ELEMENT_STATUS_DT_IDVALID 0x20
215 1.8.2.2 thorpej #define READ_ELEMENT_STATUS_DT_NOTBUS 0x80
216 1.8.2.2 thorpej
217 1.8.2.2 thorpej u_int8_t dt_scsi_addr;
218 1.8.2.2 thorpej
219 1.8.2.2 thorpej u_int8_t reserved1;
220 1.8.2.2 thorpej
221 1.8.2.2 thorpej u_int8_t flags2;
222 1.8.2.2 thorpej #define READ_ELEMENT_STATUS_INVERT 0x40
223 1.8.2.2 thorpej #define READ_ELEMENT_STATUS_SVALID 0x80
224 1.8.2.2 thorpej u_int8_t ssea[2]; /* source storage element address */
225 1.8.2.2 thorpej
226 1.8.2.2 thorpej /*
227 1.8.2.2 thorpej * bytes 12-47: Primary volume tag information.
228 1.8.2.2 thorpej * (field omitted if PVOLTAG = 0)
229 1.8.2.2 thorpej *
230 1.8.2.2 thorpej * bytes 48-83: Alternate volume tag information.
231 1.8.2.2 thorpej * (field omitted if AVOLTAG = 0)
232 1.8.2.2 thorpej *
233 1.8.2.2 thorpej * bytes 84-87: Reserved (moved up if either of the above fields
234 1.8.2.2 thorpej * are omitted)
235 1.8.2.2 thorpej *
236 1.8.2.2 thorpej * bytes 88-end: Vendor-specific: (moved up if either of the
237 1.8.2.2 thorpej * above fields are missing)
238 1.8.2.2 thorpej */
239 1.8.2.2 thorpej };
240 1.8.2.2 thorpej
241 1.8.2.2 thorpej /* XXX add data returned by REQUEST VOLUME ELEMENT ADDRESS */
242 1.8.2.2 thorpej
243 1.8.2.2 thorpej /* Element type codes */
244 1.8.2.2 thorpej #define ELEMENT_TYPE_MASK 0x0f /* Note: these aren't bits */
245 1.8.2.2 thorpej #define ELEMENT_TYPE_ALL 0x00
246 1.8.2.2 thorpej #define ELEMENT_TYPE_MT 0x01
247 1.8.2.2 thorpej #define ELEMENT_TYPE_ST 0x02
248 1.8.2.2 thorpej #define ELEMENT_TYPE_IE 0x03
249 1.8.2.2 thorpej #define ELEMENT_TYPE_DT 0x04
250 1.8.2.2 thorpej
251 1.8.2.2 thorpej /*
252 1.8.2.2 thorpej * XXX The following definitions should be common to all SCSI device types.
253 1.8.2.2 thorpej */
254 1.8.2.2 thorpej #define PGCODE_MASK 0x3f /* valid page number bits in pg_code */
255 1.8.2.2 thorpej #define PGCODE_PS 0x80 /* indicates page is savable */
256 1.8.2.2 thorpej
257 1.8.2.2 thorpej /*
258 1.8.2.2 thorpej * Device capabilities page.
259 1.8.2.2 thorpej *
260 1.8.2.2 thorpej * This page defines characteristics of the elemenet types in the
261 1.8.2.2 thorpej * medium changer device.
262 1.8.2.2 thorpej *
263 1.8.2.2 thorpej * Note in the definitions below, the following abbreviations are
264 1.8.2.2 thorpej * used:
265 1.8.2.2 thorpej * MT Medium transport element (picker)
266 1.8.2.2 thorpej * ST Storage transport element (slot)
267 1.8.2.2 thorpej * IE Import/export element (portal)
268 1.8.2.2 thorpej * DT Data tranfer element (tape/disk drive)
269 1.8.2.2 thorpej */
270 1.8.2.2 thorpej struct page_device_capabilities {
271 1.8.2.2 thorpej u_int8_t pg_code; /* page code (0x1f) */
272 1.8.2.2 thorpej u_int8_t pg_length; /* page length (0x12) */
273 1.8.2.2 thorpej
274 1.8.2.2 thorpej /*
275 1.8.2.2 thorpej * The STOR_xx bits indicate that an element of a given
276 1.8.2.2 thorpej * type may provide independent storage for a unit of
277 1.8.2.2 thorpej * media. The top four bits of this value are reserved.
278 1.8.2.2 thorpej */
279 1.8.2.2 thorpej u_int8_t stor;
280 1.8.2.2 thorpej #define STOR_MT 0x01
281 1.8.2.2 thorpej #define STOR_ST 0x02
282 1.8.2.2 thorpej #define STOR_IE 0x04
283 1.8.2.2 thorpej #define STOR_DT 0x08
284 1.8.2.2 thorpej
285 1.8.2.2 thorpej u_int8_t reserved0;
286 1.8.2.2 thorpej
287 1.8.2.2 thorpej /*
288 1.8.2.2 thorpej * The MOVE_TO_yy bits indicate the changer supports
289 1.8.2.2 thorpej * moving a unit of medium from an element of a given type to an
290 1.8.2.2 thorpej * element of type yy. This is used to determine if a given
291 1.8.2.2 thorpej * MOVE MEDIUM command is legal. The top four bits of each
292 1.8.2.2 thorpej * of these values are reserved.
293 1.8.2.2 thorpej */
294 1.8.2.2 thorpej u_int8_t move_from_mt;
295 1.8.2.2 thorpej u_int8_t move_from_st;
296 1.8.2.2 thorpej u_int8_t move_from_ie;
297 1.8.2.2 thorpej u_int8_t move_from_dt;
298 1.8.2.2 thorpej #define MOVE_TO_MT 0x01
299 1.8.2.2 thorpej #define MOVE_TO_ST 0x02
300 1.8.2.2 thorpej #define MOVE_TO_IE 0x04
301 1.8.2.2 thorpej #define MOVE_TO_DT 0x08
302 1.8.2.2 thorpej
303 1.8.2.2 thorpej u_int8_t reserved1[2];
304 1.8.2.2 thorpej
305 1.8.2.2 thorpej /*
306 1.8.2.2 thorpej * Similar to above, but for EXCHANGE MEDIUM.
307 1.8.2.2 thorpej */
308 1.8.2.2 thorpej u_int8_t exchange_with_mt;
309 1.8.2.2 thorpej u_int8_t exchange_with_st;
310 1.8.2.2 thorpej u_int8_t exchange_with_ie;
311 1.8.2.2 thorpej u_int8_t exchange_with_dt;
312 1.8.2.2 thorpej #define EXCHANGE_WITH_MT 0x01
313 1.8.2.2 thorpej #define EXCHANGE_WITH_ST 0x02
314 1.8.2.2 thorpej #define EXCHANGE_WITH_IE 0x04
315 1.8.2.2 thorpej #define EXCHANGE_WITH_DT 0x08
316 1.8.2.2 thorpej };
317 1.8.2.2 thorpej
318 1.8.2.2 thorpej /*
319 1.8.2.2 thorpej * Medium changer elemement address assignment page.
320 1.8.2.2 thorpej *
321 1.8.2.2 thorpej * Some of these fields can be a little confusing, so an explanation
322 1.8.2.2 thorpej * is in order.
323 1.8.2.2 thorpej *
324 1.8.2.2 thorpej * Each component within a a medium changer apparatus is called an
325 1.8.2.2 thorpej * "element".
326 1.8.2.2 thorpej *
327 1.8.2.2 thorpej * The "medium transport element address" is the address of the first
328 1.8.2.2 thorpej * picker (robotic arm). "Number of medium transport elements" tells
329 1.8.2.2 thorpej * us how many pickers exist in the changer.
330 1.8.2.2 thorpej *
331 1.8.2.2 thorpej * The "first storage element address" is the address of the first
332 1.8.2.2 thorpej * slot in the tape or disk magazine. "Number of storage elements" tells
333 1.8.2.2 thorpej * us how many slots exist in the changer.
334 1.8.2.2 thorpej *
335 1.8.2.2 thorpej * The "first import/export element address" is the address of the first
336 1.8.2.2 thorpej * medium portal accessible both by the medium changer and an outside
337 1.8.2.2 thorpej * human operator. This is where the changer might deposit tapes destined
338 1.8.2.2 thorpej * for some vault. The "number of import/export elements" tells us
339 1.8.2.2 thorpej * not many of these portals exist in the changer. NOTE: this number may
340 1.8.2.2 thorpej * be 0.
341 1.8.2.2 thorpej *
342 1.8.2.2 thorpej * The "first data transfer element address" is the address of the first
343 1.8.2.2 thorpej * tape or disk drive in the changer. "Number of data transfer elements"
344 1.8.2.2 thorpej * tells us how many drives exist in the changer.
345 1.8.2.2 thorpej */
346 1.8.2.2 thorpej struct page_element_address_assignment {
347 1.8.2.2 thorpej u_int8_t pg_code; /* page code (0x1d) */
348 1.8.2.2 thorpej u_int8_t pg_length; /* page length (0x12) */
349 1.8.2.2 thorpej
350 1.8.2.2 thorpej /* Medium transport element address */
351 1.8.2.2 thorpej u_int8_t mtea[2];
352 1.8.2.2 thorpej
353 1.8.2.2 thorpej /* Number of medium transport elements */
354 1.8.2.2 thorpej u_int8_t nmte[2];
355 1.8.2.2 thorpej
356 1.8.2.2 thorpej /* First storage element address */
357 1.8.2.2 thorpej u_int8_t fsea[2];
358 1.8.2.2 thorpej
359 1.8.2.2 thorpej /* Number of storage elements */
360 1.8.2.2 thorpej u_int8_t nse[2];
361 1.8.2.2 thorpej
362 1.8.2.2 thorpej /* First import/export element address */
363 1.8.2.2 thorpej u_int8_t fieea[2];
364 1.8.2.2 thorpej
365 1.8.2.2 thorpej /* Number of import/export elements */
366 1.8.2.2 thorpej u_int8_t niee[2];
367 1.8.2.2 thorpej
368 1.8.2.2 thorpej /* First data transfer element address */
369 1.8.2.2 thorpej u_int8_t fdtea[2];
370 1.8.2.2 thorpej
371 1.8.2.2 thorpej /* Number of data trafer elements */
372 1.8.2.2 thorpej u_int8_t ndte[2];
373 1.8.2.2 thorpej
374 1.8.2.2 thorpej u_int8_t reserved[2];
375 1.8.2.2 thorpej };
376 1.8.2.2 thorpej
377 1.8.2.2 thorpej /*
378 1.8.2.2 thorpej * Transport geometry parameters page.
379 1.8.2.2 thorpej *
380 1.8.2.2 thorpej * Defines whether each medium transport element is a member of a set of
381 1.8.2.2 thorpej * elements that share a common robotics subsystem and whether the element
382 1.8.2.2 thorpej * is capable of media rotation. One transport geometry descriptor is
383 1.8.2.2 thorpej * transferred for each medium transport element, beginning with the first
384 1.8.2.2 thorpej * medium transport element (other than the default transport element address
385 1.8.2.2 thorpej * of 0).
386 1.8.2.2 thorpej */
387 1.8.2.2 thorpej struct page_transport_geometry_parameters {
388 1.8.2.2 thorpej u_int8_t pg_code; /* page code (0x1e) */
389 1.8.2.2 thorpej u_int8_t pg_length; /* page length; variable */
390 1.8.2.2 thorpej
391 1.8.2.2 thorpej /* Transport geometry descriptor(s) are here. */
392 1.8.2.2 thorpej
393 1.8.2.2 thorpej u_int8_t misc;
394 1.8.2.2 thorpej #define CAN_ROTATE 0x01
395 1.8.2.2 thorpej
396 1.8.2.2 thorpej /* Member number in transport element set. */
397 1.8.2.2 thorpej u_int8_t member;
398 1.8.2.2 thorpej };
399 1.8.2.2 thorpej
400 1.8.2.2 thorpej #endif /* _SCSI_SCSI_CHANGER_H */
401