Added SERVICE ACTION IN in scst_scsi_op_table
[mirror/scst/.git] / scst / src / scst_cdbprobe.h
1 /*
2  *  scst_cdbprobe.h
3  *  
4  *  Copyright (C) 2004-2006 Vladislav Bolkhovitin <vst@vlnb.net>
5  *                 and Leonid Stoljar
6  *  
7  *  This program is free software; you can redistribute it and/or
8  *  modify it under the terms of the GNU General Public License
9  *  as published by the Free Software Foundation, version 2
10  *  of the License.
11  * 
12  *  This program is distributed in the hope that it will be useful,
13  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  *  GNU General Public License for more details.
16  */
17  
18 /* Must be included in only one .c file in the project!! */
19
20 #ifndef __SCST_CDBPROBE_H
21 #define __SCST_CDBPROBE_H
22
23 #define SCST_BLOCK_LIMIT_LEN                6
24
25 /*
26 +=====================================-============-======-
27 |  Command name                       | Operation  | Type |
28 |                                     |   code     |      |
29 |-------------------------------------+------------+------+
30
31 +=========================================================+
32 |Key:  M = command implementation is mandatory.           |
33 |      O = command implementation is optional.            |
34 |      V = Vendor-specific                                | 
35 |      R = Reserved                                       |
36 |     ' '= DON'T use for this device                      |
37 +=========================================================+
38 */
39
40 #define SCST_CDB_MANDATORY  'M' /* mandatory */
41 #define SCST_CDB_OPTIONAL   'O' /* optional  */
42 #define SCST_CDB_VENDOR     'V' /* vendor    */
43 #define SCST_CDB_RESERVED   'R' /* reserved  */
44 #define SCST_CDB_NOTSUPP    ' ' /* don't use */
45
46 struct scst_sdbops
47 {
48         uint8_t ops;            /* SCSI-2 op codes */
49         uint8_t devkey[16];     /* Key for every device type M,O,V,R
50                                  * type_disk      devkey[0]
51                                  * type_tape      devkey[1]
52                                  * type_printer   devkey[2]
53                                  * type_proseccor devkey[3]
54                                  * type_worm      devkey[4]
55                                  * type_cdrom     devkey[5]
56                                  * type_scanner   devkey[6]
57                                  * type_mod       devkey[7]
58                                  * type_changer   devkey[8]
59                                  * type_commdev   devkey[9]
60                                  * type_reserv    devkey[A]
61                                  * type_reserv    devkey[B]
62                                  * type_raid      devkey[C]
63                                  * type_enclosure devkey[D]
64                                  * type_reserv    devkey[E]
65                                  * type_reserv    devkey[F]
66                                  */
67         const char *op_name;    /* SCSI-2 op codes full name */
68         uint8_t direction;      /* init   --> target: SCST_DATA_WRITE
69                                  * target --> init:   SCST_DATA_READ
70                                  */
71         uint8_t size_field_len; /* how many bytes using for data */
72         uint8_t fixed;          /* opcode --  have fixed variable bit ??? */
73         uint8_t flag1;          /* Note 1 */
74         uint8_t flag2;
75 };
76
77 static int scst_scsi_op_list[256];
78
79 static const struct scst_sdbops scst_scsi_op_table[] = {
80         /*
81          *      +-------------------> TYPE_IS_DISK      (0)
82          *      |
83          *      |+------------------> TYPE_IS_TAPE      (1)
84          *      ||
85          *      || +----------------> TYPE_IS_PROCESSOR (3)
86          *      || |
87          *      || | +--------------> TYPE_IS_CDROM     (5)
88          *      || | |
89          *      || | | +------------> TYPE_IS_MOD       (7)
90          *      || | | |
91          *      || | | |+-----------> TYPE_IS_CHANGER   (8)
92          *      || | | ||
93          *      || | | ||   +-------> TYPE_IS_RAID      (C)
94          *      || | | ||   |
95          *      || | | ||   |
96          *      0123456789ABCDEF ---> TYPE_IS_????     */
97         {0x00, "MMMMMMMMMMMMMMMM", "TEST UNIT READY",
98          SCST_DATA_NONE, 0, SCST_SMALL_TIMEOUT, 0, 0},
99         {0x01, " M              ", "REWIND",
100          SCST_DATA_NONE, 0, SCST_LONG_TIMEOUT, 0, 0},
101         {0x01, "O V OO OO       ", "REZERO UNIT",
102          SCST_DATA_NONE, 0, 0, 0, 0},
103         {0x02, "VVVVVV  V       ", "REQUEST BLOCK ADDR",
104          SCST_DATA_NONE, 0, SCST_SMALL_TIMEOUT, 0, 0},
105         {0x03, "MMMMMMMMMMMMMMMM", "REQUEST SENSE",
106          SCST_DATA_READ, 1, SCST_SMALL_TIMEOUT, 0, 0},
107         {0x04, "M    O O        ", "FORMAT UNIT",
108          SCST_DATA_NONE, 0, SCST_LONG_TIMEOUT, 0, 0},     /*-*/
109         {0x04, "  O             ", "FORMAT",
110          SCST_DATA_NONE, 0, 0, 0, 0},
111         {0x05, "VMVVVV  V       ", "READ BLOCK LIMITS",
112          SCST_DATA_READ, 1, SCST_SMALL_TIMEOUT, 0, 0},
113         {0x06, "VVVVVV  V       ", "",
114          SCST_DATA_NONE, 0, 0, 0, 0},
115         {0x07, "        O       ", "INITIALIZE ELEMENT STATUS",
116          SCST_DATA_NONE, 0, SCST_LONG_TIMEOUT, 0, 0},
117         {0x07, "OVV O  OV       ", "REASSIGN BLOCKS",
118          SCST_DATA_NONE, 0, 0, 0, 0},                    /*-*/
119         {0x08, "O               ", "READ(6)",
120          SCST_DATA_READ, 1, SCST_TRANSFER_LEN_TYPE_FIXED, 0, 0},
121         {0x08, " MV OO OV       ", "READ(6)",
122          SCST_DATA_READ, 3, SCST_TRANSFER_LEN_TYPE_FIXED, 0, 0},
123         {0x08, "         M      ", "GET MESSAGE(6)",
124          SCST_DATA_READ, 3, 0, 0, 0},
125         {0x08, "    O           ", "RECEIVE",
126          SCST_DATA_READ, 3, 0, 0, 0},
127         {0x09, "VVVVVV  V       ", "",
128          SCST_DATA_NONE, 0, 0, 0, 0},
129         {0x0A, "O               ", "WRITE(6)",
130          SCST_DATA_WRITE, 1, SCST_TRANSFER_LEN_TYPE_FIXED, 0, 0},
131         {0x0A, " M  O  OV       ", "WRITE(6)",
132          SCST_DATA_WRITE, 3, SCST_TRANSFER_LEN_TYPE_FIXED, 0, 0},
133         {0x0A, "  M             ", "PRINT",
134          SCST_DATA_NONE, 0, 0, 0, 0},
135         {0x0A, "         M      ", "SEND MESSAGE(6)",
136          SCST_DATA_WRITE, 3, 0, 0, 0},
137         {0x0A, "    M           ", "SEND(6)",
138          SCST_DATA_WRITE, 3, 0, 0, 0},
139         {0x0B, "O   OO OV       ", "SEEK(6)",
140          SCST_DATA_NONE, 0, 0, 0, 0},
141         {0x0B, "                ", "TRACK SELECT",
142          SCST_DATA_NONE, 0, 0, 0, 0},
143         {0x0B, "  O             ", "SLEW AND PRINT",
144          SCST_DATA_NONE, 0, 0, 0, 0},
145         {0x0C, "VVVVVV  V       ", "SEEK BLOCK",
146          SCST_DATA_NONE, 0, SCST_LONG_TIMEOUT, 0, 0},
147         {0x0D, "VVVVVV  V       ", "PARTITION",
148          SCST_DATA_NONE, 0, SCST_LONG_TIMEOUT, 0, 0},
149         {0x0E, "VVVVVV  V       ", "",
150          SCST_DATA_NONE, 0, 0, 0, 0},
151         {0x0F, "VOVVVV  V       ", "READ REVERSE",
152          SCST_DATA_READ, 3, SCST_TRANSFER_LEN_TYPE_FIXED, 0, 0},
153         {0x10, "VM V V          ", "WRITE FILEMARKS",
154          SCST_DATA_NONE, 0, 0, 0, 0},
155         {0x10, "  O O           ", "SYNCHRONIZE BUFFER",
156          SCST_DATA_NONE, 0, 0, 0, 0},
157         {0x11, "VMVVVV          ", "SPACE",
158          SCST_DATA_NONE, 0, SCST_LONG_TIMEOUT, 0, 0},
159         {0x12, "MMMMMMMMMMMMMMMM", "INQUIRY",
160          SCST_DATA_READ, 1, SCST_SMALL_TIMEOUT, 0, 0},
161         {0x13, "VOVVVV          ", "VERIFY(6)",
162          SCST_DATA_WRITE, 3, SCST_TRANSFER_LEN_TYPE_FIXED, 0, 0},
163         {0x14, "VOOVVV          ", "RECOVER BUFFERED DATA",
164          SCST_DATA_READ, 3, SCST_TRANSFER_LEN_TYPE_FIXED, 0, 0},
165         {0x15, "OMOOOOOOOOOOOOOO", "MODE SELECT(6)",
166          SCST_DATA_WRITE, 1, 0, 0, 0},  /*N6! */
167         {0x16, "MMMMMMMMMMMMMMMM", "RESERVE",
168          SCST_DATA_NONE, 0, SCST_SMALL_TIMEOUT, 0, 0},
169         {0x17, "MMMMMMMMMMMMMMMM", "RELEASE",
170          SCST_DATA_NONE, 0, SCST_SMALL_TIMEOUT, 0, 0},
171         {0x18, "OOOOOOOO        ", "COPY",
172          SCST_DATA_WRITE, 1, SCST_LONG_TIMEOUT, 0, 0},  /*N5! */
173         {0x19, "VMVVVV          ", "ERASE",
174          SCST_DATA_NONE, 0, SCST_LONG_TIMEOUT, 0, 0},
175         {0x1A, "OMOOOOOOOOOOOOOO", "MODE SENSE(6)",
176          SCST_DATA_READ, 1, SCST_SMALL_TIMEOUT, 0, 0},
177         {0x1B, "      O         ", "SCAN",
178          SCST_DATA_NONE, 0, 0, 0, 0},
179         {0x1B, " O              ", "LOAD UNLOAD",
180          SCST_DATA_NONE, 0, SCST_LONG_TIMEOUT, 0, 0},
181         {0x1B, "  O             ", "STOP PRINT",
182          SCST_DATA_NONE, 0, 0, 0, 0},
183         {0x1B, "O   OO O    O   ", "STOP START UNIT",
184          SCST_DATA_NONE, 0, SCST_LONG_TIMEOUT, 0, 0},
185         {0x1C, "OOOOOOOOOOOOOOOO", "RECEIVE DIAGNOSTIC RESULTS",
186          SCST_DATA_READ, 1, 0, 0, 0},
187         {0x1D, "MMMMMMMMMMMMMMMM", "SEND DIAGNOSTIC",
188          SCST_DATA_WRITE, 1, 0, 0, 0},
189         {0x1E, "OOOOOOOOOOOOOOOO", "PREVENT ALLOW MEDIUM REMOVAL",
190          SCST_DATA_NONE, 0, SCST_LONG_TIMEOUT, 0, 0},
191         {0x1F, "            O   ", "PORT STATUS",
192          SCST_DATA_NONE, 0, 0, 0, 0},
193         /* 10-bytes length CDB */
194         {0x20, "V   VV V        ", "",
195          SCST_DATA_NONE, 0, 0, 0, 0},
196         {0x21, "V   VV V        ", "",
197          SCST_DATA_NONE, 0, 0, 0, 0},
198         {0x22, "V   VV V        ", "",
199          SCST_DATA_NONE, 0, 0, 0, 0},
200         {0x23, "V   VV V        ", "READ FORMAT CAPACITY",
201          SCST_DATA_READ, 2, 0, 0, 0},
202         {0x24, "V   VVM         ", "SET WINDOW",
203          SCST_DATA_WRITE, 3, 0, 0, 0},                   /*-*/
204         {0x25, "M   MM M        ", "READ CAPACITY",
205          SCST_DATA_READ, 0, 0, 0, 0},
206         {0x25, "      O         ", "GET WINDOW",
207          SCST_DATA_READ, 3, 0, 0, 0},
208         {0x26, "V   VV          ", "",
209          SCST_DATA_NONE, 0, 0, 0, 0},
210         {0x27, "V   VV          ", "",
211          SCST_DATA_NONE, 0, 0, 0, 0},
212         {0x28, "M   MMMM        ", "READ(10)",
213          SCST_DATA_READ, 2, SCST_TRANSFER_LEN_TYPE_FIXED, 0, 0},
214         {0x28, "         O      ", "GET MESSAGE(10)",
215          SCST_DATA_READ, 2, 0, 0, 0},
216         {0x29, "V   VV O        ", "READ GENERATION",
217          SCST_DATA_READ, 1, 0, 0, 0},
218         {0x2A, "O   MO M        ", "WRITE(10)",
219          SCST_DATA_WRITE, 2, SCST_TRANSFER_LEN_TYPE_FIXED, 0, 0},
220         {0x2A, "         O      ", "SEND MESSAGE(10)",
221          SCST_DATA_WRITE, 2, 0, 0, 0},
222         {0x2A, "      O         ", "SEND(10)",
223          SCST_DATA_WRITE, 2, 0, 0, 0},
224         {0x2B, " O              ", "LOCATE",
225          SCST_DATA_NONE, 0, SCST_LONG_TIMEOUT, 0, 0},
226         {0x2B, "        O       ", "POSITION TO ELEMENT",
227          SCST_DATA_NONE, 0, SCST_LONG_TIMEOUT, 0, 0},
228         {0x2B, "O   OO O        ", "SEEK(10)",
229          SCST_DATA_NONE, 0, 0, 0, 0},
230         {0x2C, "V    O O        ", "ERASE(10)",
231          SCST_DATA_NONE, 0, SCST_LONG_TIMEOUT, 0, 0},
232         {0x2D, "V   O  O        ", "READ UPDATED BLOCK",
233          SCST_DATA_READ, 1, 0, 0, 0},   /*N2! */
234         {0x2E, "O   OO O        ", "WRITE AND VERIFY(10)",
235          SCST_DATA_WRITE, 2, SCST_TRANSFER_LEN_TYPE_FIXED, 0, 0},
236         {0x2F, "O   OO O        ", "VERIFY(10)",
237          SCST_DATA_WRITE, 2, SCST_TRANSFER_LEN_TYPE_FIXED, 0, 0},
238                                                           /*-*/
239         {0x30, "O   OO O        ", "SEARCH DATA HIGH(10)",
240          SCST_DATA_NONE, 0, SCST_UNKNOWN_LENGTH, 1, 0},   /*-*/
241         {0x31, "      O         ", "OBJECT POSITION",
242          SCST_DATA_NONE, 0, SCST_UNKNOWN_LENGTH, 1, 0}, /*N1! */
243         {0x31, "O   OO O        ", "SEARCH DATA EQUAL(10)",
244          SCST_DATA_NONE, 0, SCST_UNKNOWN_LENGTH, 1, 0},   /*-*/
245         {0x32, "O   OO O        ", "SEARCH DATA LOW(10)",
246          SCST_DATA_NONE, 0, SCST_UNKNOWN_LENGTH, 1, 0},   /*-*/
247         {0x33, "O   OO O        ", "SET LIMITS(10)",
248          SCST_DATA_NONE, 0, 0, 0, 0},
249         {0x34, " O              ", "READ POSITION",
250          SCST_DATA_READ, 1, SCST_SMALL_TIMEOUT, 0, 0},  /*N4! */
251         {0x34, "      O         ", "GET DATA BUFFER STATUS",
252          SCST_DATA_READ, 2, 0, 0, 0},
253         {0x34, "O   OO O        ", "PRE-FETCH",
254          SCST_DATA_NONE, 0, 0, 0, 0},
255         {0x35, "O   OO O        ", "SYNCHRONIZE CACHE",
256          SCST_DATA_NONE, 0, 0, 0, 0},
257         {0x36, "O   OO O        ", "LOCK UNLOCK CACHE",
258          SCST_DATA_NONE, 0, 0, 0, 0},
259         {0x37, "O      O        ", "READ DEFECT DATA(10)",
260          SCST_DATA_READ, 1, 0, 0, 0},
261         {0x38, "    O  O        ", "MEDIUM SCAN",
262          SCST_DATA_READ, 1, 0, 0, 0},                    /*-*/
263         {0x39, "OOOOOOOO        ", "COMPARE",
264          SCST_DATA_WRITE, 1, 0, 0, 0},  /*N3! */
265         {0x3A, "OOOOOOOO        ", "COPY AND VERIFY",
266          SCST_DATA_WRITE, 1, 0, 0, 0},  /*N3!? */
267         {0x3B, "OOOOOOOOOOOOOOOO", "WRITE BUFFER",
268          SCST_DATA_WRITE, 3, SCST_SMALL_TIMEOUT, 0, 0},
269         {0x3C, "OOOOOOOOOOOOOOOO", "READ BUFFER",
270          SCST_DATA_READ, 3, SCST_SMALL_TIMEOUT, 0, 0},
271         {0x3D, "    O  O        ", "UPDATE BLOCK",
272          SCST_DATA_WRITE, 1, SCST_TRANSFER_LEN_TYPE_FIXED, 0, 0},      /*N2! */
273         {0x3E, "O   OO O        ", "READ LONG",
274          SCST_DATA_READ, 1, 0, 0, 0},   /*N6! */
275         {0x3F, "O   O  O        ", "WRITE LONG",
276          SCST_DATA_WRITE, 1, 0, 0, 0},  /*N6! */
277         {0x40, "OOOOOOOOOO      ", "CHANGE DEFINITION",
278          SCST_DATA_WRITE, 1, SCST_SMALL_TIMEOUT, 0, 0},
279         {0x41, "O    O          ", "WRITE SAME",
280          SCST_DATA_WRITE, 0, SCST_UNKNOWN_LENGTH, 1, 0},        /*N2! */
281         {0x42, "     O          ", "READ SUB-CHANNEL",
282          SCST_DATA_READ, 2, 0, 0, 0},
283         {0x43, "     O          ", "READ TOC/PMA/ATIP",
284          SCST_DATA_READ, 2, 0, 0, 0},
285         {0x44, "     O          ", "READ HEADER",
286          SCST_DATA_READ, 2, 0, 0, 0},
287         {0x45, "     O          ", "PLAY AUDIO(10)",
288          SCST_DATA_READ, 2, SCST_TRANSFER_LEN_TYPE_FIXED, 0, 0},       /*N8! */
289         {0x46, "     O          ", "GET CONFIGURATION",
290          SCST_DATA_READ, 2, 0, 0, 0},
291         {0x47, "     O          ", "PLAY AUDIO MSF",
292          SCST_DATA_READ, 0, SCST_UNKNOWN_LENGTH, 1, 0}, /*? */
293         {0x48, "     O          ", "PLAY AUDIO TRACK INDEX",
294          SCST_DATA_READ, 0, SCST_UNKNOWN_LENGTH, 1, 0}, /*? */
295         {0x49, "     O          ", "PLAY TRACK RELATIVE(10)",
296          SCST_DATA_READ, 2, SCST_TRANSFER_LEN_TYPE_FIXED, 0, 0},       /*N8! */
297         {0x4A, "     O          ", "GET EVENT STATUS NOTIFICATION",
298          SCST_DATA_READ, 2, 0, 0, 0},
299         {0x4B, "     O          ", "PAUSE/RESUME",
300          SCST_DATA_NONE, 0, 0, 0, 0},
301         {0x4C, "OOOOOOOOOOOOOOOO", "LOG SELECT",
302          SCST_DATA_WRITE, 2, SCST_SMALL_TIMEOUT, 0, 0}, /*N6! */
303         {0x4D, "OOOOOOOOOOOOOOOO", "LOG SENSE",
304          SCST_DATA_READ, 2, SCST_SMALL_TIMEOUT, 0, 0},  /*N6! */
305         {0x4E, "     O          ", "STOP PLAY/SCAN",
306          SCST_DATA_NONE, 0, 0, 0, 0},
307         {0x4F, "                ", "",
308          SCST_DATA_NONE, 0, 0, 0, 0},
309         {0x50, "                ", "XDWRITE",
310          SCST_DATA_NONE, 0, 0, 0, 0},                    /*-*/
311         {0x51, "     O          ", "READ DISC INFORMATION",
312          SCST_DATA_READ, 2, 0, 0, 0},
313         {0x51, "                ", "XPWRITE",
314          SCST_DATA_NONE, 0, 0, 0, 0},                    /*-*/
315         {0x52, "     O          ", "READ TRACK INFORMATION",
316          SCST_DATA_READ, 2, 0, 0, 0},
317         {0x53, "     O          ", "RESERVE TRACK",
318          SCST_DATA_NONE, 0, 0, 0, 0},
319         {0x54, "     O          ", "SEND OPC INFORMATION",
320          SCST_DATA_WRITE, 2, 0, 0, 0},
321         {0x55, "OOOOOOOOOOOOOOOO", "MODE SELECT(10)",
322          SCST_DATA_WRITE, 2, 0, 0, 0},
323         {0x56, "OOOOOOOOOOOOOOOO", "RESERVE(10)",
324          SCST_DATA_NONE, 0, SCST_SMALL_TIMEOUT, 0, 0},
325         {0x57, "OOOOOOOOOOOOOOOO", "RELEASE(10)",
326          SCST_DATA_NONE, 0, SCST_SMALL_TIMEOUT, 0, 0},
327         {0x58, "     O          ", "REPAIR TRACK",
328          SCST_DATA_NONE, 0, 0, 0, 0},
329         {0x59, "                ", "",
330          SCST_DATA_NONE, 0, 0, 0, 0},
331         {0x5A, "OOOOOOOOOOOOOOOO", "MODE SENSE(10)",
332          SCST_DATA_READ, 2, SCST_SMALL_TIMEOUT, 0, 0},
333         {0x5B, "     O          ", "CLOSE TRACK/SESSION",
334          SCST_DATA_NONE, 0, 0, 0, 0},
335         {0x5C, "     O          ", "READ BUFFER CAPACITY",
336          SCST_DATA_READ, 2, 0, 0, 0},
337         {0x5D, "     O          ", "SEND CUE SHEET",
338          SCST_DATA_WRITE, 3, 0, 0, 0},
339         {0x5E, "                ", "PERSISTENT_RESERV_IN",
340          SCST_DATA_NONE, 0, 0, 0, 0},
341         {0x5F, "                ", "PERSISTENT_RESERV_OUT",
342          SCST_DATA_NONE, 0, 0, 0, 0},
343
344         /* 16-bytes length CDB */
345         {0x80, "O   OO O        ", "XDWRITE EXTENDED",
346          SCST_DATA_NONE, 0, 0, 0, 0},
347         {0x80, " M              ", "WRITE FILEMARKS",
348          SCST_DATA_NONE, 0, 0, 0, 0},
349         {0x81, "O   OO O        ", "REBUILD",
350          SCST_DATA_WRITE, 4, 0, 0, 0},
351         {0x82, "O   OO O        ", "REGENERATE",
352          SCST_DATA_WRITE, 4, 0, 0, 0},
353         {0x83, "OOOOOOOOOOOOOOOO", "EXTENDED COPY",
354          SCST_DATA_WRITE, 4, 0, 0, 0},
355         {0x84, "OOOOOOOOOOOOOOOO", "RECEIVE COPY RESULT",
356          SCST_DATA_WRITE, 4, 0, 0, 0},
357         {0x86, "OOOOOOOOOO      ", "ACCESS CONTROL IN",
358          SCST_DATA_NONE, 0, 0, 0, 0},
359         {0x87, "OOOOOOOOOO      ", "ACCESS CONTROL OUT",
360          SCST_DATA_NONE, 0, 0, 0, 0},
361         {0x88, "M   MMMM        ", "READ(16)",
362          SCST_DATA_READ, 4, SCST_TRANSFER_LEN_TYPE_FIXED, 0, 0},
363         {0x8A, "O   OO O        ", "WRITE(16)",
364          SCST_DATA_WRITE, 4, SCST_TRANSFER_LEN_TYPE_FIXED, 0, 0},
365         {0x8C, "OOOOOOOOOO      ", "READ ATTRIBUTE",
366          SCST_DATA_READ, 4, 0, 0, 0},
367         {0x8D, "OOOOOOOOOO      ", "WRITE ATTRIBUTE",
368          SCST_DATA_WRITE, 4, 0, 0, 0},
369         {0x8E, "O   OO O        ", "WRITE AND VERIFY(16)",
370          SCST_DATA_WRITE, 4, SCST_TRANSFER_LEN_TYPE_FIXED, 0, 0},
371                                                           /*-*/
372         {0x8F, "O   OO O        ", "VERIFY(16)",
373          SCST_DATA_WRITE, 4, SCST_TRANSFER_LEN_TYPE_FIXED, 0, 0},       /*? */
374         {0x90, "O   OO O        ", "PRE-FETCH(16)",
375          SCST_DATA_NONE, 0, 0, 0, 0},
376         {0x91, "O   OO O        ", "SYNCHRONIZE CACHE(16)",
377          SCST_DATA_NONE, 0, 0, 0, 0},
378         {0x91, " M              ", "SPACE(16)",
379          SCST_DATA_NONE, 0, SCST_LONG_TIMEOUT, 0, 0},
380         {0x92, "O   OO O        ", "LOCK UNLOCK CACHE(16)",
381          SCST_DATA_NONE, 0, 0, 0, 0},
382         {0x92, " O              ", "LOCATE(16)",
383          SCST_DATA_NONE, 0, SCST_LONG_TIMEOUT, 0, 0},
384         {0x93, "O    O          ", "WRITE SAME(16)",
385          SCST_DATA_WRITE, 4, SCST_UNKNOWN_LENGTH, 1, 0},        /*N2! */
386         {0x9E, "M               ", "SERVICE ACTION IN",
387          SCST_DATA_READ, 4, 0, 0, 0},
388
389         /* 12-bytes length CDB */
390         {0xA0, "VVVVVVVVVV  M   ", "REPORT LUN",
391          SCST_DATA_READ, 4, SCST_SMALL_TIMEOUT, 0, 0},  /*N7! */
392         {0xA1, "     O          ", "BLANK",
393          SCST_DATA_NONE, 0, SCST_LONG_TIMEOUT, 0, 0},
394         {0xA2, "                ", "",
395          SCST_DATA_NONE, 0, 0, 0, 0},
396         {0xA3, "     O          ", "SEND KEY",
397          SCST_DATA_WRITE, 2, 0, 0, 0},
398         {0xA3, "OOOOO OOOO      ", "REPORT DEVICE IDENTIDIER",
399          SCST_DATA_READ, 4, 0, 0, 0},
400         {0xA3, "            M   ", "MAINTENANCE(IN)",
401          SCST_DATA_READ, 4, 0, 0, 0},
402         {0xA4, "     O          ", "REPORT KEY",
403          SCST_DATA_READ, 2, 0, 0, 0},
404         {0xA4, "            O   ", "MAINTENANCE(OUT)",
405          SCST_DATA_WRITE, 4, 0, 0, 0},
406         {0xA5, "        M       ", "MOVE MEDIUM",
407          SCST_DATA_NONE, 0, SCST_LONG_TIMEOUT, 0, 0},
408         {0xA5, "     O          ", "PLAY AUDIO(12)",
409          SCST_DATA_READ, 4, SCST_TRANSFER_LEN_TYPE_FIXED, 0, 0},       /*N8! */
410         {0xA6, "     O  O       ", "EXCHANGE/LOAD/UNLOAD MEDIUM",
411          SCST_DATA_NONE, 0, SCST_LONG_TIMEOUT, 0, 0},
412         {0xA7, "     O          ", "SET READ AHEAD",
413          SCST_DATA_NONE, 0, 0, 0, 0},
414         {0xA8, "         O      ", "GET MESSAGE(12)",
415          SCST_DATA_READ, 4, 0, 0, 0},
416         {0xA8, "O   OO O        ", "READ(12)",
417          SCST_DATA_READ, 4, SCST_TRANSFER_LEN_TYPE_FIXED, 0, 0},
418         {0xA9, "     O          ", "PLAY TRACK RELATIVE(12)",
419          SCST_DATA_READ, 4, SCST_TRANSFER_LEN_TYPE_FIXED, 0, 0},      /*N8*! */
420         {0xAA, "O   OO O        ", "WRITE(12)",
421          SCST_DATA_WRITE, 4, SCST_TRANSFER_LEN_TYPE_FIXED, 0, 0},
422         {0xAA, "         O      ", "SEND MESSAGE(12)",
423          SCST_DATA_WRITE, 4, 0, 0, 0},
424         {0xAB, "                ", "",
425          SCST_DATA_NONE, 0, 0, 0, 0},
426         {0xAC, "       O        ", "ERASE(12)",
427          SCST_DATA_NONE, 0, 0, 0, 0},
428         {0xAC, "     O          ", "GET PERFORMANCE",
429          SCST_DATA_READ, 0, SCST_UNKNOWN_LENGTH, 1, 0},
430         {0xAD, "     O          ", "READ DVD STRUCTURE",
431          SCST_DATA_READ, 2, 0, 0, 0},
432         {0xAE, "O   OO O        ", "WRITE AND VERIFY(12)",
433          SCST_DATA_WRITE, 4, SCST_TRANSFER_LEN_TYPE_FIXED, 0, 0},
434                                                           /*-*/
435         {0xAF, "O   OO O        ", "VERIFY(12)",
436          SCST_DATA_WRITE, 4, SCST_TRANSFER_LEN_TYPE_FIXED, 0, 0},       /*? */
437         {0xB0, "    OO O        ", "SEARCH DATA HIGH(12)",
438          SCST_DATA_WRITE, 1, 0, 0, 0},  /*N9! */
439         {0xB1, "    OO O        ", "SEARCH DATA EQUAL(12)",
440          SCST_DATA_WRITE, 1, 0, 0, 0},  /*N9! */
441         {0xB2, "    OO O        ", "SEARCH DATA LOW(12)",
442          SCST_DATA_WRITE, 1, 0, 0, 0},  /*N9! */
443         {0xB3, "    OO O        ", "SET LIMITS(12)",
444          SCST_DATA_NONE, 0, 0, 0, 0},
445         {0xB4, "                ", "",
446          SCST_DATA_NONE, 0, 0, 0, 0},
447         {0xB5, "        O       ", "REQUEST VOLUME ELEMENT ADDRESS",
448          SCST_DATA_READ, 1, 0, 0, 0},
449         {0xB6, "        O       ", "SEND VOLUME TAG",
450          SCST_DATA_WRITE, 1, 0, 0, 0},
451         {0xB6, "     O         ", "SET STREAMING",
452          SCST_DATA_WRITE, 0, 0, 0, 0},
453         {0xB7, "       O        ", "READ DEFECT DATA(12)",
454          SCST_DATA_READ, 1, 0, 0, 0},
455         {0xB8, "        O       ", "READ ELEMENT STATUS",
456          SCST_DATA_READ, 3, 0, 0, 0},   /*N10 */
457         {0xB9, "     O          ", "READ CD MSF",
458          SCST_DATA_READ, 0, SCST_UNKNOWN_LENGTH, 1, 0},
459         {0xBA, "     O          ", "SCAN",
460          SCST_DATA_NONE, 0, SCST_LONG_TIMEOUT, 0, 0},
461         {0xBA, "            O   ", "REDUNDANCY GROUP(IN)",
462          SCST_DATA_READ, 4, 0, 0, 0},
463         {0xBB, "     O          ", "SET SPEED",
464          SCST_DATA_NONE, 0, 0, 0, 0},
465         {0xBB, "            O   ", "REDUNDANCY GROUP(OUT)",
466          SCST_DATA_WRITE, 4, 0, 0, 0},
467         {0xBC, "            O   ", "SPARE(IN)",
468          SCST_DATA_READ, 4, 0, 0, 0},
469         {0xBD, "     O          ", "MECHANISM STATUS",
470          SCST_DATA_READ, 2, 0, 0, 0},
471         {0xBD, "            O   ", "SPARE(OUT)",
472          SCST_DATA_WRITE, 4, 0, 0, 0},
473         {0xBE, "     O          ", "READ CD",
474          SCST_DATA_READ, 4, SCST_TRANSFER_LEN_TYPE_FIXED, 0, 0},
475         {0xBE, "            O   ", "VOLUME SET(IN)",
476          SCST_DATA_READ, 4, 0, 0, 0},
477         {0xBF, "     O          ", "SEND DVD STRUCTUE",
478          SCST_DATA_WRITE, 2, 0, 0, 0},
479         {0xBF, "            O   ", "VOLUME SET(OUT)",
480          SCST_DATA_WRITE, 4, 0, 0, 0},
481         {0xE7, "        V       ", "INIT ELEMENT STATUS WRANGE",
482          SCST_DATA_NONE, 0, SCST_LONG_TIMEOUT, 0, 0}
483 };
484
485 /* Notes:
486    N1.   - Unknown data len
487    N2.   - Read/Write 1 block data
488    N3.   - SCSI-2 1 byte len, SCSI-3 may be upto 3 bytes AND other location
489    N4.   - Answer 20-bytes block.
490    N5.   - CDB get param list len
491    N6.   - len is bytes only  
492    N7.   - SCSI-3 Report Lun?
493    N8.   - fixed length audio mode blocks for CD/DVD use MODE SENSE 
494    N9.   - 14-BYTES header + (n * patterns) full length variable
495    N10.  - SCSI-2 use 1byte, mt.c (SCSI-3)? use 3 bytes
496
497 Unknown op's:
498 #define SCSIOP_XDWRITE_EXTENDED         0x80
499 #define SCSIOP_REBUILD                  0x81
500 #define SCSIOP_EA                       0xea
501 #define WRITE_LONG_2                    0xea
502 */
503
504 #define SCST_CDB_TBL_SIZE ((sizeof(scst_scsi_op_table)/sizeof(struct scst_sdbops)))
505
506 #endif /* __SCST_CDBPROBE_H */