1 #ifndef _LINUX_SCSI_H
2 #define _LINUX_SCSI_H
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 #define TEST_UNIT_READY 0x00
22 #define REZERO_UNIT 0x01
23 #define REQUEST_SENSE 0x03
24 #define FORMAT_UNIT 0x04
25 #define READ_BLOCK_LIMITS 0x05
26 #define REASSIGN_BLOCKS 0x07
27 #define READ_6 0x08
28 #define WRITE_6 0x0a
29 #define SEEK_6 0x0b
30 #define READ_REVERSE 0x0f
31 #define WRITE_FILEMARKS 0x10
32 #define SPACE 0x11
33 #define INQUIRY 0x12
34 #define RECOVER_BUFFERED_DATA 0x14
35 #define MODE_SELECT 0x15
36 #define RESERVE 0x16
37 #define RELEASE 0x17
38 #define COPY 0x18
39 #define ERASE 0x19
40 #define MODE_SENSE 0x1a
41 #define START_STOP 0x1b
42 #define RECEIVE_DIAGNOSTIC 0x1c
43 #define SEND_DIAGNOSTIC 0x1d
44 #define ALLOW_MEDIUM_REMOVAL 0x1e
45
46 #define SET_WINDOW 0x24
47 #define READ_CAPACITY 0x25
48 #define READ_10 0x28
49 #define WRITE_10 0x2a
50 #define SEEK_10 0x2b
51 #define WRITE_VERIFY 0x2e
52 #define VERIFY 0x2f
53 #define SEARCH_HIGH 0x30
54 #define SEARCH_EQUAL 0x31
55 #define SEARCH_LOW 0x32
56 #define SET_LIMITS 0x33
57 #define PRE_FETCH 0x34
58 #define READ_POSITION 0x34
59 #define SYNCHRONIZE_CACHE 0x35
60 #define LOCK_UNLOCK_CACHE 0x36
61 #define READ_DEFECT_DATA 0x37
62 #define MEDIUM_SCAN 0x38
63 #define COMPARE 0x39
64 #define COPY_VERIFY 0x3a
65 #define WRITE_BUFFER 0x3b
66 #define READ_BUFFER 0x3c
67 #define UPDATE_BLOCK 0x3d
68 #define READ_LONG 0x3e
69 #define WRITE_LONG 0x3f
70 #define CHANGE_DEFINITION 0x40
71 #define WRITE_SAME 0x41
72 #define LOG_SELECT 0x4c
73 #define LOG_SENSE 0x4d
74 #define MODE_SELECT_10 0x55
75 #define MODE_SENSE_10 0x5a
76 #define READ_12 0xa8
77 #define WRITE_12 0xaa
78 #define WRITE_VERIFY_12 0xae
79 #define SEARCH_HIGH_12 0xb0
80 #define SEARCH_EQUAL_12 0xb1
81 #define SEARCH_LOW_12 0xb2
82 #define SEND_VOLUME_TAG 0xb6
83 #define WRITE_LONG_2 0xea
84
85
86
87
88
89 #define GOOD 0x00
90 #define CHECK_CONDITION 0x01
91 #define CONDITION_GOOD 0x02
92 #define BUSY 0x04
93 #define INTERMEDIATE_GOOD 0x08
94 #define INTERMEDIATE_C_GOOD 0x0a
95 #define RESERVATION_CONFLICT 0x0c
96 #define QUEUE_FULL 0x1a
97
98 #define STATUS_MASK 0x1e
99
100
101
102
103
104 #define NO_SENSE 0x00
105 #define RECOVERED_ERROR 0x01
106 #define NOT_READY 0x02
107 #define MEDIUM_ERROR 0x03
108 #define HARDWARE_ERROR 0x04
109 #define ILLEGAL_REQUEST 0x05
110 #define UNIT_ATTENTION 0x06
111 #define DATA_PROTECT 0x07
112 #define BLANK_CHECK 0x08
113 #define COPY_ABORTED 0x0a
114 #define ABORTED_COMMAND 0x0b
115 #define VOLUME_OVERFLOW 0x0d
116 #define MISCOMPARE 0x0e
117
118
119
120
121
122
123 #define TYPE_DISK 0x00
124 #define TYPE_TAPE 0x01
125 #define TYPE_PROCESSOR 0x03
126 #define TYPE_WORM 0x04
127 #define TYPE_ROM 0x05
128 #define TYPE_SCANNER 0x06
129 #define TYPE_MOD 0x07
130
131 #define TYPE_NO_LUN 0x7f
132
133
134
135
136
137
138 #define COMMAND_COMPLETE 0x00
139 #define EXTENDED_MESSAGE 0x01
140 #define EXTENDED_MODIFY_DATA_POINTER 0x00
141 #define EXTENDED_SDTR 0x01
142 #define EXTENDED_EXTENDED_IDENTIFY 0x02
143 #define EXTENDED_WDTR 0x03
144 #define SAVE_POINTERS 0x02
145 #define RESTORE_POINTERS 0x03
146 #define DISCONNECT 0x04
147 #define INITIATOR_ERROR 0x05
148 #define ABORT 0x06
149 #define MESSAGE_REJECT 0x07
150 #define NOP 0x08
151 #define MSG_PARITY_ERROR 0x09
152 #define LINKED_CMD_COMPLETE 0x0a
153 #define LINKED_FLG_CMD_COMPLETE 0x0b
154 #define BUS_DEVICE_RESET 0x0c
155
156 #define INITIATE_RECOVERY 0x0f
157 #define RELEASE_RECOVERY 0x10
158
159 #define SIMPLE_QUEUE_TAG 0x20
160 #define HEAD_OF_QUEUE_TAG 0x21
161 #define ORDERED_QUEUE_TAG 0x22
162
163
164
165
166
167
168 #define SCSI_IOCTL_GET_IDLUN 0x5382
169
170
171
172 #define SCSI_IOCTL_TAGGED_ENABLE 0x5383
173 #define SCSI_IOCTL_TAGGED_DISABLE 0x5384
174
175
176 #define SCSI_IOCTL_PROBE_HOST 0x5385
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198 #endif