1 /*
2  * Copyright (c) 1998,1999,2000
3  *      Traakan, Inc., Los Altos, CA
4  *      All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  * 1. Redistributions of source code must retain the above copyright
10  *    notice unmodified, this list of conditions, and the following
11  *    disclaimer.
12  * 2. Redistributions in binary form must reproduce the above copyright
13  *    notice, this list of conditions and the following disclaimer in the
14  *    documentation and/or other materials provided with the distribution.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26  * SUCH DAMAGE.
27  */
28 
29 /*
30  * Project:  NDMJOB
31  * Ident:    $Id: $
32  *
33  * Description:
34  *
35  */
36 
37 /* clang-format off */
38 
39 /*
40  * WORKING                                                 X3T9.2
41  * DRAFT                                                   Project 375D
42  */
43 
44 /*
45                       Table D.2 - SCSI-2 Operation Codes
46 =============================================================================
47            D - DIRECT ACCESS Device                       Device column key
48            .T - SEQUENTIAL ACCESS Device                  M = Mandatory
49            . L - PRINTER Device                           O = Optional
50            .  P - PROCESSOR Device                        V = Vendor-specific
51            .  .W - WRITE ONCE READ MULTIPLE Device        R = Reserved
52            .  . R - READ ONLY (CD-ROM) Device
53            .  .  S - SCANNER Device
54            .  .  .O - OPTICAL MEMORY Device
55            .  .  . M - MEDIA CHANGER Device
56            .  .  .  C - COMMUNICATION Device
57            .  .  .  .
58            DTLPWRSOMC
59 */
60 
61 /*OP       DTLPWRSOMC */
62 #define SCSI_CMD_TEST_UNIT_READY 0x00                /* MMMMMMMMMM */
63 #define SCSI_CMD_REWIND 0x01                         /* _M________ */
64 #define SCSI_CMD_REZERO_UNIT 0x01                    /* O_V_OO_OO_ */
65 #define SCSI_CMD_REQUEST_SENSE 0x03                  /* MMMMMMMMMM */
66 #define SCSI_CMD_FORMAT 0x04                         /* __O_______ */
67 #define SCSI_CMD_FORMAT_UNIT 0x04                    /* M______O__ */
68 #define SCSI_CMD_READ_BLOCK_LIMITS 0x05              /* VMVVVV__V_ */
69 #define SCSI_CMD_INITIALIZE_ELEMENT_STATUS 0x07      /* ________O_ */
70 #define SCSI_CMD_REASSIGN_BLOCKS 0x07                /* OVV_O__OV_ */
71 #define SCSI_CMD_GET_MESSAGE_6 0x08                  /* _________M */
72 #define SCSI_CMD_READ_6 0x08                         /* OMV_OO_OV_ */
73 #define SCSI_CMD_RECEIVE 0x08                        /* ___O______ */
74 #define SCSI_CMD_PRINT 0x0A                          /* __M_______ */
75 #define SCSI_CMD_SEND_MESSAGE_6 0x0A                 /* _________M */
76 #define SCSI_CMD_SEND_6 0x0A                         /* ___M______ */
77 #define SCSI_CMD_WRITE_6 0x0A                        /* OM__O__OV_ */
78 #define SCSI_CMD_SEEK_6 0x0B                         /* O___OO_OV_ */
79 #define SCSI_CMD_SLEW_AND_PRINT 0x0B                 /* __O_______ */
80 #define SCSI_CMD_READ_REVERSE 0x0F                   /* VOVVVV__V_ */
81 #define SCSI_CMD_SYNCHRONIZE_BUFFER 0x10             /* __O_O_____ */
82 #define SCSI_CMD_WRITE_FILEMARKS 0x10                /* VM_VVV____ */
83 #define SCSI_CMD_SPACE 0x11                          /* VMVVVV____ */
84 #define SCSI_CMD_INQUIRY 0x12                        /* MMMMMMMMMM */
85 #define SCSI_CMD_VERIFY_6 0x13                       /* VOVVVV____ */
86 #define SCSI_CMD_RECOVER_BUFFERED_DATA 0x14          /* VOOVVV____ */
87 #define SCSI_CMD_MODE_SELECT_6 0x15                  /* OMO_OOOOOO */
88 #define SCSI_CMD_RESERVE 0x16                        /* M___MM_MO_ */
89 #define SCSI_CMD_RESERVE_UNIT 0x16                   /* _MM___M___ */
90 #define SCSI_CMD_RELEASE 0x17                        /* M___MM_MO_ */
91 #define SCSI_CMD_RELEASE_UNIT 0x17                   /* _MM___M___ */
92 #define SCSI_CMD_COPY 0x18                           /* OOOOOOOO__ */
93 #define SCSI_CMD_ERASE 0x19                          /* VMVVVV____ */
94 #define SCSI_CMD_MODE_SENSE_6 0x1A                   /* OMO_OOOOOO */
95 #define SCSI_CMD_LOAD_UNLOAD 0x1B                    /* _O________ */
96 #define SCSI_CMD_SCAN 0x1B                           /* ______O___ */
97 #define SCSI_CMD_STOP_PRINT 0x1B                     /* __O_______ */
98 #define SCSI_CMD_STOP_START_UNIT 0x1B                /* O___OO_O__ */
99 #define SCSI_CMD_RECEIVE_DIAGNOSTIC_RESULTS 0x1C     /* OOOOOOOOOO */
100 #define SCSI_CMD_SEND_DIAGNOSTIC 0x1D                /* MMMMMMMMMM */
101 #define SCSI_CMD_PREVENT_ALLOW_MEDIUM_REMOVAL 0x1E   /* OO__OO_OO_ */
102 #define SCSI_CMD_SET_WINDOW 0x24                     /* V___VVM___ */
103 #define SCSI_CMD_GET_WINDOW 0x25                     /* ______O___ */
104 #define SCSI_CMD_READ_CAPACITY 0x25                  /* M___M__M__ */
105 #define SCSI_CMD_READ_CD_ROM_CAPACITY 0x25           /* _____M____ */
106 #define SCSI_CMD_GET_MESSAGE_10 0x28                 /* _________O */
107 #define SCSI_CMD_READ_10 0x28                        /* M___MMMM__ */
108 #define SCSI_CMD_READ_GENERATION 0x29                /* V___VV_O__ */
109 #define SCSI_CMD_SEND_MESSAGE_10 0x2A                /* _________O */
110 #define SCSI_CMD_SEND_10 0x2A                        /* ______O___ */
111 #define SCSI_CMD_WRITE_10 0x2A                       /* O___M__M__ */
112 #define SCSI_CMD_LOCATE 0x2B                         /* _O________ */
113 #define SCSI_CMD_POSITION_TO_ELEMENT 0x2B            /* ________O_ */
114 #define SCSI_CMD_SEEK_10 0x2B                        /* O___OO_O__ */
115 #define SCSI_CMD_ERASE_10 0x2C                       /* V______O__ */
116 #define SCSI_CMD_READ_UPDATED_BLOCK 0x2D             /* V___O__O__ */
117 #define SCSI_CMD_WRITE_AND_VERIFY_10 0x2E            /* O___O__O__ */
118 #define SCSI_CMD_VERIFY_10 0x2F                      /* O___OO_O__ */
119 #define SCSI_CMD_SEARCH_DATA_HIGH_10 0x30            /* O___OO_O__ */
120 #define SCSI_CMD_OBJECT_POSITION 0x31                /* ______O___ */
121 #define SCSI_CMD_SEARCH_DATA_EQUAL_10 0x31           /* O___OO_O__ */
122 #define SCSI_CMD_SEARCH_DATA_LOW_10 0x32             /* O___OO_O__ */
123 #define SCSI_CMD_SET_LIMITS_10 0x33                  /* O___OO_O__ */
124 #define SCSI_CMD_GET_DATA_BUFFER_STATUS 0x34         /* ______O___ */
125 #define SCSI_CMD_PRE_FETCH 0x34                      /* O___OO_O__ */
126 #define SCSI_CMD_READ_POSITION 0x34                  /* _O________ */
127 #define SCSI_CMD_SYNCHRONIZE_CACHE 0x35              /* O___OO_O__ */
128 #define SCSI_CMD_LOCK_UNLOCK_CACHE 0x36              /* O___OO_O__ */
129 #define SCSI_CMD_READ_DEFECT_DATA_10 0x37            /* O______O__ */
130 #define SCSI_CMD_MEDIUM_SCAN 0x38                    /* ____O__O__ */
131 #define SCSI_CMD_COMPARE 0x39                        /* OOOOOOOO__ */
132 #define SCSI_CMD_COPY_AND_VERIFY 0x3A                /* OOOOOOOO__ */
133 #define SCSI_CMD_WRITE_BUFFER 0x3B                   /* OOOOOOOOOO */
134 #define SCSI_CMD_READ_BUFFER 0x3C                    /* OOOOOOOOOO */
135 #define SCSI_CMD_UPDATE_BLOCK 0x3D                   /* ____O__O__ */
136 #define SCSI_CMD_READ_LONG 0x3E                      /* O___OO_O__ */
137 #define SCSI_CMD_WRITE_LONG 0x3F                     /* O___O__O__ */
138 #define SCSI_CMD_CHANGE_DEFINITION 0x40              /* OOOOOOOOOO */
139 #define SCSI_CMD_WRITE_SAME 0x41                     /* O_________ */
140 #define SCSI_CMD_READ_SUB_CHANNEL 0x42               /* _____O____ */
141 #define SCSI_CMD_READ_TOC 0x43                       /* _____O____ */
142 #define SCSI_CMD_READ_HEADER 0x44                    /* _____O____ */
143 #define SCSI_CMD_PLAY_AUDIO_10 0x45                  /* _____O____ */
144 #define SCSI_CMD_PLAY_AUDIO_MSF 0x47                 /* _____O____ */
145 #define SCSI_CMD_PLAY_AUDIO_TRACK_INDEX 0x48         /* _____O____ */
146 #define SCSI_CMD_PLAY_TRACK_RELATIVE_10 0x49         /* _____O____ */
147 #define SCSI_CMD_PAUSE_RESUME 0x4B                   /* _____O____ */
148 #define SCSI_CMD_LOG_SELECT 0x4C                     /* OOOOOOOOOO */
149 #define SCSI_CMD_LOG_SENSE 0x4D                      /* OOOOOOOOOO */
150 #define SCSI_CMD_MODE_SELECT_10 0x55                 /* OOO_OOOOOO */
151 #define SCSI_CMD_MODE_SENSE_10 0x5A                  /* OOO_OOOOOO */
152 #define SCSI_CMD_MOVE_MEDIUM 0xA5                    /* ________M_ */
153 #define SCSI_CMD_PLAY_AUDIO_12 0xA5                  /* _____O____ */
154 #define SCSI_CMD_EXCHANGE_MEDIUM 0xA6                /* ________O_ */
155 #define SCSI_CMD_GET_MESSAGE_12 0xA8                 /* _________O */
156 #define SCSI_CMD_READ_12 0xA8                        /* ____OO_O__ */
157 #define SCSI_CMD_PLAY_TRACK_RELATIVE_12 0xA9         /* _____O____ */
158 #define SCSI_CMD_SEND_MESSAGE_12 0xAA                /* _________O */
159 #define SCSI_CMD_WRITE_12 0xAA                       /* ____O__O__ */
160 #define SCSI_CMD_ERASE_12 0xAC                       /* _______O__ */
161 #define SCSI_CMD_WRITE_AND_VERIFY_12 0xAE            /* ____O__O__ */
162 #define SCSI_CMD_VERIFY_12 0xAF                      /* ____OO_O__ */
163 #define SCSI_CMD_SEARCH_DATA_HIGH_12 0xB0            /* ____OO_O__ */
164 #define SCSI_CMD_SEARCH_DATA_EQUAL_12 0xB1           /* ____OO_O__ */
165 #define SCSI_CMD_SEARCH_DATA_LOW_12 0xB2             /* ____OO_O__ */
166 #define SCSI_CMD_SET_LIMITS_12 0xB3                  /* ____OO_O__ */
167 #define SCSI_CMD_REQUEST_VOLUME_ELEMENT_ADDRESS 0xB5 /* ________O_ */
168 #define SCSI_CMD_SEND_VOLUME_TAG 0xB6                /* ________O_ */
169 #define SCSI_CMD_READ_DEFECT_DATA_12 0xB7            /* _______O__ */
170 #define SCSI_CMD_READ_ELEMENT_STATUS 0xB8            /* ________O_ */
171 
172 
173 /*
174  *                             Table 26 - Status byte
175  * +========-========-========-========-========-========-========-========+
176  * |   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
177  * |=================+============================================+========|
178  * |     Reserved    |               Status byte code             |Reserved|
179  * +=======================================================================+
180  *
181  *
182  *                          Table 27 - Status byte code
183  * +==================================-==============================+
184  * |    Bits of status byte           |  Status                      |
185  * |----------------------------------|                              |
186  * |   7 | 6 | 5 | 4 | 3 | 2 | 1 | 0  |                              |
187  * |-----+---+---+---+---+---+---+----+------------------------------|
188  * |   R | R | 0 | 0 | 0 | 0 | 0 | R  |  GOOD                        |
189  * |   R | R | 0 | 0 | 0 | 0 | 1 | R  |  CHECK CONDITION             |
190  * |   R | R | 0 | 0 | 0 | 1 | 0 | R  |  CONDITION MET               |
191  * |   R | R | 0 | 0 | 1 | 0 | 0 | R  |  BUSY                        |
192  * |   R | R | 0 | 1 | 0 | 0 | 0 | R  |  INTERMEDIATE                |
193  * |   R | R | 0 | 1 | 0 | 1 | 0 | R  |  INTERMEDIATE-CONDITION MET  |
194  * |   R | R | 0 | 1 | 1 | 0 | 0 | R  |  RESERVATION CONFLICT        |
195  * |   R | R | 1 | 0 | 0 | 0 | 1 | R  |  COMMAND TERMINATED          |
196  * |   R | R | 1 | 0 | 1 | 0 | 0 | R  |  QUEUE FULL                  |
197  * |----------------------------------|                              |
198  * |           All other codes        |  Reserved                    |
199  * |-----------------------------------------------------------------|
200  * |  Key: R = Reserved bit                                          |
201  * +=================================================================+
202  *
203  * A definition of the status byte codes is given below.
204  *
205  * 7.3.1 GOOD:  This status indicates that the target has successfully
206  * completed the command.
207  *
208  * 7.3.2 CHECK CONDITION:  This status indicates that a contingent allegiance
209  * condition has occurred (see 7.6).
210  *
211  * 7.3.3 CONDITION MET:  This status or INTERMEDIATE-CONDITION MET is
212  * returned whenever the requested operation is satisfied (see the SEARCH
213  * DATA and PREFETCH commands).
214  *
215  * 7.3.4 BUSY:  This status indicates that the target is busy.  This status
216  * shall be returned whenever a target is unable to accept a command from an
217  * otherwise acceptable initiator (i.e. no reservation conflicts).  The
218  * recommended initiator recovery action is to issue the command again at a
219  * later time.
220  *
221  * 7.3.5 INTERMEDIATE:  This status or INTERMEDIATE-CONDITION MET shall be
222  * returned for every successfully completed command in a series of linked
223  * commands (except the last command), unless the command is terminated with
224  * CHECK CONDITION, RESERVATION CONFLICT, or COMMAND TERMINATED status.  If
225  * INTERMEDIATE or INTERMEDIATE-CONDITION MET status is not returned, the
226  * series of linked commands is terminated and the I/O process is ended.
227  *
228  * 7.3.6 INTERMEDIATE-CONDITION MET:  This status is the combination of the
229  * CONDITION MET and INTERMEDIATE statuses.
230  *
231  * 7.3.7 RESERVATION CONFLICT:  This status shall be returned whenever an
232  * initiator attempts to access a logical unit or an extent within a logical
233  * unit that is reserved with a conflicting reservation type for another SCSI
234  * device (see the RESERVE and RESERVE UNIT commands).  The recommended
235  * initiator recovery action is to issue the command again at a later time.
236  *
237  * 7.3.8 COMMAND TERMINATED:  This status shall be returned whenever the
238  * target terminates the current I/O process after receiving a TERMINATE I/O
239  * PROCESS message (see 6.6.22).  This status also indicates that a
240  * contingent allegiance condition has occurred (see 7.6).
241  *
242  * 7.3.9 QUEUE FULL:  This status shall be implemented if tagged queuing is
243  * implemented.  This status is returned when a SIMPLE QUEUE TAG, ORDERED
244  * QUEUE TAG, or HEAD OF QUEUE TAG message is received and the command queue
245  * is full.  The I/O process is not placed in the command queue.
246  */
247 /* Standard SCSI status byte values. */
248 #define SCSI_STATUS_MASK 0x3E
249 #define SCSI_STATUS_BYTE_CODE(X) ((X)&SCSI_STATUS_MASK)
250 #define SCSI_STATUS_GOOD 0x00
251 #define SCSI_STATUS_CHECK_CONDITION 0x02
252 #define SCSI_STATUS_CONDITION_MET 0x04
253 #define SCSI_STATUS_BUSY 0x08
254 #define SCSI_STATUS_INTERMEDIATE_GOOD 0x10
255 #define SCSI_STATUS_INTERMEDIATE_MET 0x14
256 #define SCSI_STATUS_RESERVATION_CONFLICT 0x18
257 #define SCSI_STATUS_COMMAND_TERMINATED 0x22
258 #define SCSI_STATUS_QUEUE_FULL 0x28
259 
260 
261 #define SCSI_SENSE_VALID_BIT 0x80
262 #define SCSI_SENSE_FILEMARK_BIT 0x80
263 #define SCSI_SENSE_EOM_BIT 0x40
264 #define SCSI_SENSE_ILI_BIT 0x20
265 #define SCSI_SENSE_SENSE_KEY_MASK 0x0F
266 
267 /*
268 8.2.14.3 Sense key and sense code definitions
269 */
270 #define SCSI_SENSE_KEY_NO_SENSE 0x0
271 #define SCSI_SENSE_KEY_RECOVERED_ERROR 0x1
272 #define SCSI_SENSE_KEY_NOT_READY 0x2
273 #define SCSI_SENSE_KEY_MEDIUM_ERROR 0x3
274 #define SCSI_SENSE_KEY_HARDWARE_ERROR 0x4
275 #define SCSI_SENSE_KEY_ILLEGAL_REQUEST 0x5
276 #define SCSI_SENSE_KEY_UNIT_ATTENTION 0x6
277 #define SCSI_SENSE_KEY_DATA_PROTECT 0x7
278 #define SCSI_SENSE_KEY_BLANK_CHECK 0x8
279 #define SCSI_SENSE_KEY_VENDOR_SPECIFIC 0x9
280 #define SCSI_SENSE_KEY_COPY_ABORTED 0xA
281 #define SCSI_SENSE_KEY_ABORTED_COMMAND 0xB
282 #define SCSI_SENSE_KEY_EQUAL 0xC
283 #define SCSI_SENSE_KEY_VOLUME_OVERFLOW 0xD
284 #define SCSI_SENSE_KEY_MISCOMPARE 0xE
285 #define SCSI_SENSE_KEY_RESERVED 0xF
286 
287 
288 /*
289 ================================================================
290            D - DIRECT ACCESS Device
291            .T - SEQUENTIAL ACCESS Device
292            . L - PRINTER Device
293            .  P - PROCESSOR Device
294            .  .W - WRITE ONCE READ MULTIPLE Device
295            .  . R - READ ONLY (CD-ROM) Device
296            .  .  S - SCANNER Device
297            .  .  .O - OPTICAL MEMORY Device
298            .  .  . M - MEDIA CHANGER Device
299            .  .  .  C - COMMUNICATION Device
300            .  .  .  .
301            DTLPWRSOMC
302 */
303 
304 #ifndef _ASQ
305 #define _ASQ(ASC, ASCQ) (((ASC) << 8) | (ASCQ))
306 #endif
307 
308 #define ASQ_NO_ADDITIONAL_SENSE_INFORMATION _ASQ(0x00, 0x00)             /* DTLPWRSOMC */
309 #define ASQ_FILEMARK_DETECTED _ASQ(0x00, 0x01)                           /* _T________ */
310 #define ASQ_END_OF_PARTITION_OR_MEDIUM_DETECTED _ASQ(0x00, 0x02)         /* _T____S___ */
311 #define ASQ_SETMARK_DETECTED _ASQ(0x00, 0x03)                            /* _T________ */
312 #define ASQ_BEGINNING_OF_PARTITION_OR_MEDIUM_DETECTED _ASQ(0x00, 0x04)   /* _T____S___ */
313 #define ASQ_END_OF_DATA_DETECTED _ASQ(0x00, 0x05)                        /* _T____S___ */
314 #define ASQ_IO_PROCESS_TERMINATED _ASQ(0x00, 0x06)                       /* DTLPWRSOMC */
315 #define ASQ_AUDIO_PLAY_OPERATION_IN_PROGRESS _ASQ(0x00, 0x11)            /* R_________ */
316 #define ASQ_AUDIO_PLAY_OPERATION_PAUSED _ASQ(0x00, 0x12)                 /* R_________ */
317 #define ASQ_AUDIO_PLAY_OPERATION_SUCCESSFULLY_COMPLETED _ASQ(0x00, 0x13) /* R_________ */
318 #define ASQ_AUDIO_PLAY_OPERATION_STOPPED_DUE_TO_ERROR _ASQ(0x00, 0x14)   /* R_________ */
319 #define ASQ_NO_CURRENT_AUDIO_STATUS_TO_RETURN                                                  \
320   _ASQ(0x00, 0x15)                                                               /* R_________ \
321                                                                                   */
322 #define ASQ_NO_INDEX_OR_SECTOR_SIGNAL _ASQ(0x01, 0x00)                           /* DW__O_____ */
323 #define ASQ_NO_SEEK_COMPLETE _ASQ(0x02, 0x00)                                    /* DWR_OM____ */
324 #define ASQ_PERIPHERAL_DEVICE_WRITE_FAULT _ASQ(0x03, 0x00)                       /* DTL_W_SO__ */
325 #define ASQ_NO_WRITE_CURRENT _ASQ(0x03, 0x01)                                    /* _T________ */
326 #define ASQ_EXCESSIVE_WRITE_ERRORS _ASQ(0x03, 0x02)                              /* _T________ */
327 #define ASQ_LOGICAL_UNIT_NOT_READY_CAUSE_NOT_REPORTABLE _ASQ(0x04, 0x00)         /* DTLPWRSOMC */
328 #define ASQ_LOGICAL_UNIT_IS_IN_PROCESS_OF_BECOMING_READY _ASQ(0x04, 0x01)        /* DTLPWRSOMC */
329 #define ASQ_LOGICAL_UNIT_NOT_READY_INITIALIZING_REQUIRED _ASQ(0x04, 0x02)        /* DTLPWRSOMC */
330 #define ASQ_LOGICAL_UNIT_NOT_READY_MANUAL_INTERVENTION_REQUIRED _ASQ(0x04, 0x03) /* DTLPWRSOMC */
331 #define ASQ_LOGICAL_UNIT_NOT_READY_FORMAT_IN_PROGRESS _ASQ(0x04, 0x04)           /* DTL____O__ */
332 #define ASQ_LOGICAL_UNIT_DOES_NOT_RESPOND_TO_SELECTION _ASQ(0x05, 0x00)          /* DTL_WRSOMC */
333 #define ASQ_NO_REFERENCE_POSITION_FOUND _ASQ(0x06, 0x00)                         /* DWR_OM__NO */
334 #define ASQ_MULTIPLE_PERIPHERAL_DEVICES_SELECTED _ASQ(0x07, 0x00)                /* DTL_WRSOM_ */
335 #define ASQ_LOGICAL_UNIT_COMMUNICATION_FAILURE                                               \
336   _ASQ(0x08, 0x00)                                                             /* DTL_WRSOMC \
337                                                                                 */
338 #define ASQ_LOGICAL_UNIT_COMMUNICATION_TIME_OUT _ASQ(0x08, 0x01)               /* DTL_WRSOMC */
339 #define ASQ_LOGICAL_UNIT_COMMUNICATION_PARITY_ERROR _ASQ(0x08, 0x02)           /* DTL_WRSOMC */
340 #define ASQ_TRACK_FOLLOWING_ERROR _ASQ(0x09, 0x00)                             /* DT__WR_O__ */
341 #define ASQ_TRACKING_SERVO_FAILURE _ASQ(0x09, 0x01)                            /* ____WR_O__ */
342 #define ASQ_FOCUS_SERVO_FAILURE _ASQ(0x09, 0x02)                               /* ____WR_O__ */
343 #define ASQ_SPINDLE_SERVO_FAILURE _ASQ(0x09, 0x03)                             /* ____WR_O__ */
344 #define ASQ_ERROR_LOG_OVERFLOW _ASQ(0x0A, 0x00)                                /* DTLPWRSOMC */
345 #define ASQ_WRITE_ERROR _ASQ(0x0C, 0x00)                                       /* ___T_____S */
346 #define ASQ_WRITE_ERROR_RECOVERED_WITH_AUTO_REALLOCATION _ASQ(0x0C, 0x01)      /* D___W__O__ */
347 #define ASQ_WRITE_ERROR_AUTO_REALLOCATION_FAILED _ASQ(0x0C, 0x02)              /* D___W__O__ */
348 #define ASQ_ID_CRC_OR_ECC_ERROR _ASQ(0x10, 0x00)                               /* D___W__O__ */
349 #define ASQ_UNRECOVERED_READ_ERROR _ASQ(0x11, 0x00)                            /* DT__WRSO__ */
350 #define ASQ_READ_RETRIES_EXHAUSTED _ASQ(0x11, 0x01)                            /* DT__W_SO__ */
351 #define ASQ_ERROR_TOO_LONG_TO_CORRECT _ASQ(0x11, 0x02)                         /* DT__W_SO__ */
352 #define ASQ_MULTIPLE_READ_ERRORS _ASQ(0x11, 0x03)                              /* DT__W_SO__ */
353 #define ASQ_UNRECOVERED_READ_ERROR_AUTO_REALLOCATE_FAILED _ASQ(0x11, 0x04)     /* D___W__O__ */
354 #define ASQ_L_EC_UNCORRECTABLE_ERROR _ASQ(0x11, 0x05)                          /* ____WR_O__ */
355 #define ASQ_CIRC_UNRECOVERED_ERROR _ASQ(0x11, 0x06)                            /* ____WR_O__ */
356 #define ASQ_DATA_RESYNCHRONIZATION_ERROR _ASQ(0x11, 0x07)                      /* ____W__O__ */
357 #define ASQ_INCOMPLETE_BLOCK_READ _ASQ(0x11, 0x08)                             /* _T________ */
358 #define ASQ_NO_GAP_FOUND _ASQ(0x11, 0x09)                                      /* _T________ */
359 #define ASQ_MISCORRECTED_ERROR _ASQ(0x11, 0x0A)                                /* DT_____O__ */
360 #define ASQ_UNRECOVERED_READ_ERROR_RECOMMEND_REASSIGNMENT _ASQ(0x11, 0x0B)     /* D___W__O__ */
361 #define ASQ_UNRECOVERED_READ_ERROR_RECOMMEND_REWRITE_THE_DATA _ASQ(0x11, 0x0C) /* D___W__O__ */
362 #define ASQ_ADDRESS_MARK_NOT_FOUND_FOR_ID_FIELD _ASQ(0x12, 0x00)               /* D___W__O__ */
363 #define ASQ_ADDRESS_MARK_NOT_FOUND_FOR_DATA_FIELD _ASQ(0x13, 0x00)             /* D___W__O__ */
364 #define ASQ_RECORDED_ENTITY_NOT_FOUND _ASQ(0x14, 0x00)                         /* DTL_WRSO__ */
365 #define ASQ_RECORD_NOT_FOUND _ASQ(0x14, 0x01)                                  /* DT__WR_O__ */
366 #define ASQ_FILEMARK_OR_SETMARK_NOT_FOUND _ASQ(0x14, 0x02)                     /* _T________ */
367 #define ASQ_END_OF_DATA_NOT_FOUND _ASQ(0x14, 0x03)                             /* _T________ */
368 #define ASQ_BLOCK_SEQUENCE_ERROR _ASQ(0x14, 0x04)                              /* _T________ */
369 #define ASQ_RANDOM_POSITIONING_ERROR _ASQ(0x15, 0x00)                          /* DTL_WRSOM_ */
370 #define ASQ_MECHANICAL_POSITIONING_ERROR _ASQ(0x15, 0x01)                      /* DTL_WRSOM_ */
371 #define ASQ_POSITIONING_ERROR_DETECTED_BY_READ_OF_MEDIUM _ASQ(0x15, 0x02)      /* DT__WR_O__ */
372 #define ASQ_DATA_SYNCHRONIZATION_MARK_ERROR _ASQ(0x16, 0x00)                   /* DW_____O__ */
373 #define ASQ_RECOVERED_DATA_WITH_NO_ERROR_CORRECTION_APPLIED _ASQ(0x17, 0x00)   /* DT__WRSO__ */
374 #define ASQ_RECOVERED_DATA_WITH_RETRIES _ASQ(0x17, 0x01)                       /* DT__WRSO__ */
375 #define ASQ_RECOVERED_DATA_WITH_POSITIVE_HEAD_OFFSET _ASQ(0x17, 0x02)          /* DT__WR_O__ */
376 #define ASQ_RECOVERED_DATA_WITH_NEGATIVE_HEAD_OFFSET _ASQ(0x17, 0x03)          /* DT__WR_O__ */
377 #define ASQ_RECOVERED_DATA_WITH_RETRIES_ANDOR_CIRC_APPLIED _ASQ(0x17, 0x04)    /* ____WR_O__ */
378 #define ASQ_RECOVERED_DATA_USING_PREVIOUS_SECTOR_ID _ASQ(0x17, 0x05)           /* D___WR_O__ */
379 #define ASQ_RECOVERED_DATA_WITHOUT_ECC_DATA_AUTO_REALLOCATED _ASQ(0x17, 0x06)  /* D___W__O__ */
380 #define ASQ_RECOVERED_DATA_WITHOUT_ECC_RECOMMEND_REASSIGNMENT _ASQ(0x17, 0x07) /* D___W__O__ */
381 #define ASQ_RECOVERED_DATA_WITHOUT_ECC_RECOMMEND_REWRITE _ASQ(0x17, 0x08)      /* D___W__O__ */
382 #define ASQ_RECOVERED_DATA_WITH_ERROR_CORRECTION_APPLIED _ASQ(0x18, 0x00)      /* DT__WR_O__ */
383 #define ASQ_RECOVERED_DATA_WITH_ERROR_CORRECTION_AND_RETRIES_APPLIED \
384   _ASQ(0x18, 0x01)                                                 /* D___WR_O__ */
385 #define ASQ_RECOVERED_DATA_DATA_AUTO_REALLOCATED _ASQ(0x18, 0x02)  /* D___WR_O__ */
386 #define ASQ_RECOVERED_DATA_WITH_CIRC _ASQ(0x18, 0x03)              /* _____R____ */
387 #define ASQ_RECOVERED_DATA_WITH_LEC _ASQ(0x18, 0x04)               /* _____R____ */
388 #define ASQ_RECOVERED_DATA_RECOMMEND_REASSIGNMENT _ASQ(0x18, 0x05) /* D___WR_O__ */
389 #define ASQ_RECOVERED_DATA_RECOMMEND_REWRITE _ASQ(0x18, 0x06)      /* D___WR_O__ */
390 #define ASQ_DEFECT_LIST_ERROR _ASQ(0x19, 0x00)                     /* D______O__ */
391 #define ASQ_DEFECT_LIST_NOT_AVAILABLE _ASQ(0x19, 0x01)             /* D______O__ */
392 #define ASQ_DEFECT_LIST_ERROR_IN_PRIMARY_LIST                              \
393   _ASQ(0x19, 0x02)                                           /* D______O__ \
394                                                               */
395 #define ASQ_DEFECT_LIST_ERROR_IN_GROWN_LIST _ASQ(0x19, 0x03) /* D______O__ */
396 #define ASQ_PARAMETER_LIST_LENGTH_ERROR _ASQ(0x1A, 0x00)     /* DTLPWRSOMC */
397 #define ASQ_SYNCHRONOUS_DATA_TRANSFER_ERROR _ASQ(0x1B, 0x00) /* DTLPWRSOMC */
398 #define ASQ_DEFECT_LIST_NOT_FOUND _ASQ(0x1C, 0x00)           /* D______O__ */
399 #define ASQ_PRIMARY_DEFECT_LIST_NOT_FOUND _ASQ(0x1C, 0x01)   /* D______O__ */
400 #define ASQ_GROWN_DEFECT_LIST_NOT_FOUND _ASQ(0x1C, 0x02)     /* D______O__ */
401 #define ASQ_MISCOMPARE_DURING_VERIFY_OPERATION                            \
402   _ASQ(0x1D, 0x00)                                          /* D___W__O__ \
403                                                              */
404 #define ASQ_RECOVERED_ID_WITH_ECC _ASQ(0x1E, 0x00)          /* D___W__O__ */
405 #define ASQ_INVALID_COMMAND_OPERATION_CODE _ASQ(0x20, 0x00) /* DTLPWRSOMC */
406 #define ASQ_LOGICAL_BLOCK_ADDRESS_OUT_OF_RANGE                             \
407   _ASQ(0x21, 0x00)                                           /* DT__WR_OM_ \
408                                                               */
409 #define ASQ_INVALID_ELEMENT_ADDRESS _ASQ(0x21, 0x01)         /* ________M_ */
410 #define ASQ_ILLEGAL_FUNCTION _ASQ(0x22, 0x00)                /* D_________ */
411 #define ASQ_INVALID_FIELD_IN_CDB _ASQ(0x24, 0x00)            /* DTLPWRSOMC */
412 #define ASQ_LOGICAL_UNIT_NOT_SUPPORTED _ASQ(0x25, 0x00)      /* DTLPWRSOMC */
413 #define ASQ_INVALID_FIELD_IN_PARAMETER_LIST _ASQ(0x26, 0x00) /* DTLPWRSOMC */
414 #define ASQ_PARAMETER_NOT_SUPPORTED _ASQ(0x26, 0x01)         /* DTLPWRSOMC */
415 #define ASQ_PARAMETER_VALUE_INVALID _ASQ(0x26, 0x02)         /* DTLPWRSOMC */
416 #define ASQ_THRESHOLD_PARAMETERS_NOT_SUPPORTED                           \
417   _ASQ(0x26, 0x03)                                         /* DTLPWRSOMC \
418                                                             */
419 #define ASQ_WRITE_PROTECTED _ASQ(0x27, 0x00)               /* DT__W__O__ */
420 #define ASQ_NOT_READY_TO_READY_TRANSITION _ASQ(0x28, 0x00) /* DTLPWRSOMC */
421 #define ASQ_MEDIUM_MAY_HAVE_CHANGED _ASQ(0x28, 0x00)       /* DTLPWRSOMC */
422 #define ASQ_IMPORT_OR_EXPORT_ELEMENT_ACCESSED                                               \
423   _ASQ(0x28, 0x01)                                                            /* ________M_ \
424                                                                                */
425 #define ASQ_POWER_ON_OR_RESET_OR_BUS_DEVICE_RESET_OCCURRED _ASQ(0x29, 0x00)   /* DTLPWRSOMC */
426 #define ASQ_PARAMETERS_CHANGED _ASQ(0x2A, 0x00)                               /* DTL_WRSOMC */
427 #define ASQ_MODE_PARAMETERS_CHANGED _ASQ(0x2A, 0x01)                          /* DTL_WRSOMC */
428 #define ASQ_LOG_PARAMETERS_CHANGED _ASQ(0x2A, 0x02)                           /* DTL_WRSOMC */
429 #define ASQ_COPY_CANNOT_EXECUTE_SINCE_HOST_CANNOT_DISCONNECT _ASQ(0x2B, 0x00) /* DTLPWRSO_C */
430 #define ASQ_COMMAND_SEQUENCE_ERROR _ASQ(0x2C, 0x00)                           /* DTLPWRSOMC */
431 #define ASQ_TOO_MANY_WINDOWS_SPECIFIED _ASQ(0x2C, 0x01)                       /* ______S___ */
432 #define ASQ_INVALID_COMBINATION_OF_WINDOWS_SPECIFIED _ASQ(0x2C, 0x02)         /* ______S___ */
433 #define ASQ_OVERWRITE_ERROR_ON_UPDATE_IN_PLACE                                   \
434   _ASQ(0x2D, 0x00)                                                 /* _T________ \
435                                                                     */
436 #define ASQ_COMMANDS_CLEARED_BY_ANOTHER_INITIATOR _ASQ(0x2F, 0x00) /* DTLPWRSOMC */
437 #define ASQ_INCOMPATIBLE_MEDIUM_INSTALLED _ASQ(0x30, 0x00)         /* DT__WR_OM_ */
438 #define ASQ_CANNOT_READ_MEDIUM_UNKNOWN_FORMAT                                     \
439   _ASQ(0x30, 0x01)                                                  /* DT__WR_O__ \
440                                                                      */
441 #define ASQ_CANNOT_READ_MEDIUM_INCOMPATIBLE_FORMAT _ASQ(0x30, 0x02) /* DT__WR_O__ */
442 #define ASQ_CLEANING_CARTRIDGE_INSTALLED _ASQ(0x30, 0x03)           /* DT________ */
443 #define ASQ_MEDIUM_FORMAT_CORRUPTED _ASQ(0x31, 0x00)                /* DT__W__O__ */
444 #define ASQ_FORMAT_COMMAND_FAILED _ASQ(0x31, 0x01)                  /* D_L____O__ */
445 #define ASQ_NO_DEFECT_SPARE_LOCATION_AVAILABLE                                              \
446   _ASQ(0x32, 0x00)                                                            /* D___W__O__ \
447                                                                                */
448 #define ASQ_DEFECT_LIST_UPDATE_FAILURE _ASQ(0x32, 0x01)                       /* D___W__O__ */
449 #define ASQ_TAPE_LENGTH_ERROR _ASQ(0x33, 0x00)                                /* _T________ */
450 #define ASQ_RIBBON_OR_INK_OR_TONER_FAILURE _ASQ(0x36, 0x00)                   /* __L_______ */
451 #define ASQ_ROUNDED_PARAMETER _ASQ(0x37, 0x00)                                /* DTL_WRSOMC */
452 #define ASQ_SAVING_PARAMETERS_NOT_SUPPORTED _ASQ(0x39, 0x00)                  /* DTL_WRSOMC */
453 #define ASQ_MEDIUM_NOT_PRESENT _ASQ(0x3A, 0x00)                               /* DTL_WRSOM_ */
454 #define ASQ_SEQUENTIAL_POSITIONING_ERROR _ASQ(0x3B, 0x00)                     /* _TL_______ */
455 #define ASQ_TAPE_POSITION_ERROR_AT_BEGINNING_OF_MEDIUM _ASQ(0x3B, 0x01)       /* _T________ */
456 #define ASQ_TAPE_POSITION_ERROR_AT_END_OF_MEDIUM _ASQ(0x3B, 0x02)             /* _T________ */
457 #define ASQ_TAPE_OR_ELECTRONIC_VERTICAL_FORMS_UNIT_NOT_READY _ASQ(0x3B, 0x03) /* __L_______ */
458 #define ASQ_SLEW_FAILURE _ASQ(0x3B, 0x04)                                     /* __L_______ */
459 #define ASQ_PAPER_JAM _ASQ(0x3B, 0x05)                                        /* __L_______ */
460 #define ASQ_FAILED_TO_SENSE_TOP_OF_FORM _ASQ(0x3B, 0x06)                      /* __L_______ */
461 #define ASQ_FAILED_TO_SENSE_BOTTOM_OF_FORM _ASQ(0x3B, 0x07)                   /* __L_______ */
462 #define ASQ_REPOSITION_ERROR _ASQ(0x3B, 0x08)                                 /* _T________ */
463 #define ASQ_READ_PAST_END_OF_MEDIUM _ASQ(0x3B, 0x09)                          /* ______S___ */
464 #define ASQ_READ_PAST_BEGINNING_OF_MEDIUM _ASQ(0x3B, 0x0A)                    /* ______S___ */
465 #define ASQ_POSITION_PAST_END_OF_MEDIUM _ASQ(0x3B, 0x0B)                      /* ______S___ */
466 #define ASQ_POSITION_PAST_BEGINNING_OF_MEDIUM                                       \
467   _ASQ(0x3B, 0x0C)                                                    /* ______S___ \
468                                                                        */
469 #define ASQ_MEDIUM_DESTINATION_ELEMENT_FULL _ASQ(0x3B, 0x0D)          /* ________M_ */
470 #define ASQ_MEDIUM_SOURCE_ELEMENT_EMPTY _ASQ(0x3B, 0x0E)              /* ________M_ */
471 #define ASQ_INVALID_BITS_IN_IDENTIFY_MESSAGE _ASQ(0x3D, 0x00)         /* DTLPWRSOMC */
472 #define ASQ_LOGICAL_UNIT_HAS_NOT_SELF_CONFIGURED_YET _ASQ(0x3E, 0x00) /* DTLPWRSOMC */
473 #define ASQ_TARGET_OPERATING_CONDITIONS_HAVE_CHANGED _ASQ(0x3F, 0x00) /* DTLPWRSOMC */
474 #define ASQ_MICROCODE_HAS_BEEN_CHANGED _ASQ(0x3F, 0x01)               /* DTLPWRSOMC */
475 #define ASQ_CHANGED_OPERATING_DEFINITION _ASQ(0x3F, 0x02)             /* DTLPWRSOMC */
476 #define ASQ_INQUIRY_DATA_HAS_CHANGED _ASQ(0x3F, 0x03)                 /* DTLPWRSOMC */
477 #define ASQ_RAM_FAILURE _ASQ(0x40, 0x00)                              /* D_________ */
478 #define ASQ_DIAGNOSTIC_FAILURE_ON_COMPONENT_00                                        \
479   _ASQ(0x40, 0x00)                                                      /* DTLPWRSOMC \
480                                                                          */
481 #define ASQ_DATA_PATH_FAILURE _ASQ(0x41, 0x00)                          /* D_________ */
482 #define ASQ_POWER_ON_OR_SELF_TEST_FAILURE _ASQ(0x42, 0x00)              /* D_________ */
483 #define ASQ_MESSAGE_ERROR _ASQ(0x43, 0x00)                              /* DTLPWRSOMC */
484 #define ASQ_INTERNAL_TARGET_FAILURE _ASQ(0x44, 0x00)                    /* DTLPWRSOMC */
485 #define ASQ_SELECT_OR_RESELECT_FAILURE _ASQ(0x45, 0x00)                 /* DTLPWRSOMC */
486 #define ASQ_UNSUCCESSFUL_SOFT_RESET _ASQ(0x46, 0x00)                    /* DTLPWRSOMC */
487 #define ASQ_SCSI_PARITY_ERROR _ASQ(0x47, 0x00)                          /* DTLPWRSOMC */
488 #define ASQ_INITIATOR_DETECTED_ERROR_MESSAGE_RECEIVED _ASQ(0x48, 0x00)  /* DTLPWRSOMC */
489 #define ASQ_INVALID_MESSAGE_ERROR _ASQ(0x49, 0x00)                      /* DTLPWRSOMC */
490 #define ASQ_COMMAND_PHASE_ERROR _ASQ(0x4A, 0x00)                        /* DTLPWRSOMC */
491 #define ASQ_DATA_PHASE_ERROR _ASQ(0x4B, 0x00)                           /* DTLPWRSOMC */
492 #define ASQ_LOGICAL_UNIT_FAILED_SELF_CONFIGURATION _ASQ(0x4C, 0x00)     /* DTLPWRSOMC */
493 #define ASQ_OVERLAPPED_COMMANDS_ATTEMPTED _ASQ(0x4E, 0x00)              /* DTLPWRSOMC */
494 #define ASQ_WRITE_APPEND_ERROR _ASQ(0x50, 0x00)                         /* _T________ */
495 #define ASQ_WRITE_APPEND_POSITION_ERROR _ASQ(0x50, 0x01)                /* _T________ */
496 #define ASQ_POSITION_ERROR_RELATED_TO_TIMING _ASQ(0x50, 0x02)           /* _T________ */
497 #define ASQ_ERASE_FAILURE _ASQ(0x51, 0x00)                              /* _T_____O__ */
498 #define ASQ_CARTRIDGE_FAULT _ASQ(0x52, 0x00)                            /* _T________ */
499 #define ASQ_MEDIA_LOAD_OR_EJECT_FAILED _ASQ(0x53, 0x00)                 /* DTL_WRSOM_ */
500 #define ASQ_UNLOAD_TAPE_FAILURE _ASQ(0x53, 0x01)                        /* _T________ */
501 #define ASQ_MEDIUM_REMOVAL_PREVENTED _ASQ(0x53, 0x02)                   /* DT__WR_OM_ */
502 #define ASQ_SCSI_TO_HOST_SYSTEM_INTERFACE_FAILURE _ASQ(0x54, 0x00)      /* ___P______ */
503 #define ASQ_SYSTEM_RESOURCE_FAILURE _ASQ(0x55, 0x00)                    /* ___P______ */
504 #define ASQ_UNABLE_TO_RECOVER_TABLE_OF_CONTENTS _ASQ(0x57, 0x00)        /* _______R__ */
505 #define ASQ_GENERATION_DOES_NOT_EXIST _ASQ(0x58, 0x00)                  /* __O_______ */
506 #define ASQ_UPDATED_BLOCK_READ _ASQ(0x59, 0x00)                         /* __O_______ */
507 #define ASQ_OPERATOR_REQUEST_OR_STATE_CHANGE_INPUT _ASQ(0x5A, 0x00)     /* DTLPWRSOM_ */
508 #define ASQ_OPERATOR_MEDIUM_REMOVAL_REQUEST _ASQ(0x5A, 0x01)            /* DT__WR_OM_ */
509 #define ASQ_OPERATOR_SELECTED_WRITE_PROTECT _ASQ(0x5A, 0x02)            /* DT__W__O__ */
510 #define ASQ_OPERATOR_SELECTED_WRITE_PERMIT _ASQ(0x5A, 0x03)             /* DT__W__O__ */
511 #define ASQ_LOG_EXCEPTION _ASQ(0x5B, 0x00)                              /* DTLPWRSOM_ */
512 #define ASQ_THRESHOLD_CONDITION_MET _ASQ(0x5B, 0x01)                    /* DTLPWRSOM_ */
513 #define ASQ_LOG_COUNTER_AT_MAXIMUM _ASQ(0x5B, 0x02)                     /* DTLPWRSOM_ */
514 #define ASQ_LOG_LIST_CODES_EXHAUSTED _ASQ(0x5B, 0x03)                   /* DTLPWRSOM_ */
515 #define ASQ_RPL_STATUS_CHANGE _ASQ(0x5C, 0x00)                          /* D___O_____ */
516 #define ASQ_SPINDLES_SYNCHRONIZED _ASQ(0x5C, 0x01)                      /* D___O_____ */
517 #define ASQ_SPINDLES_NOT_SYNCHRONIZED _ASQ(0x5C, 0x02)                  /* D___O_____ */
518 #define ASQ_LAMP_FAILURE _ASQ(0x60, 0x00)                               /* ______S___ */
519 #define ASQ_VIDEO_ACQUISITION_ERROR _ASQ(0x61, 0x00)                    /* ______S___ */
520 #define ASQ_UNABLE_TO_ACQUIRE_VIDEO _ASQ(0x61, 0x01)                    /* ______S___ */
521 #define ASQ_OUT_OF_FOCUS _ASQ(0x61, 0x02)                               /* ______S___ */
522 #define ASQ_SCAN_HEAD_POSITIONING_ERROR _ASQ(0x62, 0x00)                /* ______S___ */
523 #define ASQ_END_OF_USER_AREA_ENCOUNTERED_ON_THIS_TRACK _ASQ(0x63, 0x00) /* _____R____ */
524 #define ASQ_ILLEGAL_MODE_FOR_THIS_TRACK _ASQ(0x64, 0x00)                /* _____R____ */
525 
526 /* clang-format off */
527