Commit | Line | Data |
---|---|---|
15637ed4 RG |
1 | /* |
2 | * SCSI changer interface description | |
3 | */ | |
4 | ||
5 | /* | |
6 | * Written by Stefan Grefen (grefen@goofy.zdv.uni-mainz.de soon grefen@convex.com) | |
7 | * based on the SCSI System by written Julian Elischer (julian@tfs.com) | |
8 | * for TRW Financial Systems. | |
9 | * | |
10 | * TRW Financial Systems, in accordance with their agreement with Carnegie | |
11 | * Mellon University, makes this software available to CMU to distribute | |
12 | * or use in any manner that they see fit as long as this message is kept with | |
13 | * the software. For this reason TFS also grants any other persons or | |
14 | * organisations permission to use or modify this software. | |
15 | * | |
16 | * TFS supplies this software to be publicly redistributed | |
17 | * on the understanding that TFS is not responsible for the correct | |
18 | * functioning of this software in any circumstances. | |
19 | * | |
15637ed4 | 20 | * Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992 |
98639498 RG |
21 | * |
22 | * $Id$ | |
15637ed4 RG |
23 | */ |
24 | ||
25 | /* | |
26 | * SCSI command format | |
27 | */ | |
28 | struct scsi_read_element_status | |
29 | { | |
30 | u_char op_code; | |
869c4419 RG |
31 | u_char byte2; |
32 | #define SRES_ELEM_TYPE_CODE 0x0F | |
33 | #define SRES_ELEM_VOLTAG 0x10 | |
15637ed4 RG |
34 | u_char starting_element_addr[2]; |
35 | u_char number_of_elements[2]; | |
36 | u_char resv1; | |
37 | u_char allocation_length[3]; | |
38 | u_char resv2; | |
869c4419 | 39 | u_char control; |
15637ed4 RG |
40 | }; |
41 | #define RE_ALL_ELEMENTS 0 | |
42 | #define RE_MEDIUM_TRANSPORT_ELEMENT 1 | |
43 | #define RE_STORAGE_ELEMENT 2 | |
44 | #define RE_IMPORT_EXPORT 3 | |
45 | #define RE_DATA_TRANSFER_ELEMENT 4 | |
46 | ||
47 | struct scsi_move_medium | |
48 | { | |
49 | u_char op_code; | |
869c4419 | 50 | u_char byte2; |
15637ed4 RG |
51 | u_char transport_element_address[2]; |
52 | u_char source_address[2]; | |
53 | u_char destination_address[2]; | |
54 | u_char rsvd[2]; | |
869c4419 RG |
55 | u_char invert; |
56 | u_char control; | |
15637ed4 RG |
57 | }; |
58 | ||
59 | struct scsi_position_to_element | |
60 | { | |
61 | u_char op_code; | |
869c4419 | 62 | u_char byte2; |
15637ed4 RG |
63 | u_char transport_element_address[2]; |
64 | u_char source_address[2]; | |
65 | u_char rsvd[2]; | |
869c4419 RG |
66 | u_char invert; |
67 | u_char control; | |
15637ed4 RG |
68 | }; |
69 | ||
70 | /* | |
71 | * Opcodes | |
72 | */ | |
73 | #define POSITION_TO_ELEMENT 0x2b | |
74 | #define MOVE_MEDIUM 0xa5 | |
75 | #define READ_ELEMENT_STATUS 0xb8 | |
76 | ||
77 | struct scsi_element_status_data | |
78 | { | |
79 | u_char first_element_reported[2]; | |
80 | u_char number_of_elements_reported[2]; | |
81 | u_char rsvd; | |
82 | u_char byte_count_of_report[3]; | |
83 | }; | |
84 | ||
85 | struct element_status_page | |
86 | { | |
87 | u_char element_type_code; | |
869c4419 RG |
88 | u_char flags; |
89 | #define ESP_AVOLTAG 0x40 | |
90 | #define ESP_PVOLTAG 0x80 | |
15637ed4 RG |
91 | u_char element_descriptor_length[2]; |
92 | u_char rsvd; | |
93 | u_char byte_count_of_descriptor_data[3]; | |
94 | }; | |
95 |