1 /* 2 * Copyright (c) 2007-2022 Douglas Gilbert. 3 * All rights reserved. 4 * Use of this source code is governed by a BSD-style 5 * license that can be found in the BSD_LICENSE file. 6 * 7 * SPDX-License-Identifier: BSD-2-Clause 8 */ 9 10 #include <stdlib.h> 11 12 #ifdef HAVE_CONFIG_H 13 #include "config.h" 14 #else 15 #define SG_SCSI_STRINGS 1 16 #endif 17 18 #include "sg_lib.h" 19 #include "sg_lib_data.h" 20 21 22 const char * sg_lib_version_str = "2.95 20221104"; 23 /* spc6r06, sbc5r03, zbc2r13 */ 24 25 26 /* indexed by pdt; those that map to own index do not decay */ 27 int sg_lib_pdt_decay_arr[32] = { 28 PDT_DISK, PDT_TAPE, PDT_TAPE /* printer */, PDT_PROCESSOR, 29 PDT_DISK /* WO */, PDT_MMC, PDT_SCANNER, PDT_DISK /* optical */, 30 PDT_MCHANGER, PDT_COMMS, 0xa, 0xb, 31 PDT_SAC, PDT_SES, PDT_DISK /* rbc */, PDT_OCRW, 32 PDT_BCC, PDT_OSD, PDT_TAPE /* adc */, PDT_SMD, 33 PDT_DISK /* zbc */, 0x15, 0x16, 0x17, 34 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, PDT_WLUN, PDT_UNKNOWN 35 }; 36 37 /* SCSI Status values */ 38 struct sg_lib_simple_value_name_t sg_lib_sstatus_str_arr[] = { 39 {0x0, "Good"}, 40 {0x2, "Check Condition"}, 41 {0x4, "Condition Met"}, 42 {0x8, "Busy"}, 43 {0x10, "Intermediate (obsolete)"}, 44 {0x14, "Intermediate-Condition Met (obsolete)"}, 45 {0x18, "Reservation Conflict"}, 46 {0x22, "Command terminated (obsolete)"}, 47 {0x28, "Task Set Full"}, 48 {0x30, "ACA Active"}, 49 {0x40, "Task Aborted"}, 50 {0xffff, NULL}, 51 }; 52 53 #ifdef SG_SCSI_STRINGS 54 struct sg_lib_value_name_t sg_lib_normal_opcodes[] = { 55 {0, PDT_ALL, "Test Unit Ready"}, 56 {0x1, PDT_ALL, "Rezero Unit"}, 57 {0x1, PDT_TAPE, "Rewind"}, 58 {0x3, PDT_ALL, "Request Sense"}, 59 {0x4, PDT_DISK_ZBC, "Format Unit"}, 60 {0x4, PDT_TAPE, "Format medium"}, 61 {0x4, PDT_PRINTER, "Format"}, 62 {0x5, PDT_TAPE, "Read Block Limits"}, 63 {0x7, PDT_DISK_ZBC, "Reassign Blocks"}, 64 {0x7, PDT_MCHANGER, "Initialize element status"}, 65 {0x8, PDT_DISK_ZBC, "Read(6)"}, /* obsolete in sbc3r30 */ 66 {0x8, PDT_PROCESSOR, "Receive"}, 67 {0xa, PDT_DISK_ZBC, "Write(6)"}, /* obsolete in sbc3r30 */ 68 {0xa, PDT_PRINTER, "Print"}, 69 {0xa, PDT_PROCESSOR, "Send"}, 70 {0xb, PDT_ALL, "Seek(6)"}, 71 {0xb, PDT_TAPE, "Set capacity"}, 72 {0xb, PDT_PRINTER, "Slew and print"}, 73 {0xf, PDT_TAPE, "Read reverse(6)"}, 74 {0x10, PDT_TAPE, "Write filemarks(6)"}, 75 {0x10, PDT_PRINTER, "Synchronize buffer"}, 76 {0x11, PDT_TAPE, "Space(6)"}, 77 {0x12, PDT_ALL, "Inquiry"}, 78 {0x13, PDT_TAPE, "Verify(6)"}, /* SSC */ 79 {0x14, PDT_ALL, "Recover buffered data"}, 80 {0x15, PDT_ALL, "Mode select(6)"},/* sbc3r31 recommends Mode select(10) */ 81 {0x16, PDT_ALL, "Reserve(6)"}, /* obsolete in SPC-4 r11 */ 82 {0x16, PDT_MCHANGER, "Reserve element(6)"}, 83 {0x17, PDT_ALL, "Release(6)"}, /* obsolete in SPC-4 r11 */ 84 {0x17, PDT_MCHANGER, "Release element(6)"}, 85 {0x18, PDT_ALL, "Copy"}, /* obsolete in SPC-4 r11 */ 86 {0x19, PDT_ALL, "Erase(6)"}, 87 {0x1a, PDT_ALL, "Mode sense(6)"},/* sbc3r31 recommends Mode sense(10) */ 88 {0x1b, PDT_ALL, "Start stop unit"}, 89 {0x1b, PDT_TAPE, "Load unload"}, 90 {0x1b, PDT_ADC, "Load unload"}, 91 {0x1b, PDT_PRINTER, "Stop print"}, 92 {0x1c, PDT_ALL, "Receive diagnostic results"}, 93 {0x1d, PDT_ALL, "Send diagnostic"}, 94 {0x1e, PDT_ALL, "Prevent allow medium removal"}, 95 {0x23, PDT_MMC, "Read Format capacities"}, 96 {0x24, PDT_ALL, "Set window"}, 97 {0x25, PDT_ALL, "Read capacity(10)"}, 98 /* sbc3r31 recommends Read capacity(16) */ 99 {0x25, PDT_OCRW, "Read card capacity"}, 100 {0x28, PDT_ALL, "Read(10)"}, /* sbc3r31 recommends Read(16) */ 101 {0x29, PDT_ALL, "Read generation"}, 102 {0x2a, PDT_ALL, "Write(10)"}, /* sbc3r31 recommends Write(16) */ 103 {0x2b, PDT_ALL, "Seek(10)"}, 104 {0x2b, PDT_TAPE, "Locate(10)"}, 105 {0x2b, PDT_MCHANGER, "Position to element"}, 106 {0x2c, PDT_ALL, "Erase(10)"}, 107 {0x2d, PDT_OPTICAL, "Read updated block"}, 108 {0x2e, PDT_ALL, "Write and verify(10)"}, 109 /* sbc3r31 recommends Write and verify(16) */ 110 {0x2f, PDT_ALL, "Verify(10)"}, /* sbc3r31 recommends Verify(16) */ 111 {0x30, PDT_ALL, "Search data high(10)"}, 112 {0x31, PDT_ALL, "Search data equal(10)"}, 113 {0x32, PDT_ALL, "Search data low(10)"}, 114 {0x33, PDT_ALL, "Set limits(10)"}, 115 {0x34, PDT_ALL, "Pre-fetch(10)"}, /* sbc3r31 recommends Pre-fetch(16) */ 116 {0x34, PDT_TAPE, "Read position"}, 117 {0x35, PDT_ALL, "Synchronize cache(10)"}, 118 /* SBC-3 r31 recommends Synchronize cache(16) */ 119 {0x36, PDT_ALL, "Lock unlock cache(10)"}, 120 {0x37, PDT_MCHANGER, "Initialize element status with range"}, 121 {0x37, PDT_ALL, "Read defect data(10)"}, 122 /* SBC-3 r31 recommends Read defect data(12) */ 123 {0x38, PDT_DISK_ZBC, "Format with preset scan"}, 124 {0x38, PDT_OCRW, "Medium scan"}, 125 {0x39, PDT_ALL, "Compare"}, /* obsolete in SPC-4 r11 */ 126 {0x3a, PDT_ALL, "Copy and verify"}, /* obsolete in SPC-4 r11 */ 127 {0x3b, PDT_ALL, "Write buffer"}, 128 {0x3c, PDT_ALL, "Read buffer(10)"}, 129 {0x3d, PDT_OPTICAL, "Update block"}, 130 {0x3e, PDT_ALL, "Read long(10)"}, /* obsolete in SBC-4 r7 */ 131 {0x3f, PDT_ALL, "Write long(10)"}, /* sbc3r31 recommends Write long(16) */ 132 {0x40, PDT_ALL, "Change definition"}, /* obsolete in SPC-4 r11 */ 133 {0x41, PDT_ALL, "Write same(10)"}, /* sbc3r31 recommends Write same(16) */ 134 {0x42, PDT_DISK_ZBC, "Unmap"}, /* added SPC-4 rev 18 */ 135 {0x42, PDT_MMC, "Read sub-channel"}, 136 {0x43, PDT_MMC, "Read TOC/PMA/ATIP"}, 137 {0x44, PDT_ALL, "Report density support"}, 138 {0x45, PDT_MMC, "Play audio(10)"}, 139 {0x46, PDT_MMC, "Get configuration"}, 140 {0x47, PDT_MMC, "Play audio msf"}, 141 {0x48, PDT_ALL, "Sanitize"}, 142 {0x4a, PDT_MMC, "Get event status notification"}, 143 {0x4b, PDT_MMC, "Pause/resume"}, 144 {0x4c, PDT_ALL, "Log select"}, 145 {0x4d, PDT_ALL, "Log sense"}, 146 {0x4e, PDT_MMC, "Stop play/scan"}, 147 {0x50, PDT_DISK, "Xdwrite(10)"}, /* obsolete in SBC-3 r31 */ 148 {0x51, PDT_DISK, "Xpwrite(10)"}, /* obsolete in SBC-4 r15 */ 149 {0x51, PDT_MMC, "Read disk information"}, 150 {0x52, PDT_DISK, "Xdread(10)"}, /* obsolete in SBC-3 r31 */ 151 {0x52, PDT_MMC, "Read track information"}, 152 {0x53, PDT_DISK, "Xdwriteread(10)"}, /* obsolete in SBC-4 r15 */ 153 {0x54, PDT_MMC, "Send OPC information"}, 154 {0x55, PDT_ALL, "Mode select(10)"}, 155 {0x56, PDT_ALL, "Reserve(10)"}, /* obsolete in SPC-4 r11 */ 156 {0x56, PDT_MCHANGER, "Reserve element(10)"}, 157 {0x57, PDT_ALL, "Release(10)"}, /* obsolete in SPC-4 r11 */ 158 {0x57, PDT_MCHANGER, "Release element(10)"}, 159 {0x58, PDT_MMC, "Repair track"}, 160 {0x5a, PDT_ALL, "Mode sense(10)"}, 161 {0x5b, PDT_MMC, "Close track/session"}, 162 {0x5c, PDT_MMC, "Read buffer capacity"}, 163 {0x5d, PDT_MMC, "Send cue sheet"}, 164 {0x5e, PDT_ALL, "Persistent reserve in"}, 165 {0x5f, PDT_ALL, "Persistent reserve out"}, 166 {0x7e, PDT_ALL, "Extended cdb (XCBD)"}, /* added in SPC-4 r12 */ 167 {0x80, PDT_DISK, "Xdwrite extended(16)"}, /* obsolete in SBC-4 r15 */ 168 {0x80, PDT_TAPE, "Write filemarks(16)"}, 169 {0x81, PDT_DISK, "Rebuild(16)"}, 170 {0x81, PDT_TAPE, "Read reverse(16)"}, 171 {0x82, PDT_DISK, "Regenerate(16)"}, 172 {0x83, PDT_ALL, "Third party copy out"},/* Extended copy before spc4r34 */ 173 /* Following was "Receive copy results", before spc4r34 */ 174 {0x84, PDT_ALL, "Third party copy in"}, 175 {0x85, PDT_ALL, "ATA pass-through(16)"}, /* was 0x98 in spc3 rev21c */ 176 {0x86, PDT_ALL, "Access control in"}, 177 {0x87, PDT_ALL, "Access control out"}, 178 {0x88, PDT_ALL, "Read(16)"}, 179 {0x89, PDT_ALL, "Compare and write"}, 180 {0x8a, PDT_ALL, "Write(16)"}, 181 {0x8b, PDT_DISK, "Orwrite(16)"}, 182 {0x8c, PDT_ALL, "Read attribute"}, 183 {0x8d, PDT_ALL, "Write attribute"}, 184 {0x8e, PDT_ALL, "Write and verify(16)"}, 185 {0x8f, PDT_ALL, "Verify(16)"}, 186 {0x90, PDT_ALL, "Pre-fetch(16)"}, 187 {0x91, PDT_ALL, "Synchronize cache(16)"}, 188 {0x91, PDT_TAPE, "Space(16)"}, 189 {0x92, PDT_DISK, "Lock unlock cache(16)"}, 190 {0x92, PDT_TAPE, "Locate(16)"}, 191 {0x93, PDT_ALL, "Write same(16)"}, 192 {0x93, PDT_TAPE, "Erase(16)"}, 193 {0x94, PDT_DISK_ZBC, "ZBC out"}, /* new sbc4r04, has service actions */ 194 {0x95, PDT_DISK_ZBC, "ZBC in"}, /* new sbc4r04, has service actions */ 195 {0x9a, PDT_ALL, "Write stream(16)"}, /* added sbc4r07 */ 196 {0x9b, PDT_ALL, "Read buffer(16)"}, /* added spc5r02 */ 197 {0x9c, PDT_ALL, "Write atomic(16)"}, 198 {0x9d, PDT_ALL, "Service action bidirectional"}, /* added spc4r35 */ 199 {0x9e, PDT_ALL, "Service action in(16)"}, 200 {0x9f, PDT_ALL, "Service action out(16)"}, 201 {0xa0, PDT_ALL, "Report luns"}, 202 {0xa1, PDT_ALL, "ATA pass-through(12)"}, 203 {0xa1, PDT_MMC, "Blank"}, 204 {0xa2, PDT_ALL, "Security protocol in"}, 205 {0xa3, PDT_ALL, "Maintenance in"}, 206 {0xa3, PDT_MMC, "Send key"}, 207 {0xa4, PDT_ALL, "Maintenance out"}, 208 {0xa4, PDT_MMC, "Report key"}, 209 {0xa5, PDT_ALL, "Move medium"}, 210 {0xa5, PDT_MMC, "Play audio(12)"}, 211 {0xa6, PDT_MCHANGER, "Exchange medium"}, 212 {0xa6, PDT_MMC, "Load/unload medium"}, 213 {0xa7, PDT_OPTICAL, "Move medium attached"}, 214 {0xa7, PDT_MMC, "Set read ahead"}, 215 {0xa8, PDT_ALL, "Read(12)"}, /* SBC-3 r31 recommends Read(16) */ 216 {0xa9, PDT_ALL, "Service action out(12)"}, 217 {0xaa, PDT_ALL, "Write(12)"}, /* SBC-3 r31 recommends Write(16) */ 218 {0xab, PDT_ALL, "Service action in(12)"}, 219 {0xac, PDT_OPTICAL, "erase(12)"}, 220 {0xac, PDT_MMC, "Get performance"}, 221 {0xad, PDT_MMC, "Read DVD/BD structure"}, 222 {0xae, PDT_ALL, "Write and verify(12)"}, 223 /* SBC-3 r31 recommends Write and verify(16) */ 224 {0xaf, PDT_ALL, "Verify(12)"}, /* SBC-3 r31 recommends Verify(16) */ 225 {0xb0, PDT_DISK, "Search data high(12)"}, 226 {0xb1, PDT_DISK, "Search data equal(12)"}, 227 {0xb1, PDT_MCHANGER, "Open/close import/export element"}, 228 {0xb2, PDT_DISK, "Search data low(12)"}, 229 {0xb3, PDT_DISK, "Set limits(12)"}, 230 {0xb4, PDT_ALL, "Read element status attached"}, 231 {0xb5, PDT_MCHANGER, "Request volume element address"}, 232 {0xb5, PDT_ALL, "Security protocol out"}, 233 {0xb6, PDT_MCHANGER, "Send volume tag"}, 234 {0xb6, PDT_MMC, "Set streaming"}, 235 {0xb7, PDT_ALL, "Read defect data(12)"}, 236 {0xb8, PDT_ALL, "Read element status"}, 237 {0xb9, PDT_MMC, "Read CD msf"}, 238 {0xba, PDT_MMC, "Scan"}, 239 {0xba, PDT_ALL, "Redundancy group in"}, 240 {0xbb, PDT_ALL, "Redundancy group out"}, 241 {0xbb, PDT_MMC, "Set CD speed"}, 242 {0xbc, PDT_ALL, "Spare in"}, 243 {0xbd, PDT_ALL, "Spare out"}, 244 {0xbd, PDT_MMC, "Mechanism status"}, 245 {0xbe, PDT_MMC, "Read CD"}, 246 {0xbe, PDT_ALL, "Volume set in"}, 247 {0xbf, PDT_MMC, "Send DVD/BD structure"}, 248 {0xbf, PDT_ALL, "Volume set out"}, 249 {0xffff, 0, NULL}, 250 }; 251 252 /* Read buffer(10) [0x3c] and Read buffer(16) [0x9b] service actions (sa), 253 * need prefix */ 254 struct sg_lib_value_name_t sg_lib_read_buff_arr[] = { 255 {0x0, PDT_ALL, "combined header and data [or multiple modes]"}, 256 {0x2, PDT_ALL, "data"}, 257 {0x3, PDT_ALL, "descriptor"}, 258 {0xa, PDT_ALL, "read data from echo buffer"}, 259 {0xb, PDT_ALL, "echo buffer descriptor"}, 260 {0xf, PDT_ALL, "read microcode status"}, /* added in spc5r20 */ 261 {0x1a, PDT_ALL, "enable expander comms protocol and echo buffer"}, 262 {0x1c, PDT_ALL, "error history"}, 263 {0xffff, 0, NULL}, 264 }; 265 266 /* Write buffer [0x3b] service actions, need prefix */ 267 struct sg_lib_value_name_t sg_lib_write_buff_arr[] = { 268 {0x0, PDT_ALL, "combined header and data [or multiple modes]"}, 269 {0x2, PDT_ALL, "data"}, 270 {0x4, PDT_ALL, "download microcode and activate"}, 271 {0x5, PDT_ALL, "download microcode, save, and activate"}, 272 {0x6, PDT_ALL, "download microcode with offsets and activate"}, 273 {0x7, PDT_ALL, "download microcode with offsets, save, and activate"}, 274 {0xa, PDT_ALL, "write data to echo buffer"}, 275 {0xd, PDT_ALL, "download microcode with offsets, select activation " 276 "events, save and defer activate"}, 277 {0xe, PDT_ALL, "download microcode with offsets, save and defer activate"}, 278 {0xf, PDT_ALL, "activate deferred microcode"}, 279 {0x1a, PDT_ALL, "enable expander comms protocol and echo buffer"}, 280 {0x1b, PDT_ALL, "disable expander comms protocol"}, 281 {0x1c, PDT_ALL, "download application client error history"}, 282 {0xffff, 0, NULL}, 283 }; 284 285 /* Read position (SSC) [0x34] service actions, need prefix */ 286 struct sg_lib_value_name_t sg_lib_read_pos_arr[] = { 287 {0x0, PDT_TAPE, "short form - block id"}, 288 {0x1, PDT_TAPE, "short form - vendor specific"}, 289 {0x6, PDT_TAPE, "long form"}, 290 {0x8, PDT_TAPE, "extended form"}, 291 {0xffff, 0, NULL}, 292 }; 293 294 /* Maintenance in [0xa3] service actions */ 295 struct sg_lib_value_name_t sg_lib_maint_in_arr[] = { 296 {0x0, PDT_SAC, "Report assigned/unassigned p_extent"}, 297 {0x0, PDT_ADC, "Report automation device attributes"}, 298 {0x1, PDT_SAC, "Report component device"}, 299 {0x2, PDT_SAC, "Report component device attachments"}, 300 {0x3, PDT_SAC, "Report peripheral device"}, 301 {0x4, PDT_SAC, "Report peripheral device associations"}, 302 {0x5, PDT_ALL, "Report identifying information"}, 303 /* was "Report device identifier" prior to spc4r07 */ 304 {0x6, PDT_SAC, "Report states"}, 305 {0x7, PDT_SAC, "Report device identification"}, 306 {0x8, PDT_SAC, "Report unconfigured capacity"}, 307 {0x9, PDT_SAC, "Report supported configuration method"}, 308 {0xa, PDT_ALL, "Report target port groups"}, 309 {0xb, PDT_ALL, "Report aliases"}, 310 {0xc, PDT_ALL, "Report supported operation codes"}, 311 {0xd, PDT_ALL, "Report supported task management functions"}, 312 {0xe, PDT_ALL, "Report priority"}, 313 {0xf, PDT_ALL, "Report timestamp"}, 314 {0x10, PDT_ALL, "Management protocol in"}, 315 {0x1d, PDT_DISK, "Report provisioning initialization pattern"}, 316 /* added in sbc4r07, shares sa 0x1d with ssc5r01 (tape) */ 317 {0x1d, PDT_TAPE, "Receive recommended access order"}, 318 {0x1e, PDT_TAPE, "Read dynamic runtime attribute"}, 319 {0x1e, PDT_ADC, "Report automation device attributes"}, 320 {0x1f, PDT_ALL, "Maintenance in vendor specific"}, 321 {0xffff, 0, NULL}, 322 }; 323 324 /* Maintenance out [0xa4] service actions */ 325 struct sg_lib_value_name_t sg_lib_maint_out_arr[] = { 326 {0x0, PDT_SAC, "Add peripheral device / component device"}, 327 {0x0, PDT_ADC, "Set automation device attribute"}, 328 {0x1, PDT_SAC, "Attach to component device"}, 329 {0x2, PDT_SAC, "Exchange p_extent"}, 330 {0x3, PDT_SAC, "Exchange peripheral device / component device"}, 331 {0x4, PDT_SAC, "Instruct component device"}, 332 {0x5, PDT_SAC, "Remove peripheral device / component device"}, 333 {0x6, PDT_ALL, "Set identifying information"}, 334 /* was "Set device identifier" prior to spc4r07 */ 335 {0x7, PDT_SAC, "Break peripheral device / component device"}, 336 {0xa, PDT_ALL, "Set target port groups"}, 337 {0xb, PDT_ALL, "Change aliases"}, 338 {0xc, PDT_ALL, "Remove I_T nexus"}, 339 {0xe, PDT_ALL, "Set priority"}, 340 {0xf, PDT_ALL, "Set timestamp"}, 341 {0x10, PDT_ALL, "Management protocol out"}, 342 {0x1d, PDT_TAPE, "Generate recommended access order"}, 343 {0x1e, PDT_TAPE, "write dynamic runtime attribute"}, 344 {0x1e, PDT_ADC, "Set automation device attributes"}, 345 {0x1f, PDT_ALL, "Maintenance out vendor specific"}, 346 {0xffff, 0, NULL}, 347 }; 348 349 /* Sanitize [0x48] service actions, need prefix */ 350 struct sg_lib_value_name_t sg_lib_sanitize_sa_arr[] = { 351 {0x1, PDT_ALL, "overwrite"}, 352 {0x2, PDT_ALL, "block erase"}, 353 {0x3, PDT_ALL, "cryptographic erase"}, 354 {0x1f, PDT_ALL, "exit failure mode"}, 355 {0xffff, 0, NULL}, 356 }; 357 358 /* Service action in(12) [0xab] service actions */ 359 struct sg_lib_value_name_t sg_lib_serv_in12_arr[] = { 360 {0x1, PDT_ALL, "Read media serial number"}, 361 {0xffff, 0, NULL}, 362 }; 363 364 /* Service action out(12) [0xa9] service actions */ 365 struct sg_lib_value_name_t sg_lib_serv_out12_arr[] = { 366 {0x1f, PDT_ADC, "Set medium attribute"}, 367 {0xff, PDT_ALL, "Impossible command name"}, 368 {0xffff, 0, NULL}, 369 }; 370 371 /* Service action in(16) [0x9e] service actions */ 372 struct sg_lib_value_name_t sg_lib_serv_in16_arr[] = { 373 {0xf, PDT_ALL, "Receive binding report"}, /* added spc5r11 */ 374 {0x10, PDT_ALL, "Read capacity(16)"}, 375 {0x11, PDT_ALL, "Read long(16)"}, /* obsolete in SBC-4 r7 */ 376 {0x12, PDT_ALL, "Get LBA status(16)"},/* also 32 byte variant sbc4r14 */ 377 {0x13, PDT_ALL, "Report referrals"}, 378 {0x14, PDT_ALL, "Stream control"}, 379 {0x15, PDT_ALL, "Background control"}, 380 {0x16, PDT_ALL, "Get stream status"}, 381 {0x17, PDT_ALL, "Get physical element status"}, /* added sbc4r13 */ 382 {0x18, PDT_ALL, "Remove element and truncate"}, /* added sbc4r13 */ 383 {0x19, PDT_ALL, "Restore elements and rebuild"}, /* added sbc4r19 */ 384 {0x1a, PDT_ALL, "Remove element and modify zones"}, /* added zbc2r07 */ 385 {0xffff, 0, NULL}, 386 }; 387 388 /* Service action out(16) [0x9f] service actions */ 389 struct sg_lib_value_name_t sg_lib_serv_out16_arr[] = { 390 {0x0b, PDT_ALL, "Test bind"}, /* added spc5r13 */ 391 {0x0c, PDT_ALL, "Prepare bind report"}, /* added spc5r11 */ 392 {0x0d, PDT_ALL, "Set affiliation"}, 393 {0x0e, PDT_ALL, "Bind"}, 394 {0x0f, PDT_ALL, "Unbind"}, 395 {0x11, PDT_ALL, "Write long(16)"}, 396 {0x12, PDT_ALL, "Write scattered(16)"}, /* added sbc4r11 */ 397 {0x14, PDT_DISK_ZBC, "Reset write pointer"}, 398 {0x1f, PDT_ADC, "Notify data transfer device(16)"}, 399 {0xffff, 0, NULL}, 400 }; 401 402 /* Service action bidirectional [0x9d] service actions */ 403 struct sg_lib_value_name_t sg_lib_serv_bidi_arr[] = { 404 {0xffff, 0, NULL}, 405 }; 406 407 /* Persistent reserve in [0x5e] service actions, need prefix */ 408 struct sg_lib_value_name_t sg_lib_pr_in_arr[] = { 409 {0x0, PDT_ALL, "read keys"}, 410 {0x1, PDT_ALL, "read reservation"}, 411 {0x2, PDT_ALL, "report capabilities"}, 412 {0x3, PDT_ALL, "read full status"}, 413 {0xffff, 0, NULL}, 414 }; 415 416 /* Persistent reserve out [0x5f] service actions, need prefix */ 417 struct sg_lib_value_name_t sg_lib_pr_out_arr[] = { 418 {0x0, PDT_ALL, "register"}, 419 {0x1, PDT_ALL, "reserve"}, 420 {0x2, PDT_ALL, "release"}, 421 {0x3, PDT_ALL, "clear"}, 422 {0x4, PDT_ALL, "preempt"}, 423 {0x5, PDT_ALL, "preempt and abort"}, 424 {0x6, PDT_ALL, "register and ignore existing key"}, 425 {0x7, PDT_ALL, "register and move"}, 426 {0x8, PDT_ALL, "replace lost reservation"}, 427 {0xffff, 0, NULL}, 428 }; 429 430 /* Third party copy in [0x83] service actions 431 * Opcode 'Receive copy results' was renamed 'Third party copy in' in spc4r34 432 * LID1 is an abbreviation of List Identifier length of 1 byte. In SPC-5 433 * LID1 discontinued (references back to SPC-4) and "(LID4)" suffix removed 434 * as there is no need to differentiate. */ 435 struct sg_lib_value_name_t sg_lib_xcopy_sa_arr[] = { /* originating */ 436 {0x0, PDT_ALL, "Extended copy(LID1)"}, 437 {0x1, PDT_ALL, "Extended copy"}, /* 'Extended copy(LID4)' until spc5r01 */ 438 {0x10, PDT_ALL, "Populate token"}, 439 {0x11, PDT_ALL, "Write using token"}, 440 {0x16, PDT_TAPE, "Set tape stream mirroring"}, /* ADC-4 and SSC-5 */ 441 {0x1c, PDT_ALL, "Copy operation abort"}, 442 {0xffff, 0, NULL}, 443 }; 444 445 /* Third party copy out [0x84] service actions 446 * Opcode 'Extended copy' was renamed 'Third party copy out' in spc4r34 447 * LID4 is an abbreviation of List Identifier length of 4 bytes */ 448 struct sg_lib_value_name_t sg_lib_rec_copy_sa_arr[] = { /* retrieve */ 449 {0x0, PDT_ALL, "Receive copy status(LID1)"}, 450 {0x1, PDT_ALL, "Receive copy data(LID1)"}, 451 {0x3, PDT_ALL, "Receive copy operating parameters"}, 452 {0x4, PDT_ALL, "Receive copy failure details(LID1)"}, 453 {0x5, PDT_ALL, "Receive copy status"},/* was: Receive copy status(LID4) */ 454 {0x6, PDT_ALL, "Receive copy data"}, /* was: Receive copy data(LID4) */ 455 {0x7, PDT_ALL, "Receive ROD token information"}, 456 {0x8, PDT_ALL, "Report all ROD tokens"}, 457 {0x16, PDT_TAPE, "Report tape stream mirroring"}, /* SSC-5 */ 458 {0xffff, 0, NULL}, 459 }; 460 461 /* Variable length cdb [0x7f] service actions (more than 16 bytes long) */ 462 struct sg_lib_value_name_t sg_lib_variable_length_arr[] = { 463 {0x1, PDT_ALL, "Rebuild(32)"}, 464 {0x2, PDT_ALL, "Regenerate(32)"}, 465 {0x3, PDT_ALL, "Xdread(32)"}, /* obsolete in SBC-3 r31 */ 466 {0x4, PDT_ALL, "Xdwrite(32)"}, /* obsolete in SBC-3 r31 */ 467 {0x5, PDT_ALL, "Xdwrite extended(32)"}, /* obsolete in SBC-4 r15 */ 468 {0x6, PDT_ALL, "Xpwrite(32)"}, /* obsolete in SBC-4 r15 */ 469 {0x7, PDT_ALL, "Xdwriteread(32)"}, /* obsolete in SBC-4 r15 */ 470 {0x8, PDT_ALL, "Xdwrite extended(64)"}, /* obsolete in SBC-4 r15 */ 471 {0x9, PDT_ALL, "Read(32)"}, 472 {0xa, PDT_ALL, "Verify(32)"}, 473 {0xb, PDT_ALL, "Write(32)"}, 474 {0xc, PDT_ALL, "Write and verify(32)"}, 475 {0xd, PDT_ALL, "Write same(32)"}, 476 {0xe, PDT_ALL, "Orwrite(32)"}, /* added sbc3r25 */ 477 {0xf, PDT_ALL, "Atomic write(32)"}, /* added sbc4r02 */ 478 {0x10, PDT_ALL, "Write stream(32)"}, /* added sbc4r07 */ 479 {0x11, PDT_ALL, "Write scattered(32)"}, /* added sbc4r11 */ 480 {0x12, PDT_ALL, "Get LBA status(32)"}, /* added sbc4r14 */ 481 {0x1800, PDT_ALL, "Receive credential"}, 482 {0x1ff0, PDT_ALL, "ATA pass-through(32)"},/* added sat4r05 */ 483 {0x8801, PDT_ALL, "Format OSD (osd)"}, 484 {0x8802, PDT_ALL, "Create (osd)"}, 485 {0x8803, PDT_ALL, "List (osd)"}, 486 {0x8805, PDT_ALL, "Read (osd)"}, 487 {0x8806, PDT_ALL, "Write (osd)"}, 488 {0x8807, PDT_ALL, "Append (osd)"}, 489 {0x8808, PDT_ALL, "Flush (osd)"}, 490 {0x880a, PDT_ALL, "Remove (osd)"}, 491 {0x880b, PDT_ALL, "Create partition (osd)"}, 492 {0x880c, PDT_ALL, "Remove partition (osd)"}, 493 {0x880e, PDT_ALL, "Get attributes (osd)"}, 494 {0x880f, PDT_ALL, "Set attributes (osd)"}, 495 {0x8812, PDT_ALL, "Create and write (osd)"}, 496 {0x8815, PDT_ALL, "Create collection (osd)"}, 497 {0x8816, PDT_ALL, "Remove collection (osd)"}, 498 {0x8817, PDT_ALL, "List collection (osd)"}, 499 {0x8818, PDT_ALL, "Set key (osd)"}, 500 {0x8819, PDT_ALL, "Set master key (osd)"}, 501 {0x881a, PDT_ALL, "Flush collection (osd)"}, 502 {0x881b, PDT_ALL, "Flush partition (osd)"}, 503 {0x881c, PDT_ALL, "Flush OSD (osd)"}, 504 {0x8880, PDT_ALL, "Object structure check (osd-2)"}, 505 {0x8881, PDT_ALL, "Format OSD (osd-2)"}, 506 {0x8882, PDT_ALL, "Create (osd-2)"}, 507 {0x8883, PDT_ALL, "List (osd-2)"}, 508 {0x8884, PDT_ALL, "Punch (osd-2)"}, 509 {0x8885, PDT_ALL, "Read (osd-2)"}, 510 {0x8886, PDT_ALL, "Write (osd-2)"}, 511 {0x8887, PDT_ALL, "Append (osd-2)"}, 512 {0x8888, PDT_ALL, "Flush (osd-2)"}, 513 {0x8889, PDT_ALL, "Clear (osd-2)"}, 514 {0x888a, PDT_ALL, "Remove (osd-2)"}, 515 {0x888b, PDT_ALL, "Create partition (osd-2)"}, 516 {0x888c, PDT_ALL, "Remove partition (osd-2)"}, 517 {0x888e, PDT_ALL, "Get attributes (osd-2)"}, 518 {0x888f, PDT_ALL, "Set attributes (osd-2)"}, 519 {0x8892, PDT_ALL, "Create and write (osd-2)"}, 520 {0x8895, PDT_ALL, "Create collection (osd-2)"}, 521 {0x8896, PDT_ALL, "Remove collection (osd-2)"}, 522 {0x8897, PDT_ALL, "List collection (osd-2)"}, 523 {0x8898, PDT_ALL, "Set key (osd-2)"}, 524 {0x8899, PDT_ALL, "Set master key (osd-2)"}, 525 {0x889a, PDT_ALL, "Flush collection (osd-2)"}, 526 {0x889b, PDT_ALL, "Flush partition (osd-2)"}, 527 {0x889c, PDT_ALL, "Flush OSD (osd-2)"}, 528 {0x88a0, PDT_ALL, "Query (osd-2)"}, 529 {0x88a1, PDT_ALL, "Remove member objects (osd-2)"}, 530 {0x88a2, PDT_ALL, "Get member attributes (osd-2)"}, 531 {0x88a3, PDT_ALL, "Set member attributes (osd-2)"}, 532 {0x88b1, PDT_ALL, "Read map (osd-2)"}, 533 {0x8f7c, PDT_ALL, "Perform SCSI command (osd-2)"}, 534 {0x8f7d, PDT_ALL, "Perform task management function (osd-2)"}, 535 {0x8f7e, PDT_ALL, "Perform SCSI command (osd)"}, 536 {0x8f7f, PDT_ALL, "Perform task management function (osd)"}, 537 {0xffff, 0, NULL}, 538 }; 539 540 /* Zoning out [0x94] service actions */ 541 struct sg_lib_value_name_t sg_lib_zoning_out_arr[] = { 542 {0x1, PDT_DISK_ZBC, "Close zone"}, 543 {0x2, PDT_DISK_ZBC, "Finish zone"}, 544 {0x3, PDT_DISK_ZBC, "Open zone"}, 545 {0x4, PDT_DISK_ZBC, "Reset write pointer"}, 546 {0x10, PDT_DISK_ZBC, "Sequentialize zone"}, /* zbc2r01b */ 547 {0xffff, 0, NULL}, 548 }; 549 550 /* Zoning in [0x95] service actions */ 551 struct sg_lib_value_name_t sg_lib_zoning_in_arr[] = { 552 {0x0, PDT_DISK_ZBC, "Report zones"}, 553 {0x6, PDT_DISK_ZBC, "Report realms"}, /* zbc2r04 */ 554 {0x7, PDT_DISK_ZBC, "Report zone domains"}, /* zbc2r04 */ 555 {0x8, PDT_DISK_ZBC, "Zone activate"}, /* zbc2r04 */ 556 {0x9, PDT_DISK_ZBC, "Zone query"}, /* zbc2r04 */ 557 {0xffff, 0, NULL}, 558 }; 559 560 const char * sg_lib_tapealert_strs[] = { 561 "<parameter code 0, unknown>", /* 0x0 */ 562 "Read warning", 563 "Write warning", 564 "Hard error", 565 "Media", 566 "Read failure", 567 "Write failure", 568 "Media life", 569 "Not data grade", /* 0x8 */ 570 "Write protect", 571 "No removal", 572 "Cleaning media", 573 "Unsupported format", 574 "Recoverable mechanical cartridge failure", 575 "Unrecoverable mechanical cartridge failure", 576 "Memory chip in cartridge failure", 577 "Forced eject", /* 0x10 */ 578 "Read only format", 579 "Tape directory corrupted on load", 580 "Nearing media life", 581 "Cleaning required", 582 "Cleaning requested", 583 "Expired cleaning media", 584 "Invalid cleaning tape", 585 "Retension requested", /* 0x18 */ 586 "Dual port interface error", 587 "Cooling fan failing", 588 "Power supply failure", 589 "Power consumption", 590 "Drive maintenance", 591 "Hardware A", 592 "Hardware B", 593 "Interface", /* 0x20 */ 594 "Eject media", 595 "Microcode update fail", 596 "Drive humidity", 597 "Drive temperature", 598 "Drive voltage", 599 "Predictive failure", 600 "Diagnostics required", 601 "Reserved (28h)", /* 0x28 */ 602 "Reserved (29h)", 603 "Reserved (2Ah)", 604 "Reserved (2Bh)", 605 "Reserved (2Ch)", 606 "Reserved (2Dh)", 607 "Reserved (2Eh)", 608 "External data encryption control - communications failure", 609 "External data encryption control - key manager returned error",/* 0x30 */ 610 "Diminished native capacity", 611 "Lost statistics", 612 "Tape directory invalid at unload", 613 "Tape system area write failure", 614 "Tape system area read failure", 615 "No start of data", 616 "Loading failure", 617 "Unrecoverable unload failure", /* 0x38 */ 618 "Automation interface failure", 619 "Firmware failure", 620 "WORM medium - integrity check failed", 621 "WORM medium - overwrite attempted", 622 "Encryption policy violation", 623 "Reserved (3Eh)", 624 "Reserved (3Fh)", 625 "Reserved (40h)", /* 0x40 */ 626 NULL, 627 }; 628 629 /* Read attribute [0x8c] service actions */ 630 struct sg_lib_value_name_t sg_lib_read_attr_arr[] = { 631 {0x0, PDT_ALL, "attribute values"}, 632 {0x1, PDT_ALL, "attribute list"}, 633 {0x2, PDT_ALL, "logical volume list"}, 634 {0x3, PDT_ALL, "partition list"}, 635 {0x5, PDT_ALL, "supported attributes"}, 636 {0xffff, 0, NULL}, 637 }; 638 639 #else /* SG_SCSI_STRINGS */ 640 641 struct sg_lib_value_name_t sg_lib_normal_opcodes[] = { 642 {0xffff, 0, NULL}, 643 }; 644 645 struct sg_lib_value_name_t sg_lib_read_buff_arr[] = { /* opcode 0x3c */ 646 {0xffff, 0, NULL}, 647 }; 648 649 struct sg_lib_value_name_t sg_lib_write_buff_arr[] = { /* opcode 0x3b */ 650 {0xffff, 0, NULL}, 651 }; 652 653 struct sg_lib_value_name_t sg_lib_read_pos_arr[] = { /* opcode 0x34 (SSC) */ 654 {0xffff, 0, NULL}, 655 }; 656 657 struct sg_lib_value_name_t sg_lib_maint_in_arr[] = { /* opcode 0xa3 */ 658 {0xffff, 0, NULL}, 659 }; 660 661 struct sg_lib_value_name_t sg_lib_maint_out_arr[] = { /* opcode 0xa4 */ 662 {0xffff, 0, NULL}, 663 }; 664 665 struct sg_lib_value_name_t sg_lib_sanitize_sa_arr[] = { /* opcode 0x94 */ 666 {0xffff, 0, NULL}, 667 }; 668 669 struct sg_lib_value_name_t sg_lib_serv_in12_arr[] = { /* opcode 0xab */ 670 {0xffff, 0, NULL}, 671 }; 672 673 struct sg_lib_value_name_t sg_lib_serv_out12_arr[] = { /* opcode 0xa9 */ 674 {0xffff, 0, NULL}, 675 }; 676 677 struct sg_lib_value_name_t sg_lib_serv_in16_arr[] = { /* opcode 0x9e */ 678 {0xffff, 0, NULL}, 679 }; 680 681 struct sg_lib_value_name_t sg_lib_serv_out16_arr[] = { /* opcode 0x9f */ 682 {0xffff, 0, NULL}, 683 }; 684 685 struct sg_lib_value_name_t sg_lib_serv_bidi_arr[] = { /* opcode 0x9d */ 686 {0xffff, 0, NULL}, 687 }; 688 689 struct sg_lib_value_name_t sg_lib_pr_in_arr[] = { /* opcode 0x5e */ 690 {0xffff, 0, NULL}, 691 }; 692 693 struct sg_lib_value_name_t sg_lib_pr_out_arr[] = { /* opcode 0x5f */ 694 {0xffff, 0, NULL}, 695 }; 696 697 struct sg_lib_value_name_t sg_lib_xcopy_sa_arr[] = { /* opcode 0x83 */ 698 {0xffff, 0, NULL}, 699 }; 700 701 struct sg_lib_value_name_t sg_lib_rec_copy_sa_arr[] = { /* opcode 0x84 */ 702 {0xffff, 0, NULL}, 703 }; 704 705 struct sg_lib_value_name_t sg_lib_variable_length_arr[] = { 706 {0xffff, 0, NULL}, 707 }; 708 709 struct sg_lib_value_name_t sg_lib_zoning_out_arr[] = { 710 {0xffff, 0, NULL}, 711 }; 712 713 struct sg_lib_value_name_t sg_lib_zoning_in_arr[] = { 714 {0xffff, 0, NULL}, 715 }; 716 717 struct sg_lib_value_name_t sg_lib_read_attr_arr[] = { 718 {0xffff, 0, NULL}, 719 }; 720 721 const char * sg_lib_tapealert_strs[] = { 722 NULL, 723 }; 724 725 #endif /* SG_SCSI_STRINGS */ 726 727 /* A conveniently formatted list of SCSI ASC/ASCQ codes and their 728 * corresponding text can be found at: www.t10.org/lists/asc-num.txt 729 * The following should match asc-num.txt dated 20200817 */ 730 731 #ifdef SG_SCSI_STRINGS 732 struct sg_lib_asc_ascq_range_t sg_lib_asc_ascq_range[] = 733 { 734 {0x40,0x01,0x7f,"Ram failure [0x%x]"}, 735 {0x40,0x80,0xff,"Diagnostic failure on component [0x%x]"}, 736 {0x41,0x01,0xff,"Data path failure [0x%x]"}, 737 {0x42,0x01,0xff,"Power-on or self-test failure [0x%x]"}, 738 {0x4d,0x00,0xff,"Tagged overlapped commands [0x%x]"}, 739 {0x70,0x00,0xff,"Decompression exception short algorithm id of 0x%x"}, 740 {0, 0, 0, NULL} 741 }; 742 743 struct sg_lib_asc_ascq_t sg_lib_asc_ascq[] = 744 { 745 {0x00,0x00,"No additional sense information"}, 746 {0x00,0x01,"Filemark detected"}, 747 {0x00,0x02,"End-of-partition/medium detected"}, 748 {0x00,0x03,"Setmark detected"}, 749 {0x00,0x04,"Beginning-of-partition/medium detected"}, 750 {0x00,0x05,"End-of-data detected"}, 751 {0x00,0x06,"I/O process terminated"}, 752 {0x00,0x07,"Programmable early warning detected"}, 753 {0x00,0x11,"Audio play operation in progress"}, 754 {0x00,0x12,"Audio play operation paused"}, 755 {0x00,0x13,"Audio play operation successfully completed"}, 756 {0x00,0x14,"Audio play operation stopped due to error"}, 757 {0x00,0x15,"No current audio status to return"}, 758 {0x00,0x16,"operation in progress"}, 759 {0x00,0x17,"Cleaning requested"}, 760 {0x00,0x18,"Erase operation in progress"}, 761 {0x00,0x19,"Locate operation in progress"}, 762 {0x00,0x1a,"Rewind operation in progress"}, 763 {0x00,0x1b,"Set capacity operation in progress"}, 764 {0x00,0x1c,"Verify operation in progress"}, 765 {0x00,0x1d,"ATA pass through information available"}, 766 {0x00,0x1e,"Conflicting SA creation request"}, 767 {0x00,0x1f,"Logical unit transitioning to another power condition"}, 768 {0x00,0x20,"Extended copy information available"}, 769 {0x00,0x21,"Atomic command aborted due to ACA"}, 770 {0x00,0x22,"Deferred microcode is pending"}, 771 {0x01,0x00,"No index/sector signal"}, 772 {0x02,0x00,"No seek complete"}, 773 {0x03,0x00,"Peripheral device write fault"}, 774 {0x03,0x01,"No write current"}, 775 {0x03,0x02,"Excessive write errors"}, 776 {0x04,0x00,"Logical unit not ready, cause not reportable"}, 777 {0x04,0x01,"Logical unit is in process of becoming ready"}, 778 {0x04,0x02,"Logical unit not ready, " 779 "initializing command required"}, 780 {0x04,0x03,"Logical unit not ready, " 781 "manual intervention required"}, 782 {0x04,0x04,"Logical unit not ready, format in progress"}, 783 {0x04,0x05,"Logical unit not ready, rebuild in progress"}, 784 {0x04,0x06,"Logical unit not ready, recalculation in progress"}, 785 {0x04,0x07,"Logical unit not ready, operation in progress"}, 786 {0x04,0x08,"Logical unit not ready, long write in progress"}, 787 {0x04,0x09,"Logical unit not ready, self-test in progress"}, 788 {0x04,0x0a,"Logical unit " 789 "not accessible, asymmetric access state transition"}, 790 {0x04,0x0b,"Logical unit " 791 "not accessible, target port in standby state"}, 792 {0x04,0x0c,"Logical unit " 793 "not accessible, target port in unavailable state"}, 794 {0x04,0x0d,"Logical unit not ready, structure check required"}, 795 {0x04,0x0e,"Logical unit not ready, security session in progress"}, 796 {0x04,0x10,"Logical unit not ready, " 797 "auxiliary memory not accessible"}, 798 {0x04,0x11,"Logical unit not ready, " 799 "notify (enable spinup) required"}, 800 {0x04,0x12,"Logical unit not ready, offline"}, 801 {0x04,0x13,"Logical unit not ready, SA creation in progress"}, 802 {0x04,0x14,"Logical unit not ready, space allocation in progress"}, 803 {0x04,0x15,"Logical unit not ready, robotics disabled"}, 804 {0x04,0x16,"Logical unit not ready, configuration required"}, 805 {0x04,0x17,"Logical unit not ready, calibration required"}, 806 {0x04,0x18,"Logical unit not ready, a door is open"}, 807 {0x04,0x19,"Logical unit not ready, operating in sequential mode"}, 808 {0x04,0x1a,"Logical unit not ready, start stop unit command in progress"}, 809 {0x04,0x1b,"Logical unit not ready, sanitize in progress"}, 810 {0x04,0x1c,"Logical unit not ready, additional power use not yet " 811 "granted"}, 812 {0x04,0x1d,"Logical unit not ready, configuration in progress"}, 813 {0x04,0x1e,"Logical unit not ready, microcode activation required"}, 814 {0x04,0x1f,"Logical unit not ready, microcode download required"}, 815 {0x04,0x20,"Logical unit not ready, logical unit reset required"}, 816 {0x04,0x21,"Logical unit not ready, hard reset required"}, 817 {0x04,0x22,"Logical unit not ready, power cycle required"}, 818 {0x04,0x23,"Logical unit not ready, affiliation required"}, 819 {0x04,0x24,"Depopulation in progress"}, /* spc5r15 */ 820 {0x04,0x25,"Depopulation restoration in progress"}, /* spc6r02 */ 821 {0x05,0x00,"Logical unit does not respond to selection"}, 822 {0x06,0x00,"No reference position found"}, 823 {0x07,0x00,"Multiple peripheral devices selected"}, 824 {0x08,0x00,"Logical unit communication failure"}, 825 {0x08,0x01,"Logical unit communication time-out"}, 826 {0x08,0x02,"Logical unit communication parity error"}, 827 {0x08,0x03,"Logical unit communication CRC error (Ultra-DMA/32)"}, 828 {0x08,0x04,"Unreachable copy target"}, 829 {0x09,0x00,"Track following error"}, 830 {0x09,0x01,"Tracking servo failure"}, 831 {0x09,0x02,"Focus servo failure"}, 832 {0x09,0x03,"Spindle servo failure"}, 833 {0x09,0x04,"Head select fault"}, 834 {0x09,0x05,"Vibration induced tracking error"}, 835 {0x0A,0x00,"Error log overflow"}, 836 {0x0B,0x00,"Warning"}, 837 {0x0B,0x01,"Warning - specified temperature exceeded"}, 838 {0x0B,0x02,"Warning - enclosure degraded"}, 839 {0x0B,0x03,"Warning - background self-test failed"}, 840 {0x0B,0x04,"Warning - background pre-scan detected medium error"}, 841 {0x0B,0x05,"Warning - background medium scan detected medium error"}, 842 {0x0B,0x06,"Warning - non-volatile cache now volatile"}, 843 {0x0B,0x07,"Warning - degraded power to non-volatile cache"}, 844 {0x0B,0x08,"Warning - power loss expected"}, 845 {0x0B,0x09,"Warning - device statistics notification active"}, 846 {0x0B,0x0A,"Warning - high critical temperature limit exceeded"}, 847 {0x0B,0x0B,"Warning - low critical temperature limit exceeded"}, 848 {0x0B,0x0C,"Warning - high operating temperature limit exceeded"}, 849 {0x0B,0x0D,"Warning - low operating temperature limit exceeded"}, 850 {0x0B,0x0E,"Warning - high critical humidity limit exceeded"}, 851 {0x0B,0x0F,"Warning - low critical humidity limit exceeded"}, 852 {0x0B,0x10,"Warning - high operating humidity limit exceeded"}, 853 {0x0B,0x11,"Warning - low operating humidity limit exceeded"}, 854 {0x0B,0x12,"Warning - microcode security at risk"}, 855 {0x0B,0x13,"Warning - microcode digital signature validation failure"}, 856 {0x0B,0x14,"Warning - physical element status change"}, /* spc5r15 */ 857 {0x0C,0x00,"Write error"}, 858 {0x0C,0x01,"Write error - recovered with auto reallocation"}, 859 {0x0C,0x02,"Write error - auto reallocation failed"}, 860 {0x0C,0x03,"Write error - recommend reassignment"}, 861 {0x0C,0x04,"Compression check miscompare error"}, 862 {0x0C,0x05,"Data expansion occurred during compression"}, 863 {0x0C,0x06,"Block not compressible"}, 864 {0x0C,0x07,"Write error - recovery needed"}, 865 {0x0C,0x08,"Write error - recovery failed"}, 866 {0x0C,0x09,"Write error - loss of streaming"}, 867 {0x0C,0x0A,"Write error - padding blocks added"}, 868 {0x0C,0x0B,"Auxiliary memory write error"}, 869 {0x0C,0x0C,"Write error - unexpected unsolicited data"}, 870 {0x0C,0x0D,"Write error - not enough unsolicited data"}, 871 {0x0C,0x0E,"Multiple write errors"}, 872 {0x0C,0x0F,"Defects in error window"}, 873 {0x0C,0x10,"Incomplete multiple atomic write operations"}, 874 {0x0C,0x11,"Write error - recovery scan needed"}, 875 {0x0C,0x12,"Write error - insufficient zone resources"}, 876 {0x0D,0x00,"Error detected by third party temporary initiator"}, 877 {0x0D,0x01,"Third party device failure"}, 878 {0x0D,0x02,"Copy target device not reachable"}, 879 {0x0D,0x03,"Incorrect copy target device type"}, 880 {0x0D,0x04,"Copy target device data underrun"}, 881 {0x0D,0x05,"Copy target device data overrun"}, 882 {0x0E,0x00,"Invalid information unit"}, 883 {0x0E,0x01,"Information unit too short"}, 884 {0x0E,0x02,"Information unit too long"}, 885 {0x0E,0x03,"Invalid field in command information unit"}, 886 {0x10,0x00,"Id CRC or ECC error"}, 887 {0x10,0x01,"Logical block guard check failed"}, 888 {0x10,0x02,"Logical block application tag check failed"}, 889 {0x10,0x03,"Logical block reference tag check failed"}, 890 {0x10,0x04,"Logical block protection error on recover buffered data"}, 891 {0x10,0x05,"Logical block protection method error"}, 892 {0x11,0x00,"Unrecovered read error"}, 893 {0x11,0x01,"Read retries exhausted"}, 894 {0x11,0x02,"Error too long to correct"}, 895 {0x11,0x03,"Multiple read errors"}, 896 {0x11,0x04,"Unrecovered read error - auto reallocate failed"}, 897 {0x11,0x05,"L-EC uncorrectable error"}, 898 {0x11,0x06,"CIRC unrecovered error"}, 899 {0x11,0x07,"Data re-synchronization error"}, 900 {0x11,0x08,"Incomplete block read"}, 901 {0x11,0x09,"No gap found"}, 902 {0x11,0x0A,"Miscorrected error"}, 903 {0x11,0x0B,"Unrecovered read error - recommend reassignment"}, 904 {0x11,0x0C,"Unrecovered read error - recommend rewrite the data"}, 905 {0x11,0x0D,"De-compression CRC error"}, 906 {0x11,0x0E,"Cannot decompress using declared algorithm"}, 907 {0x11,0x0F,"Error reading UPC/EAN number"}, 908 {0x11,0x10,"Error reading ISRC number"}, 909 {0x11,0x11,"Read error - loss of streaming"}, 910 {0x11,0x12,"Auxiliary memory read error"}, 911 {0x11,0x13,"Read error - failed retransmission request"}, 912 {0x11,0x14,"Read error - LBA marked bad by application client"}, 913 {0x11,0x15,"Write after sanitize required"}, 914 {0x12,0x00,"Address mark not found for id field"}, 915 {0x13,0x00,"Address mark not found for data field"}, 916 {0x14,0x00,"Recorded entity not found"}, 917 {0x14,0x01,"Record not found"}, 918 {0x14,0x02,"Filemark or setmark not found"}, 919 {0x14,0x03,"End-of-data not found"}, 920 {0x14,0x04,"Block sequence error"}, 921 {0x14,0x05,"Record not found - recommend reassignment"}, 922 {0x14,0x06,"Record not found - data auto-reallocated"}, 923 {0x14,0x07,"Locate operation failure"}, 924 {0x15,0x00,"Random positioning error"}, 925 {0x15,0x01,"Mechanical positioning error"}, 926 {0x15,0x02,"Positioning error detected by read of medium"}, 927 {0x16,0x00,"Data synchronization mark error"}, 928 {0x16,0x01,"Data sync error - data rewritten"}, 929 {0x16,0x02,"Data sync error - recommend rewrite"}, 930 {0x16,0x03,"Data sync error - data auto-reallocated"}, 931 {0x16,0x04,"Data sync error - recommend reassignment"}, 932 {0x17,0x00,"Recovered data with no error correction applied"}, 933 {0x17,0x01,"Recovered data with retries"}, 934 {0x17,0x02,"Recovered data with positive head offset"}, 935 {0x17,0x03,"Recovered data with negative head offset"}, 936 {0x17,0x04,"Recovered data with retries and/or circ applied"}, 937 {0x17,0x05,"Recovered data using previous sector id"}, 938 {0x17,0x06,"Recovered data without ECC - data auto-reallocated"}, 939 {0x17,0x07,"Recovered data without ECC - recommend reassignment"}, 940 {0x17,0x08,"Recovered data without ECC - recommend rewrite"}, 941 {0x17,0x09,"Recovered data without ECC - data rewritten"}, 942 {0x18,0x00,"Recovered data with error correction applied"}, 943 {0x18,0x01,"Recovered data with error corr. & retries applied"}, 944 {0x18,0x02,"Recovered data - data auto-reallocated"}, 945 {0x18,0x03,"Recovered data with CIRC"}, 946 {0x18,0x04,"Recovered data with L-EC"}, 947 {0x18,0x05,"Recovered data - recommend reassignment"}, 948 {0x18,0x06,"Recovered data - recommend rewrite"}, 949 {0x18,0x07,"Recovered data with ECC - data rewritten"}, 950 {0x18,0x08,"Recovered data with linking"}, 951 {0x19,0x00,"Defect list error"}, 952 {0x19,0x01,"Defect list not available"}, 953 {0x19,0x02,"Defect list error in primary list"}, 954 {0x19,0x03,"Defect list error in grown list"}, 955 {0x1A,0x00,"Parameter list length error"}, 956 {0x1B,0x00,"Synchronous data transfer error"}, 957 {0x1C,0x00,"Defect list not found"}, 958 {0x1C,0x01,"Primary defect list not found"}, 959 {0x1C,0x02,"Grown defect list not found"}, 960 {0x1D,0x00,"Miscompare during verify operation"}, 961 {0x1D,0x01,"Miscompare verify of unmapped lba"}, 962 {0x1E,0x00,"Recovered id with ECC correction"}, 963 {0x1F,0x00,"Partial defect list transfer"}, 964 {0x20,0x00,"Invalid command operation code"}, 965 {0x20,0x01,"Access denied - initiator pending-enrolled"}, 966 {0x20,0x02,"Access denied - no access rights"}, 967 {0x20,0x03,"Access denied - invalid mgmt id key"}, 968 {0x20,0x04,"Illegal command while in write capable state"}, 969 {0x20,0x05,"Write type operation while in read capable state (obs)"}, 970 {0x20,0x06,"Illegal command while in explicit address mode"}, 971 {0x20,0x07,"Illegal command while in implicit address mode"}, 972 {0x20,0x08,"Access denied - enrollment conflict"}, 973 {0x20,0x09,"Access denied - invalid LU identifier"}, 974 {0x20,0x0A,"Access denied - invalid proxy token"}, 975 {0x20,0x0B,"Access denied - ACL LUN conflict"}, 976 {0x20,0x0C,"Illegal command when not in append-only mode"}, 977 {0x20,0x0D,"Not an administrative logical unit"}, 978 {0x20,0x0E,"Not a subsidiary logical unit"}, 979 {0x20,0x0F,"Not a conglomerate logical unit"}, 980 {0x21,0x00,"Logical block address out of range"}, 981 {0x21,0x01,"Invalid element address"}, 982 {0x21,0x02,"Invalid address for write"}, 983 {0x21,0x03,"Invalid write crossing layer jump"}, 984 {0x21,0x04,"Unaligned write command"}, 985 {0x21,0x05,"Write boundary violation"}, 986 {0x21,0x06,"Attempt to read invalid data"}, 987 {0x21,0x07,"Read boundary violation"}, 988 {0x21,0x08,"Misaligned write command"}, 989 {0x21,0x09,"Attempt to access gap zone"}, 990 {0x22,0x00,"Illegal function (use 20 00, 24 00, or 26 00)"}, 991 {0x23,0x00,"Invalid token operation, cause not reportable"}, 992 {0x23,0x01,"Invalid token operation, unsupported token type"}, 993 {0x23,0x02,"Invalid token operation, remote token usage not supported"}, 994 {0x23,0x03,"invalid token operation, remote rod token creation not " 995 "supported"}, 996 {0x23,0x04,"Invalid token operation, token unknown"}, 997 {0x23,0x05,"Invalid token operation, token corrupt"}, 998 {0x23,0x06,"Invalid token operation, token revoked"}, 999 {0x23,0x07,"Invalid token operation, token expired"}, 1000 {0x23,0x08,"Invalid token operation, token cancelled"}, 1001 {0x23,0x09,"Invalid token operation, token deleted"}, 1002 {0x23,0x0a,"Invalid token operation, invalid token length"}, 1003 {0x24,0x00,"Invalid field in cdb"}, 1004 {0x24,0x01,"CDB decryption error"}, 1005 {0x24,0x02,"Invalid cdb field while in explicit block model (obs)"}, 1006 {0x24,0x03,"Invalid cdb field while in implicit block model (obs)"}, 1007 {0x24,0x04,"Security audit value frozen"}, 1008 {0x24,0x05,"Security working key frozen"}, 1009 {0x24,0x06,"Nonce not unique"}, 1010 {0x24,0x07,"Nonce timestamp out of range"}, 1011 {0x24,0x08,"Invalid xcdb"}, 1012 {0x24,0x09,"Invalid fast format"}, 1013 {0x25,0x00,"Logical unit not supported"}, 1014 {0x26,0x00,"Invalid field in parameter list"}, 1015 {0x26,0x01,"Parameter not supported"}, 1016 {0x26,0x02,"Parameter value invalid"}, 1017 {0x26,0x03,"Threshold parameters not supported"}, 1018 {0x26,0x04,"Invalid release of persistent reservation"}, 1019 {0x26,0x05,"Data decryption error"}, 1020 {0x26,0x06,"Too many target descriptors"}, 1021 {0x26,0x07,"Unsupported target descriptor type code"}, 1022 {0x26,0x08,"Too many segment descriptors"}, 1023 {0x26,0x09,"Unsupported segment descriptor type code"}, 1024 {0x26,0x0A,"Unexpected inexact segment"}, 1025 {0x26,0x0B,"Inline data length exceeded"}, 1026 {0x26,0x0C,"Invalid operation for copy source or destination"}, 1027 {0x26,0x0D,"Copy segment granularity violation"}, 1028 {0x26,0x0E,"Invalid parameter while port is enabled"}, 1029 {0x26,0x0F,"Invalid data-out buffer integrity check value"}, 1030 {0x26,0x10,"Data decryption key fail limit reached"}, 1031 {0x26,0x11,"Incomplete key-associated data set"}, 1032 {0x26,0x12,"Vendor specific key reference not found"}, 1033 {0x26,0x13,"Application tag mode page is invalid"}, 1034 {0x26,0x14,"Tape stream mirroring prevented"}, 1035 {0x26,0x15,"Copy source or copy destination not authorized"}, 1036 {0x26,0x16,"Fast copy not possible"}, 1037 {0x27,0x00,"Write protected"}, 1038 {0x27,0x01,"Hardware write protected"}, 1039 {0x27,0x02,"Logical unit software write protected"}, 1040 {0x27,0x03,"Associated write protect"}, 1041 {0x27,0x04,"Persistent write protect"}, 1042 {0x27,0x05,"Permanent write protect"}, 1043 {0x27,0x06,"Conditional write protect"}, 1044 {0x27,0x07,"Space allocation failed write protect"}, 1045 {0x27,0x08,"Zone is read only"}, 1046 {0x28,0x00,"Not ready to ready change, medium may have changed"}, 1047 {0x28,0x01,"Import or export element accessed"}, 1048 {0x28,0x02,"Format-layer may have changed"}, 1049 {0x28,0x03,"Import/export element accessed, medium changed"}, 1050 {0x29,0x00,"Power on, reset, or bus device reset occurred"}, 1051 {0x29,0x01,"Power on occurred"}, 1052 {0x29,0x02,"SCSI bus reset occurred"}, 1053 {0x29,0x03,"Bus device reset function occurred"}, 1054 {0x29,0x04,"Device internal reset"}, 1055 {0x29,0x05,"Transceiver mode changed to single-ended"}, 1056 {0x29,0x06,"Transceiver mode changed to lvd"}, 1057 {0x29,0x07,"I_T nexus loss occurred"}, 1058 {0x2A,0x00,"Parameters changed"}, 1059 {0x2A,0x01,"Mode parameters changed"}, 1060 {0x2A,0x02,"Log parameters changed"}, 1061 {0x2A,0x03,"Reservations preempted"}, 1062 {0x2A,0x04,"Reservations released"}, 1063 {0x2A,0x05,"Registrations preempted"}, 1064 {0x2A,0x06,"Asymmetric access state changed"}, 1065 {0x2A,0x07,"Implicit asymmetric access state transition failed"}, 1066 {0x2A,0x08,"Priority changed"}, 1067 {0x2A,0x09,"Capacity data has changed"}, 1068 {0x2A,0x0c, "Error recovery attributes have changed"}, 1069 {0x2A,0x0d, "Data encryption capabilities changed"}, 1070 {0x2A,0x10,"Timestamp changed"}, 1071 {0x2A,0x11,"Data encryption parameters changed by another i_t nexus"}, 1072 {0x2A,0x12,"Data encryption parameters changed by vendor specific event"}, 1073 {0x2A,0x13,"Data encryption key instance counter has changed"}, 1074 {0x2A,0x0a,"Error history i_t nexus cleared"}, 1075 {0x2A,0x0b,"Error history snapshot released"}, 1076 {0x2A,0x14,"SA creation capabilities data has changed"}, 1077 {0x2A,0x15,"Medium removal prevention preempted"}, 1078 {0x2A,0x16,"Zone reset write pointer recommended"}, 1079 {0x2B,0x00,"Copy cannot execute since host cannot disconnect"}, 1080 {0x2C,0x00,"Command sequence error"}, 1081 {0x2C,0x01,"Too many windows specified"}, 1082 {0x2C,0x02,"Invalid combination of windows specified"}, 1083 {0x2C,0x03,"Current program area is not empty"}, 1084 {0x2C,0x04,"Current program area is empty"}, 1085 {0x2C,0x05,"Illegal power condition request"}, 1086 {0x2C,0x06,"Persistent prevent conflict"}, 1087 {0x2C,0x07,"Previous busy status"}, 1088 {0x2C,0x08,"Previous task set full status"}, 1089 {0x2C,0x09,"Previous reservation conflict status"}, 1090 {0x2C,0x0A,"Partition or collection contains user objects"}, 1091 {0x2C,0x0B,"Not reserved"}, 1092 {0x2C,0x0C,"ORWRITE generation does not match"}, 1093 {0x2C,0x0D,"Reset write pointer not allowed"}, 1094 {0x2C,0x0E,"Zone is offline"}, 1095 {0x2C,0x0F,"Stream not open"}, 1096 {0x2C,0x10,"Unwritten data in zone"}, 1097 {0x2C,0x11,"Descriptor format sense data required"}, 1098 {0x2C,0x12,"Zone is inactive"}, 1099 {0x2C,0x13,"Well known logical unit access required"}, /* spc6r02 */ 1100 {0x2D,0x00,"Overwrite error on update in place"}, 1101 {0x2E,0x00,"Insufficient time for operation"}, 1102 {0x2E,0x01,"Command timeout before processing"}, 1103 {0x2E,0x02,"Command timeout during processing"}, 1104 {0x2E,0x03,"Command timeout during processing due to error recovery"}, 1105 {0x2F,0x00,"Commands cleared by another initiator"}, 1106 {0x2F,0x01,"Commands cleared by power loss notification"}, 1107 {0x2F,0x02,"Commands cleared by device server"}, 1108 {0x2F,0x03,"Some commands cleared by queuing layer event"}, 1109 {0x30,0x00,"Incompatible medium installed"}, 1110 {0x30,0x01,"Cannot read medium - unknown format"}, 1111 {0x30,0x02,"Cannot read medium - incompatible format"}, 1112 {0x30,0x03,"Cleaning cartridge installed"}, 1113 {0x30,0x04,"Cannot write medium - unknown format"}, 1114 {0x30,0x05,"Cannot write medium - incompatible format"}, 1115 {0x30,0x06,"Cannot format medium - incompatible medium"}, 1116 {0x30,0x07,"Cleaning failure"}, 1117 {0x30,0x08,"Cannot write - application code mismatch"}, 1118 {0x30,0x09,"Current session not fixated for append"}, 1119 {0x30,0x0A,"Cleaning request rejected"}, 1120 {0x30,0x0B,"Cleaning tape expired"}, 1121 {0x30,0x0C,"WORM medium - overwrite attempted"}, 1122 {0x30,0x0D,"WORM medium - integrity check"}, 1123 {0x30,0x10,"Medium not formatted"}, 1124 {0x30,0x11,"Incompatible volume type"}, 1125 {0x30,0x12,"Incompatible volume qualifier"}, 1126 {0x30,0x13,"Cleaning volume expired"}, 1127 {0x31,0x00,"Medium format corrupted"}, 1128 {0x31,0x01,"Format command failed"}, 1129 {0x31,0x02,"Zoned formatting failed due to spare linking"}, 1130 {0x31,0x03,"Sanitize command failed"}, 1131 {0x31,0x04,"Depopulation failed"}, /* spc5r15 */ 1132 {0x31,0x05,"Depopulation restoration failed"}, /* spc6r02 */ 1133 {0x32,0x00,"No defect spare location available"}, 1134 {0x32,0x01,"Defect list update failure"}, 1135 {0x33,0x00,"Tape length error"}, 1136 {0x34,0x00,"Enclosure failure"}, 1137 {0x35,0x00,"Enclosure services failure"}, 1138 {0x35,0x01,"Unsupported enclosure function"}, 1139 {0x35,0x02,"Enclosure services unavailable"}, 1140 {0x35,0x03,"Enclosure services transfer failure"}, 1141 {0x35,0x04,"Enclosure services transfer refused"}, 1142 {0x35,0x05,"Enclosure services checksum error"}, 1143 {0x36,0x00,"Ribbon, ink, or toner failure"}, 1144 {0x37,0x00,"Rounded parameter"}, 1145 {0x38,0x00,"Event status notification"}, 1146 {0x38,0x02,"Esn - power management class event"}, 1147 {0x38,0x04,"Esn - media class event"}, 1148 {0x38,0x06,"Esn - device busy class event"}, 1149 {0x38,0x07,"Thin provisioning soft threshold reached"}, 1150 {0x38,0x08,"Depopulation interrupted"}, /* spc6r03 */ 1151 {0x39,0x00,"Saving parameters not supported"}, 1152 {0x3A,0x00,"Medium not present"}, 1153 {0x3A,0x01,"Medium not present - tray closed"}, 1154 {0x3A,0x02,"Medium not present - tray open"}, 1155 {0x3A,0x03,"Medium not present - loadable"}, 1156 {0x3A,0x04,"Medium not present - medium auxiliary memory accessible"}, 1157 {0x3B,0x00,"Sequential positioning error"}, 1158 {0x3B,0x01,"Tape position error at beginning-of-medium"}, 1159 {0x3B,0x02,"Tape position error at end-of-medium"}, 1160 {0x3B,0x03,"Tape or electronic vertical forms unit not ready"}, 1161 {0x3B,0x04,"Slew failure"}, 1162 {0x3B,0x05,"Paper jam"}, 1163 {0x3B,0x06,"Failed to sense top-of-form"}, 1164 {0x3B,0x07,"Failed to sense bottom-of-form"}, 1165 {0x3B,0x08,"Reposition error"}, 1166 {0x3B,0x09,"Read past end of medium"}, 1167 {0x3B,0x0A,"Read past beginning of medium"}, 1168 {0x3B,0x0B,"Position past end of medium"}, 1169 {0x3B,0x0C,"Position past beginning of medium"}, 1170 {0x3B,0x0D,"Medium destination element full"}, 1171 {0x3B,0x0E,"Medium source element empty"}, 1172 {0x3B,0x0F,"End of medium reached"}, 1173 {0x3B,0x11,"Medium magazine not accessible"}, 1174 {0x3B,0x12,"Medium magazine removed"}, 1175 {0x3B,0x13,"Medium magazine inserted"}, 1176 {0x3B,0x14,"Medium magazine locked"}, 1177 {0x3B,0x15,"Medium magazine unlocked"}, 1178 {0x3B,0x16,"Mechanical positioning or changer error"}, 1179 {0x3B,0x17,"Read past end of user object"}, 1180 {0x3B,0x18,"Element disabled"}, 1181 {0x3B,0x19,"Element enabled"}, 1182 {0x3B,0x1a,"Data transfer device removed"}, 1183 {0x3B,0x1b,"Data transfer device inserted"}, 1184 {0x3B,0x1c,"Too many logical objects on partition to support operation"}, 1185 {0x3B,0x20,"Element static information changed"}, 1186 {0x3D,0x00,"Invalid bits in identify message"}, 1187 {0x3E,0x00,"Logical unit has not self-configured yet"}, 1188 {0x3E,0x01,"Logical unit failure"}, 1189 {0x3E,0x02,"Timeout on logical unit"}, 1190 {0x3E,0x03,"Logical unit failed self-test"}, 1191 {0x3E,0x04,"Logical unit unable to update self-test log"}, 1192 {0x3F,0x00,"Target operating conditions have changed"}, 1193 {0x3F,0x01,"Microcode has been changed"}, 1194 {0x3F,0x02,"Changed operating definition"}, 1195 {0x3F,0x03,"Inquiry data has changed"}, 1196 {0x3F,0x04,"Component device attached"}, 1197 {0x3F,0x05,"Device identifier changed"}, 1198 {0x3F,0x06,"Redundancy group created or modified"}, 1199 {0x3F,0x07,"Redundancy group deleted"}, 1200 {0x3F,0x08,"Spare created or modified"}, 1201 {0x3F,0x09,"Spare deleted"}, 1202 {0x3F,0x0A,"Volume set created or modified"}, 1203 {0x3F,0x0B,"Volume set deleted"}, 1204 {0x3F,0x0C,"Volume set deassigned"}, 1205 {0x3F,0x0D,"Volume set reassigned"}, 1206 {0x3F,0x0E,"Reported luns data has changed"}, 1207 {0x3F,0x0F,"Echo buffer overwritten"}, 1208 {0x3F,0x10,"Medium loadable"}, 1209 {0x3F,0x11,"Medium auxiliary memory accessible"}, 1210 {0x3F,0x12,"iSCSI IP address added"}, 1211 {0x3F,0x13,"iSCSI IP address removed"}, 1212 {0x3F,0x14,"iSCSI IP address changed"}, 1213 {0x3F,0x15,"Inspect referrals sense descriptors"}, 1214 {0x3F,0x16,"Microcode has been changed without reset"}, 1215 {0x3F,0x17,"Zone transition to full"}, 1216 {0x3F,0x18,"Bind completed"}, 1217 {0x3F,0x19,"Bind redirected"}, 1218 {0x3F,0x1A,"Subsidiary binding changed"}, 1219 1220 /* 1221 * ASC 0x40, 0x41 and 0x42 overridden by "additional2" array entries 1222 * for ascq > 1. Preferred error message for this group is 1223 * "Diagnostic failure on component nn (80h-ffh)". 1224 */ 1225 {0x40,0x00,"Ram failure (should use 40 nn)"}, 1226 {0x41,0x00,"Data path failure (should use 40 nn)"}, 1227 {0x42,0x00,"Power-on or self-test failure (should use 40 nn)"}, 1228 1229 {0x43,0x00,"Message error"}, 1230 {0x44,0x00,"Internal target failure"}, 1231 {0x44,0x01,"Persistent reservation information lost"}, 1232 {0x44,0x71,"ATA device failed Set Features"}, 1233 {0x45,0x00,"Select or reselect failure"}, 1234 {0x46,0x00,"Unsuccessful soft reset"}, 1235 {0x47,0x00,"SCSI parity error"}, 1236 {0x47,0x01,"Data phase CRC error detected"}, 1237 {0x47,0x02,"SCSI parity error detected during st data phase"}, 1238 {0x47,0x03,"Information unit iuCRC error detected"}, 1239 {0x47,0x04,"Asynchronous information protection error detected"}, 1240 {0x47,0x05,"Protocol service CRC error"}, 1241 {0x47,0x06,"Phy test function in progress"}, 1242 {0x47,0x7F,"Some commands cleared by iSCSI protocol event"}, 1243 {0x48,0x00,"Initiator detected error message received"}, 1244 {0x49,0x00,"Invalid message error"}, 1245 {0x4A,0x00,"Command phase error"}, 1246 {0x4B,0x00,"Data phase error"}, 1247 {0x4B,0x01,"Invalid target port transfer tag received"}, 1248 {0x4B,0x02,"Too much write data"}, 1249 {0x4B,0x03,"Ack/nak timeout"}, 1250 {0x4B,0x04,"Nak received"}, 1251 {0x4B,0x05,"Data offset error"}, 1252 {0x4B,0x06,"Initiator response timeout"}, 1253 {0x4B,0x07,"Connection lost"}, 1254 {0x4B,0x08,"Data-in buffer overflow - data buffer size"}, 1255 {0x4B,0x09,"Data-in buffer overflow - data buffer descriptor area"}, 1256 {0x4B,0x0A,"Data-in buffer error"}, 1257 {0x4B,0x0B,"Data-out buffer overflow - data buffer size"}, 1258 {0x4B,0x0C,"Data-out buffer overflow - data buffer descriptor area"}, 1259 {0x4B,0x0D,"Data-out buffer error"}, 1260 {0x4B,0x0E,"PCIe fabric error"}, 1261 {0x4B,0x0f,"PCIe completion timeout"}, 1262 {0x4B,0x10,"PCIe completer abort"}, 1263 {0x4B,0x11,"PCIe poisoned tlp received"}, 1264 {0x4B,0x12,"PCIe ecrc check failed"}, 1265 {0x4B,0x13,"PCIe unsupported request"}, 1266 {0x4B,0x14,"PCIe acs violation"}, 1267 {0x4B,0x15,"PCIe tlp prefix blocked"}, 1268 {0x4C,0x00,"Logical unit failed self-configuration"}, 1269 /* 1270 * ASC 0x4D overridden by an "additional2" array entry 1271 * so there is no need to have them here. 1272 */ 1273 /* {0x4D,0x00,"Tagged overlapped commands (nn = queue tag)"}, */ 1274 1275 {0x4E,0x00,"Overlapped commands attempted"}, 1276 {0x50,0x00,"Write append error"}, 1277 {0x50,0x01,"Write append position error"}, 1278 {0x50,0x02,"Position error related to timing"}, 1279 {0x51,0x00,"Erase failure"}, 1280 {0x51,0x01,"Erase failure - incomplete erase operation detected"}, 1281 {0x52,0x00,"Cartridge fault"}, 1282 {0x53,0x00,"Media load or eject failed"}, 1283 {0x53,0x01,"Unload tape failure"}, 1284 {0x53,0x02,"Medium removal prevented"}, 1285 {0x53,0x03,"Medium removal prevented by data transfer element"}, 1286 {0x53,0x04,"Medium thread or unthread failure"}, 1287 {0x53,0x05,"Volume identifier invalid"}, 1288 {0x53,0x06,"Volume identifier missing"}, 1289 {0x53,0x07,"Duplicate volume identifier"}, 1290 {0x53,0x08,"Element status unknown"}, 1291 {0x53,0x09,"Data transfer device error - load failed"}, 1292 {0x53,0x0A,"Data transfer device error - unload failed"}, 1293 {0x53,0x0B,"Data transfer device error - unload missing"}, 1294 {0x53,0x0C,"Data transfer device error - eject failed"}, 1295 {0x53,0x0D,"Data transfer device error - library communication failed"}, 1296 {0x54,0x00,"SCSI to host system interface failure"}, 1297 {0x55,0x00,"System resource failure"}, 1298 {0x55,0x01,"System buffer full"}, 1299 {0x55,0x02,"Insufficient reservation resources"}, 1300 {0x55,0x03,"Insufficient resources"}, 1301 {0x55,0x04,"Insufficient registration resources"}, 1302 {0x55,0x05,"Insufficient access control resources"}, 1303 {0x55,0x06,"Auxiliary memory out of space"}, 1304 {0x55,0x07,"Quota error"}, 1305 {0x55,0x08,"Maximum number of supplemental decryption keys exceeded"}, 1306 {0x55,0x09,"Medium auxiliary memory not accessible"}, 1307 {0x55,0x0a,"Data currently unavailable"}, 1308 {0x55,0x0b,"Insufficient power for operation"}, 1309 {0x55,0x0c,"Insufficient resources to create rod"}, 1310 {0x55,0x0d,"Insufficient resources to create rod token"}, 1311 {0x55,0x0e,"Insufficient zone resources"}, 1312 {0x55,0x0f,"Insufficient zone resources to complete write"}, 1313 {0x55,0x10,"Maximum number of streams open"}, 1314 {0x55,0x11,"Insufficient resources to bind"}, 1315 {0x57,0x00,"Unable to recover table-of-contents"}, 1316 {0x58,0x00,"Generation does not exist"}, 1317 {0x59,0x00,"Updated block read"}, 1318 {0x5A,0x00,"Operator request or state change input"}, 1319 {0x5A,0x01,"Operator medium removal request"}, 1320 {0x5A,0x02,"Operator selected write protect"}, 1321 {0x5A,0x03,"Operator selected write permit"}, 1322 {0x5B,0x00,"Log exception"}, 1323 {0x5B,0x01,"Threshold condition met"}, 1324 {0x5B,0x02,"Log counter at maximum"}, 1325 {0x5B,0x03,"Log list codes exhausted"}, 1326 {0x5C,0x00,"Rpl status change"}, 1327 {0x5C,0x01,"Spindles synchronized"}, 1328 {0x5C,0x02,"Spindles not synchronized"}, 1329 {0x5D,0x00,"Failure prediction threshold exceeded"}, 1330 {0x5D,0x01,"Media failure prediction threshold exceeded"}, 1331 {0x5D,0x02,"Logical unit failure prediction threshold exceeded"}, 1332 {0x5D,0x03,"spare area exhaustion prediction threshold exceeded"}, 1333 {0x5D,0x10,"Hardware impending failure general hard drive failure"}, 1334 {0x5D,0x11,"Hardware impending failure drive error rate too high" }, 1335 {0x5D,0x12,"Hardware impending failure data error rate too high" }, 1336 {0x5D,0x13,"Hardware impending failure seek error rate too high" }, 1337 {0x5D,0x14,"Hardware impending failure too many block reassigns"}, 1338 {0x5D,0x15,"Hardware impending failure access times too high" }, 1339 {0x5D,0x16,"Hardware impending failure start unit times too high" }, 1340 {0x5D,0x17,"Hardware impending failure channel parametrics"}, 1341 {0x5D,0x18,"Hardware impending failure controller detected"}, 1342 {0x5D,0x19,"Hardware impending failure throughput performance"}, 1343 {0x5D,0x1A,"Hardware impending failure seek time performance"}, 1344 {0x5D,0x1B,"Hardware impending failure spin-up retry count"}, 1345 {0x5D,0x1C,"Hardware impending failure drive calibration retry count"}, 1346 {0x5D,0x1D,"Hardware impending failure power loss protection circuit"}, 1347 {0x5D,0x20,"Controller impending failure general hard drive failure"}, 1348 {0x5D,0x21,"Controller impending failure drive error rate too high" }, 1349 {0x5D,0x22,"Controller impending failure data error rate too high" }, 1350 {0x5D,0x23,"Controller impending failure seek error rate too high" }, 1351 {0x5D,0x24,"Controller impending failure too many block reassigns"}, 1352 {0x5D,0x25,"Controller impending failure access times too high" }, 1353 {0x5D,0x26,"Controller impending failure start unit times too high" }, 1354 {0x5D,0x27,"Controller impending failure channel parametrics"}, 1355 {0x5D,0x28,"Controller impending failure controller detected"}, 1356 {0x5D,0x29,"Controller impending failure throughput performance"}, 1357 {0x5D,0x2A,"Controller impending failure seek time performance"}, 1358 {0x5D,0x2B,"Controller impending failure spin-up retry count"}, 1359 {0x5D,0x2C,"Controller impending failure drive calibration retry count"}, 1360 {0x5D,0x30,"Data channel impending failure general hard drive failure"}, 1361 {0x5D,0x31,"Data channel impending failure drive error rate too high" }, 1362 {0x5D,0x32,"Data channel impending failure data error rate too high" }, 1363 {0x5D,0x33,"Data channel impending failure seek error rate too high" }, 1364 {0x5D,0x34,"Data channel impending failure too many block reassigns"}, 1365 {0x5D,0x35,"Data channel impending failure access times too high" }, 1366 {0x5D,0x36,"Data channel impending failure start unit times too high" }, 1367 {0x5D,0x37,"Data channel impending failure channel parametrics"}, 1368 {0x5D,0x38,"Data channel impending failure controller detected"}, 1369 {0x5D,0x39,"Data channel impending failure throughput performance"}, 1370 {0x5D,0x3A,"Data channel impending failure seek time performance"}, 1371 {0x5D,0x3B,"Data channel impending failure spin-up retry count"}, 1372 {0x5D,0x3C,"Data channel impending failure drive calibration retry count"}, 1373 {0x5D,0x40,"Servo impending failure general hard drive failure"}, 1374 {0x5D,0x41,"Servo impending failure drive error rate too high" }, 1375 {0x5D,0x42,"Servo impending failure data error rate too high" }, 1376 {0x5D,0x43,"Servo impending failure seek error rate too high" }, 1377 {0x5D,0x44,"Servo impending failure too many block reassigns"}, 1378 {0x5D,0x45,"Servo impending failure access times too high" }, 1379 {0x5D,0x46,"Servo impending failure start unit times too high" }, 1380 {0x5D,0x47,"Servo impending failure channel parametrics"}, 1381 {0x5D,0x48,"Servo impending failure controller detected"}, 1382 {0x5D,0x49,"Servo impending failure throughput performance"}, 1383 {0x5D,0x4A,"Servo impending failure seek time performance"}, 1384 {0x5D,0x4B,"Servo impending failure spin-up retry count"}, 1385 {0x5D,0x4C,"Servo impending failure drive calibration retry count"}, 1386 {0x5D,0x50,"Spindle impending failure general hard drive failure"}, 1387 {0x5D,0x51,"Spindle impending failure drive error rate too high" }, 1388 {0x5D,0x52,"Spindle impending failure data error rate too high" }, 1389 {0x5D,0x53,"Spindle impending failure seek error rate too high" }, 1390 {0x5D,0x54,"Spindle impending failure too many block reassigns"}, 1391 {0x5D,0x55,"Spindle impending failure access times too high" }, 1392 {0x5D,0x56,"Spindle impending failure start unit times too high" }, 1393 {0x5D,0x57,"Spindle impending failure channel parametrics"}, 1394 {0x5D,0x58,"Spindle impending failure controller detected"}, 1395 {0x5D,0x59,"Spindle impending failure throughput performance"}, 1396 {0x5D,0x5A,"Spindle impending failure seek time performance"}, 1397 {0x5D,0x5B,"Spindle impending failure spin-up retry count"}, 1398 {0x5D,0x5C,"Spindle impending failure drive calibration retry count"}, 1399 {0x5D,0x60,"Firmware impending failure general hard drive failure"}, 1400 {0x5D,0x61,"Firmware impending failure drive error rate too high" }, 1401 {0x5D,0x62,"Firmware impending failure data error rate too high" }, 1402 {0x5D,0x63,"Firmware impending failure seek error rate too high" }, 1403 {0x5D,0x64,"Firmware impending failure too many block reassigns"}, 1404 {0x5D,0x65,"Firmware impending failure access times too high" }, 1405 {0x5D,0x66,"Firmware impending failure start unit times too high" }, 1406 {0x5D,0x67,"Firmware impending failure channel parametrics"}, 1407 {0x5D,0x68,"Firmware impending failure controller detected"}, 1408 {0x5D,0x69,"Firmware impending failure throughput performance"}, 1409 {0x5D,0x6A,"Firmware impending failure seek time performance"}, 1410 {0x5D,0x6B,"Firmware impending failure spin-up retry count"}, 1411 {0x5D,0x6C,"Firmware impending failure drive calibration retry count"}, 1412 {0x5D,0x73,"Media impending failure endurance limit met"}, 1413 {0x5D,0xFF,"Failure prediction threshold exceeded (false)"}, 1414 {0x5E,0x00,"Low power condition on"}, 1415 {0x5E,0x01,"Idle condition activated by timer"}, 1416 {0x5E,0x02,"Standby condition activated by timer"}, 1417 {0x5E,0x03,"Idle condition activated by command"}, 1418 {0x5E,0x04,"Standby condition activated by command"}, 1419 {0x5E,0x05,"Idle_b condition activated by timer"}, 1420 {0x5E,0x06,"Idle_b condition activated by command"}, 1421 {0x5E,0x07,"Idle_c condition activated by timer"}, 1422 {0x5E,0x08,"Idle_c condition activated by command"}, 1423 {0x5E,0x09,"Standby_y condition activated by timer"}, 1424 {0x5E,0x0a,"Standby_y condition activated by command"}, 1425 {0x5E,0x41,"Power state change to active"}, 1426 {0x5E,0x42,"Power state change to idle"}, 1427 {0x5E,0x43,"Power state change to standby"}, 1428 {0x5E,0x45,"Power state change to sleep"}, 1429 {0x5E,0x47,"Power state change to device control"}, 1430 {0x60,0x00,"Lamp failure"}, 1431 {0x61,0x00,"Video acquisition error"}, 1432 {0x61,0x01,"Unable to acquire video"}, 1433 {0x61,0x02,"Out of focus"}, 1434 {0x62,0x00,"Scan head positioning error"}, 1435 {0x63,0x00,"End of user area encountered on this track"}, 1436 {0x63,0x01,"Packet does not fit in available space"}, 1437 {0x64,0x00,"Illegal mode for this track"}, 1438 {0x64,0x01,"Invalid packet size"}, 1439 {0x65,0x00,"Voltage fault"}, 1440 {0x66,0x00,"Automatic document feeder cover up"}, 1441 {0x66,0x01,"Automatic document feeder lift up"}, 1442 {0x66,0x02,"Document jam in automatic document feeder"}, 1443 {0x66,0x03,"Document miss feed automatic in document feeder"}, 1444 {0x67,0x00,"Configuration failure"}, 1445 {0x67,0x01,"Configuration of incapable logical units failed"}, 1446 {0x67,0x02,"Add logical unit failed"}, 1447 {0x67,0x03,"Modification of logical unit failed"}, 1448 {0x67,0x04,"Exchange of logical unit failed"}, 1449 {0x67,0x05,"Remove of logical unit failed"}, 1450 {0x67,0x06,"Attachment of logical unit failed"}, 1451 {0x67,0x07,"Creation of logical unit failed"}, 1452 {0x67,0x08,"Assign failure occurred"}, 1453 {0x67,0x09,"Multiply assigned logical unit"}, 1454 {0x67,0x0A,"Set target port groups command failed"}, 1455 {0x67,0x0B,"ATA device feature not enabled"}, 1456 {0x67,0x0C,"Command rejected"}, 1457 {0x67,0x0D,"Explicit bind not allowed"}, 1458 {0x68,0x00,"Logical unit not configured"}, 1459 {0x68,0x01,"Subsidiary logical unit not configured"}, 1460 {0x69,0x00,"Data loss on logical unit"}, 1461 {0x69,0x01,"Multiple logical unit failures"}, 1462 {0x69,0x02,"Parity/data mismatch"}, 1463 {0x6A,0x00,"Informational, refer to log"}, 1464 {0x6B,0x00,"State change has occurred"}, 1465 {0x6B,0x01,"Redundancy level got better"}, 1466 {0x6B,0x02,"Redundancy level got worse"}, 1467 {0x6C,0x00,"Rebuild failure occurred"}, 1468 {0x6D,0x00,"Recalculate failure occurred"}, 1469 {0x6E,0x00,"Command to logical unit failed"}, 1470 {0x6F,0x00,"Copy protection key exchange failure - authentication " 1471 "failure"}, 1472 {0x6F,0x01,"Copy protection key exchange failure - key not present"}, 1473 {0x6F,0x02,"Copy protection key exchange failure - key not established"}, 1474 {0x6F,0x03,"Read of scrambled sector without authentication"}, 1475 {0x6F,0x04,"Media region code is mismatched to logical unit region"}, 1476 {0x6F,0x05,"Drive region must be permanent/region reset count error"}, 1477 {0x6F,0x06,"Insufficient block count for binding nonce recording"}, 1478 {0x6F,0x07,"Conflict in binding nonce recording"}, 1479 {0x6F,0x08,"Insufficient permission"}, 1480 {0x6F,0x09,"Invalid drive-host pairing server"}, 1481 {0x6F,0x0A,"Drive-host pairing suspended"}, 1482 /* 1483 * ASC 0x70 overridden by an "additional2" array entry 1484 * so there is no need to have them here. 1485 */ 1486 /* {0x70,0x00,"Decompression exception short algorithm id of nn"}, */ 1487 1488 {0x71,0x00,"Decompression exception long algorithm id"}, 1489 {0x72,0x00,"Session fixation error"}, 1490 {0x72,0x01,"Session fixation error writing lead-in"}, 1491 {0x72,0x02,"Session fixation error writing lead-out"}, 1492 {0x72,0x03,"Session fixation error - incomplete track in session"}, 1493 {0x72,0x04,"Empty or partially written reserved track"}, 1494 {0x72,0x05,"No more track reservations allowed"}, 1495 {0x72,0x06,"RMZ extension is not allowed"}, 1496 {0x72,0x07,"No more test zone extensions are allowed"}, 1497 {0x73,0x00,"CD control error"}, 1498 {0x73,0x01,"Power calibration area almost full"}, 1499 {0x73,0x02,"Power calibration area is full"}, 1500 {0x73,0x03,"Power calibration area error"}, 1501 {0x73,0x04,"Program memory area update failure"}, 1502 {0x73,0x05,"Program memory area is full"}, 1503 {0x73,0x06,"RMA/PMA is almost full"}, 1504 {0x73,0x10,"Current power calibration area almost full"}, 1505 {0x73,0x11,"Current power calibration area is full"}, 1506 {0x73,0x17,"RDZ is full"}, 1507 {0x74,0x00,"Security error"}, 1508 {0x74,0x01,"Unable to decrypt data"}, 1509 {0x74,0x02,"Unencrypted data encountered while decrypting"}, 1510 {0x74,0x03,"Incorrect data encryption key"}, 1511 {0x74,0x04,"Cryptographic integrity validation failed"}, 1512 {0x74,0x05,"Error decrypting data"}, 1513 {0x74,0x06,"Unknown signature verification key"}, 1514 {0x74,0x07,"Encryption parameters not usable"}, 1515 {0x74,0x08,"Digital signature validation failure"}, 1516 {0x74,0x09,"Encryption mode mismatch on read"}, 1517 {0x74,0x0a,"Encrypted block not raw read enabled"}, 1518 {0x74,0x0b,"Incorrect Encryption parameters"}, 1519 {0x74,0x0c,"Unable to decrypt parameter list"}, 1520 {0x74,0x0d,"Encryption algorithm disabled"}, 1521 {0x74,0x10,"SA creation parameter value invalid"}, 1522 {0x74,0x11,"SA creation parameter value rejected"}, 1523 {0x74,0x12,"Invalid SA usage"}, 1524 {0x74,0x21,"Data encryption configuration prevented"}, 1525 {0x74,0x30,"SA creation parameter not supported"}, 1526 {0x74,0x40,"Authentication failed"}, 1527 {0x74,0x61,"External data encryption key manager access error"}, 1528 {0x74,0x62,"External data encryption key manager error"}, 1529 {0x74,0x63,"External data encryption key not found"}, 1530 {0x74,0x64,"External data encryption request not authorized"}, 1531 {0x74,0x6e,"External data encryption control timeout"}, 1532 {0x74,0x6f,"External data encryption control error"}, 1533 {0x74,0x71,"Logical unit access not authorized"}, 1534 {0x74,0x79,"Security conflict in translated device"}, 1535 {0, 0, NULL} 1536 }; 1537 1538 #else /* SG_SCSI_STRINGS */ 1539 1540 struct sg_lib_asc_ascq_range_t sg_lib_asc_ascq_range[] = 1541 { 1542 {0, 0, 0, NULL} 1543 }; 1544 1545 struct sg_lib_asc_ascq_t sg_lib_asc_ascq[] = 1546 { 1547 {0, 0, NULL} 1548 }; 1549 #endif /* SG_SCSI_STRINGS */ 1550 1551 const char * sg_lib_sense_key_desc[] = { 1552 "No Sense", /* Filemark, ILI and/or EOM; progress 1553 indication (during FORMAT); power 1554 condition sensing (REQUEST SENSE) */ 1555 "Recovered Error", /* The last command completed successfully 1556 but used error correction */ 1557 "Not Ready", /* The addressed target is not ready */ 1558 "Medium Error", /* Data error detected on the medium */ 1559 "Hardware Error", /* Controller or device failure */ 1560 "Illegal Request", 1561 "Unit Attention", /* Removable medium was changed, or 1562 the target has been reset */ 1563 "Data Protect", /* Access to the data is blocked */ 1564 "Blank Check", /* Reached unexpected written or unwritten 1565 region of the medium */ 1566 "Vendor specific(9)", /* Vendor specific */ 1567 "Copy Aborted", /* COPY or COMPARE was aborted */ 1568 "Aborted Command", /* The target aborted the command */ 1569 "Equal", /* SEARCH DATA found data equal (obsolete) */ 1570 "Volume Overflow", /* Medium full with data to be written */ 1571 "Miscompare", /* Source data and data on the medium 1572 do not agree */ 1573 "Completed" /* may occur for successful cmd (spc4r23) */ 1574 }; 1575 1576 const char * sg_lib_pdt_strs[32] = { /* should have 2**5 elements */ 1577 /* 0 */ "disk", 1578 "tape", 1579 "printer", /* obsolete, spc5r01 */ 1580 "processor", /* often SAF-TE device, copy manager */ 1581 "write once optical disk", /* obsolete, spc5r01 */ 1582 /* 5 */ "cd/dvd", 1583 "scanner", /* obsolete */ 1584 "optical memory device", 1585 "medium changer", 1586 "communications", /* obsolete */ 1587 /* 0xa */ "graphics [0xa]", /* obsolete */ 1588 "graphics [0xb]", /* obsolete */ 1589 "storage array controller", 1590 "enclosure services device", 1591 "simplified direct access device", 1592 "optical card reader/writer device", 1593 /* 0x10 */ "bridge controller commands", 1594 "object based storage", 1595 "automation/driver interface", 1596 "security manager device", /* obsolete, spc5r01 */ 1597 "host managed zoned block", 1598 "0x15", "0x16", "0x17", "0x18", 1599 "0x19", "0x1a", "0x1b", "0x1c", "0x1d", 1600 "well known logical unit", 1601 "unknown or no device type", /* coupled with PQ=3 for not accessible 1602 via this lu's port (try the other) */ 1603 }; 1604 1605 const char * sg_lib_transport_proto_strs[] = 1606 { 1607 "Fibre Channel Protocol for SCSI (FCP-5)", /* now at fcp5r01 */ 1608 "SCSI Parallel Interface (SPI-5)", /* obsolete in spc5r01 */ 1609 "Serial Storage Architecture SCSI-3 Protocol (SSA-S3P)", 1610 "Serial Bus Protocol for IEEE 1394 (SBP-3)", 1611 "SCSI RDMA Protocol (SRP)", 1612 "Internet SCSI (iSCSI)", 1613 "Serial Attached SCSI Protocol (SPL-4)", 1614 "Automation/Drive Interface Transport (ADT-2)", 1615 "AT Attachment Interface (ACS-2)", /* 0x8 */ 1616 "USB Attached SCSI (UAS-2)", 1617 "SCSI over PCI Express (SOP)", 1618 "PCIe", /* added in spc5r02 */ 1619 "Oxc", "Oxd", "Oxe", 1620 "No specific protocol" 1621 }; 1622 1623 /* SCSI Feature Sets array. code->value, pdt->peri_dev_type (-1 for SPC) */ 1624 struct sg_lib_value_name_t sg_lib_scsi_feature_sets[] = 1625 { 1626 {SCSI_FS_SPC_DISCOVERY_2016, -1, "Discovery 2016"}, 1627 {SCSI_FS_SBC_BASE_2010, PDT_DISK, "SBC Base 2010"}, 1628 {SCSI_FS_SBC_BASE_2016, PDT_DISK, "SBC Base 2016"}, 1629 {SCSI_FS_SBC_BASIC_PROV_2016, PDT_DISK, "Basic provisioning 2016"}, 1630 {SCSI_FS_SBC_DRIVE_MAINT_2016, PDT_DISK, "Drive maintenance 2016"}, 1631 {SCSI_FS_ZBC_HOST_AWARE_2020, PDT_DISK_ZBC, "Host Aware 2020"}, 1632 {SCSI_FS_ZBC_HOST_MANAGED_2020, PDT_DISK_ZBC, "Host Managed 2020"}, 1633 {SCSI_FS_ZBC_DOMAINS_REALMS_2020, PDT_DISK_ZBC, "Domains and Realms 2020"}, 1634 {0x0, 0, NULL}, /* 0x0 is reserved sfs; trailing sentinel */ 1635 }; 1636 1637 #if (SG_SCSI_STRINGS && HAVE_NVME && (! IGNORE_NVME)) 1638 1639 /* Commands sent to the NVMe Admin Queue (queue id 0) have the following 1640 * names in the NVM Express 1.3a document dated 20171024 */ 1641 struct sg_lib_simple_value_name_t sg_lib_nvme_admin_cmd_arr[] = 1642 { 1643 {0x0, "Delete I/O Submission Queue"}, /* first mandatory command */ 1644 {0x1, "Create I/O Submission Queue"}, 1645 {0x2, "Get Log Page"}, 1646 {0x4, "Delete I/O Completion Queue"}, 1647 {0x5, "Create I/O Completion Queue"}, 1648 {0x6, "Identify"}, 1649 {0x8, "Abort"}, 1650 {0x9, "Set Features"}, 1651 {0xa, "Get Features"}, 1652 {0xc, "Asynchronous Event Request"}, /* last mandatory command */ 1653 {0xd, "Namespace Management"}, /* first optional command */ 1654 {0x10, "Firmware commit"}, 1655 {0x11, "Firmware image download"}, 1656 {0x14, "Device Self-test"}, 1657 {0x15, "Namespace Attachment"}, 1658 {0x18, "Keep Alive"}, 1659 {0x19, "Directive Send"}, 1660 {0x1a, "Directive Receive"}, 1661 {0x1c, "Virtualization Management"}, 1662 {0x1d, "NVMe-MI Send"}, /* SES SEND DIAGNOSTIC cmd passes thru here */ 1663 {0x1e, "NVMe-MI Receive"}, /* RECEIVE DIAGNOSTIC RESULTS thru here */ 1664 {0x7c, "Doorbell Buffer Config"}, 1665 {0x7f, "NVMe over Fabrics"}, 1666 1667 /* I/O command set specific 0x80 to 0xbf */ 1668 {0x80, "Format NVM"}, /* first NVM specific */ 1669 {0x81, "Security Send"}, 1670 {0x82, "Security Receive"}, 1671 {0x84, "Sanitize"}, /* last NVM specific in 1.3a */ 1672 {0x86, "Get LBA status"}, /* NVM specific, new in 1.4 */ 1673 /* Vendor specific 0xc0 to 0xff */ 1674 {0xffff, NULL}, /* Sentinel */ 1675 }; 1676 1677 /* Commands sent any NVMe non-Admin Queue (queue id >0) for the NVM command 1678 * set have the following names in the NVM Express 1.3a document dated 1679 * 20171024 */ 1680 struct sg_lib_simple_value_name_t sg_lib_nvme_nvm_cmd_arr[] = 1681 { 1682 {0x0, "Flush"}, /* first mandatory command */ 1683 {0x1, "Write"}, 1684 {0x2, "Read"}, /* last mandatory command */ 1685 {0x4, "Write Uncorrectable"}, /* first optional command */ 1686 {0x5, "Compare"}, 1687 {0x8, "Write Zeroes"}, 1688 {0x9, "Dataset Management"}, 1689 {0xd, "Reservation Register"}, 1690 {0xe, "Reservation Report"}, 1691 {0x11, "Reservation Acquire"}, 1692 {0x15, "Reservation Release"}, /* last optional command in 1.3a */ 1693 1694 /* Vendor specific 0x80 to 0xff */ 1695 {0xffff, NULL}, /* Sentinel */ 1696 }; 1697 1698 1699 /* .value is completion queue's DW3 as follows: ((DW3 >> 17) & 0x3ff) 1700 * .peri_dev_type is an index for the sg_lib_scsi_status_sense_arr[] 1701 * .name is taken from NVMe 1.3a document, section 4.6.1.2.1 with less 1702 * capitalization. 1703 * NVMe term bits 31:17 of DW3 in the completion field as the "Status 1704 * Field" (SF). Bit 31 is "Do not retry" (DNR) and bit 30 is "More" (M). 1705 * Bits 29:28 are reserved, bit 27:25 are the "Status Code Type" (SCT) 1706 * and bits 24:17 are the Status Code (SC). This table is in ascending 1707 * order of its .value field so a binary search could be done on it. */ 1708 struct sg_lib_value_name_t sg_lib_nvme_cmd_status_arr[] = 1709 { 1710 /* Generic command status values, Status Code Type (SCT): 0h 1711 * Lowest 8 bits are the Status Code (SC), in this case: 1712 * 00h - 7Fh: Applicable to Admin Command Set, or across multiple 1713 * command sets 1714 * 80h - BFh: I/O Command Set Specific status codes 1715 * c0h - FFh: I/O Vendor Specific status codes */ 1716 {0x0, 0, "Successful completion"}, 1717 {0x1, 1, "Invalid command opcode"}, 1718 {0x2, 2, "Invalid field in command"}, 1719 {0x3, 2, "Command id conflict"}, 1720 {0x4, 3, "Data transfer error"}, 1721 {0x5, 4, "Command aborted due to power loss notification"}, 1722 {0x6, 5, "Internal error"}, 1723 {0x7, 6, "Command abort requested"}, 1724 {0x8, 6, "Command aborted due to SQ deletion"}, 1725 {0x9, 6, "Command aborted due to failed fused command"}, 1726 {0xa, 6, "Command aborted due to missing fused command"}, 1727 {0xb, 7, "Invalid namespace or format"}, 1728 {0xc, 5, "Command sequence error"}, 1729 {0xd, 5, "Invalid SGL segment descriptor"}, 1730 {0xe, 5, "Invalid number of SGL descriptors"}, 1731 {0xf, 5, "Data SGL length invalid"}, 1732 {0x10, 5, "Metadata SGL length invalid"}, 1733 {0x11, 5, "SGL descriptor type invalid"}, 1734 {0x12, 5, "Invalid use of controller memory buffer"}, 1735 {0x13, 5, "PRP offset invalid"}, 1736 {0x14, 2, "Atomic write unit exceeded"}, 1737 {0x15, 8, "Operation denied"}, 1738 {0x16, 5, "SGL offset invalid"}, 1739 {0x17, 5, "Reserved [0x17]"}, 1740 {0x18, 5, "Host identifier inconsistent format"}, 1741 {0x19, 5, "Keep alive timeout expired"}, 1742 {0x1a, 5, "Keep alive timeout invalid"}, 1743 {0x1b, 6, "Command aborted due to Preempt and Abort"}, 1744 {0x1c, 10, "Sanitize failed"}, 1745 {0x1d, 11, "Sanitize in progress"}, 1746 {0x1e, 5, "SGL data block granularity invalid"}, 1747 {0x1f, 5, "Command not supported for queue in CMB"}, 1748 {0x20, 18, "Namespace is write protected"}, /* NVMe 1.4 */ 1749 {0x21, 6, "Command interrupted"}, /* NVMe 1.4 */ 1750 {0x22, 5, "Transient transport error"}, /* NVMe 1.4 */ 1751 {0x23, 5, "Prohibited by lockdown"}, /* NVMe 2.0 */ 1752 {0x24, 5, "Admin command: media not ready"}, /* NVMe 2.0 */ 1753 1754 /* 0x80 - 0xbf: I/O command set specific */ 1755 /* Command specific status values, NVM (I/O) Command Set */ 1756 {0x80, 12, "LBA out of range"}, 1757 {0x81, 3, "Capacity exceeded"}, 1758 {0x82, 13, "Namespace not ready"}, 1759 {0x83, 14, "Reservation conflict"}, 1760 {0x84, 15, "Format in progress"}, 1761 {0x85, 2, "Invalid value size"}, 1762 {0x86, 2, "Invalid key size"}, 1763 {0x87, 2, "KV key does not exist"}, 1764 {0x88, 15, "Unrecovered error"}, 1765 {0x89, 2, "Key exists"}, 1766 1767 /* Command specific status values, ZNS (NVM) Command Set */ 1768 {0xb8, 0x1f, "Zone boundary error"}, 1769 {0xb9, 0x2, "Zone is full"}, 1770 {0xba, 0x1b, "Zone is read only"}, 1771 {0xbb, 0x1c, "Zone is offline"}, 1772 {0xbc, 2, "Zone invalid write"}, 1773 {0xbd, 0x20, "Too many active zones"}, 1774 {0xbe, 0x20, "Too many open zones"}, 1775 {0xbf, 2, "Invalid zone state transition"}, 1776 /* 0xc0 - 0xff: vendor specific */ 1777 1778 /* Command specific status values, Status Code Type (SCT): 1h */ 1779 {0x100, 5, "Completion queue invalid"}, 1780 {0x101, 5, "Invalid queue identifier"}, 1781 {0x102, 5, "Invalid queue size"}, 1782 {0x103, 5, "Abort command limit exceeded"}, 1783 {0x104, 5, "Reserved [0x104]"}, 1784 {0x105, 5, "Asynchronous event request limit exceeded"}, 1785 {0x106, 5, "Invalid firmware slot"}, 1786 {0x107, 5, "Invalid firmware image"}, 1787 {0x108, 5, "Invalid interrupt vector"}, 1788 {0x109, 5, "Invalid log page"}, 1789 {0x10a,16, "Invalid format"}, 1790 {0x10b, 5, "Firmware activation requires conventional reset"}, 1791 {0x10c, 5, "Invalid queue deletion"}, 1792 {0x10d, 5, "Feature identifier not saveable"}, 1793 {0x10e, 5, "Feature not changeable"}, 1794 {0x10f, 5, "Feature not namespace specific"}, 1795 {0x110, 5, "Firmware activation requires NVM subsystem reset"}, 1796 {0x111, 5, "Firmware activation requires reset"}, 1797 {0x112, 5, "Firmware activation requires maximum time violation"}, 1798 {0x113, 5, "Firmware activation prohibited"}, 1799 {0x114, 5, "Overlapping range"}, 1800 {0x115, 5, "Namespace insufficient capacity"}, 1801 {0x116, 5, "Namespace identifier unavailable"}, 1802 {0x117, 5, "Reserved [0x107]"}, 1803 {0x118, 5, "Namespace already attached"}, 1804 {0x119, 5, "Namespace is private"}, 1805 {0x11a, 5, "Namespace not attached"}, 1806 {0x11b, 3, "Thin provisioning not supported"}, 1807 {0x11c, 3, "Controller list invalid"}, 1808 {0x11d,17, "Device self-test in progress"}, 1809 {0x11e,18, "Boot partition write prohibited"}, 1810 {0x11f, 5, "Invalid controller identifier"}, 1811 {0x120, 5, "Invalid secondary controller state"}, 1812 {0x121, 5, "Invalid number of controller resources"}, 1813 {0x122, 5, "Invalid resource identifier"}, 1814 {0x123, 5, "Sanitize prohibited while PM enabled"}, /* NVMe 1.4 */ 1815 {0x124, 5, "ANA group identifier invalid"}, /* NVMe 1.4 */ 1816 {0x125, 5, "ANA attach failed"}, /* NVMe 1.4 */ 1817 1818 /* Command specific status values, Status Code Type (SCT): 1h 1819 * for NVM (I/O) Command Set */ 1820 {0x180, 2, "Conflicting attributes"}, 1821 {0x181,19, "Invalid protection information"}, 1822 {0x182,18, "Attempted write to read only range"}, 1823 /* 0x1c0 - 0x1ff: vendor specific */ 1824 1825 /* Media and Data Integrity error values, Status Code Type (SCT): 2h */ 1826 {0x280,20, "Write fault"}, 1827 {0x281,21, "Unrecovered read error"}, 1828 {0x282,22, "End-to-end guard check error"}, 1829 {0x283,23, "End-to-end application tag check error"}, 1830 {0x284,24, "End-to-end reference tag check error"}, 1831 {0x285,25, "Compare failure"}, 1832 {0x286, 8, "Access denied"}, 1833 {0x287,26, "Deallocated or unwritten logical block"}, 1834 /* 0x2c0 - 0x2ff: vendor specific */ 1835 1836 /* Leave this Sentinel value at end of this array */ 1837 {0x3ff, 0, NULL}, 1838 }; 1839 1840 /* The sg_lib_nvme_cmd_status_arr[n].peri_dev_type field is an index 1841 * to this array. It allows an NVMe status (error) value to be mapped 1842 * to this SCSI tuple: status, sense_key, additional sense code (asc) and 1843 * asc qualifier (ascq). For brevity SAM_STAT_CHECK_CONDITION is written 1844 * as 0x2. */ 1845 struct sg_lib_4tuple_u8 sg_lib_scsi_status_sense_arr[] = 1846 { 1847 /* SCSI Status, SCSI sense key, ASC, ASCQ */ 1848 /* index: 0 */ 1849 {SAM_STAT_GOOD, SPC_SK_NO_SENSE, 0, 0}, /* it's all good */ 1850 {SAM_STAT_CHECK_CONDITION, SPC_SK_ILLEGAL_REQUEST, 0x20, 0x0},/* opcode */ 1851 {0x2, SPC_SK_ILLEGAL_REQUEST, 0x24, 0x0}, /* field in cdb */ 1852 {0x2, SPC_SK_MEDIUM_ERROR, 0x0, 0x0}, 1853 {SAM_STAT_TASK_ABORTED, SPC_SK_ABORTED_COMMAND, 0xb, 0x8}, 1854 {0x2, SPC_SK_HARDWARE_ERROR, 0x44, 0x0}, /* internal error */ 1855 {SAM_STAT_TASK_ABORTED, SPC_SK_ABORTED_COMMAND, 0x0, 0x0}, 1856 {0x2, SPC_SK_ILLEGAL_REQUEST, 0x20, 0x9}, /* invalid LU */ 1857 1858 /* index: 8 */ 1859 {0x2, SPC_SK_ILLEGAL_REQUEST, 0x20, 0x2}, /* access denied */ 1860 {0x2, SPC_SK_ILLEGAL_REQUEST, 0x2c, 0x0}, /* cmd sequence error */ 1861 {0x2, SPC_SK_MEDIUM_ERROR, 0x31, 0x3}, /* sanitize failed */ /* 10 */ 1862 {0x2, SPC_SK_NOT_READY, 0x4, 0x1b}, /* sanitize in progress */ 1863 {0x2, SPC_SK_ILLEGAL_REQUEST, 0x21, 0x0}, /* LBA out of range */ 1864 {0x2, SPC_SK_NOT_READY, 0x4, 0x0}, /* not reportable; 0x1: becoming */ 1865 {SAM_STAT_RESERVATION_CONFLICT, 0x0, 0x0, 0x0}, 1866 {0x2, SPC_SK_NOT_READY, 0x4, 0x4}, /* format in progress */ 1867 1868 /* index: 0x10 */ 1869 {0x2, SPC_SK_ILLEGAL_REQUEST, 0x31, 0x1}, /* format failed */ 1870 {0x2, SPC_SK_NOT_READY, 0x4, 0x9}, /* self-test in progress */ 1871 {0x2, SPC_SK_DATA_PROTECT, 0x27, 0x0}, /* write prohibited */ 1872 {0x2, SPC_SK_ILLEGAL_REQUEST, 0x10, 0x5}, /* protection info */ 1873 {0x2, SPC_SK_MEDIUM_ERROR, 0x3, 0x0}, /* periph dev w fault */ 1874 {0x2, SPC_SK_MEDIUM_ERROR, 0x11, 0x0}, /* unrecoc rd */ 1875 {0x2, SPC_SK_MEDIUM_ERROR, 0x10, 0x1}, /* PI guard */ 1876 {0x2, SPC_SK_MEDIUM_ERROR, 0x10, 0x2}, /* PI app tag */ 1877 1878 /* index: 0x18 */ 1879 {0x2, SPC_SK_MEDIUM_ERROR, 0x10, 0x3}, /* PI reference tag */ 1880 {0x2, SPC_SK_MISCOMPARE, 0x1d, 0x0}, /* during verify */ 1881 {0x2, SPC_SK_MEDIUM_ERROR, 0x21, 0x6}, /* read invalid data */ 1882 {0x2, SPC_SK_DATA_PROTECT, 0x27, 0x8}, /* zone is read only */ 1883 {0x2, SPC_SK_DATA_PROTECT, 0x2c, 0xe}, /* zone is offline */ 1884 {0x2, SPC_SK_DATA_PROTECT, 0x2c, 0x12}, /* zone is inactive */ 1885 {0x2, SPC_SK_DATA_PROTECT, 0x3f, 0x17}, /* zone is full */ 1886 {0x2, SPC_SK_ILLEGAL_REQUEST, 0x21, 0x5}, /* Write boundary violation */ 1887 1888 /* index: 0x20 */ 1889 {0x2, SPC_SK_DATA_PROTECT, 0x55, 0xe}, /* Insufficient zone resources */ 1890 1891 /* Leave this Sentinel value at end of this array */ 1892 {0xff, 0xff, 0xff, 0xff}, 1893 }; 1894 1895 /* These are the error (or warning) exit status values and their associated 1896 * strings. They combine utility input syntax errors, SCSI status and sense 1897 * key categories, OS errors (e.g. ENODEV for device not found), one that 1898 * indicates NVMe non-zero status plus listing those that a Unix OS generates 1899 * for any executable (that fails). The convention is 0 means no error and 1900 * that in Unix the exit status is an (unsigned) 8 bit value. */ 1901 struct sg_value_2names_t sg_exit_str_arr[] = { 1902 {0, "No errors", "may also convey true"}, 1903 {1, "Syntax error", "command line options (usually)"}, 1904 {2, "Device not ready", "type: sense key"}, 1905 {3, "Medium or hardware error", "type: sense key (plus blank check for " 1906 "tape)"}, 1907 {5, "Illegal request", "type: sense key, apart from Invalid opcode"}, 1908 {6, "Unit attention", "type: sense key"}, 1909 {7, "Data protect", "type: sense key; write protected media?"}, 1910 {9, "Illegal request, Invalid opcode", "type: sense key + asc,ascq"}, 1911 {10, "Copy aborted", "type: sense key"}, 1912 {11, "Aborted command", 1913 "type: sense key, other than protection related (asc=0x10)"}, 1914 {12, "Device not ready, standby", "type: sense key"}, 1915 {13, "Device not ready, unavailable", "type: sense key"}, 1916 {14, "Miscompare", "type: sense key"}, 1917 {15, "File error", NULL}, 1918 {17, "Illegal request with Info field", NULL}, 1919 {18, "Medium or hardware error with Info", NULL}, 1920 {20, "No sense key", "type: probably additional sense code"}, 1921 {21, "Recovered error (warning)", "type: sense key"}, 1922 /* N.B. this is a warning not error */ 1923 {22, "LBA out of range", NULL}, 1924 {24, "Reservation conflict", "type: SCSI status"}, 1925 {25, "Condition met", "type: SCSI status"}, /* from PRE-FETCH command */ 1926 {26, "Busy", "type: SCSI status"}, /* could be transport issue */ 1927 {27, "Task set full", "type: SCSI status"}, 1928 {28, "ACA aactive", "type: SCSI status"}, 1929 {29, "Task aborted", "type: SCSI status"}, 1930 {31, "Contradict", "command line options contradict or select bad mode"}, 1931 {32, "Logic error", "unexpected situation, contact author"}, 1932 {33, "SCSI command timeout", NULL}, /* OS timed out command */ 1933 {34, "Windows error number", "doesn't fit in 7 bits"}, 1934 {35, "Transport error", "driver or interconnect error"}, 1935 {36, "No errors (false)", NULL}, 1936 {40, "Aborted command, protection error", NULL}, 1937 {41, "Aborted command, protection error with Info field", NULL}, 1938 {47, "flock (Unix system call) error", NULL}, /* ddpt */ 1939 {48, "NVMe command with non-zero status", NULL}, 1940 {50, "An OS error occurred", "(errno > 46 or negative)"}, 1941 /* OS errors (errno in Unix) from 1 to 46 mapped into this range */ 1942 {97, "Malformed SCSI command", "trouble building command"}, 1943 {98, "Some other sense error", "try '-v' option for more information"}, 1944 {99, "Some other error", "possible transport of driver issue"}, 1945 {100, "Parameter list length error", NULL}, /* these for ddpt, xcopy */ 1946 {101, "Invalid field in parameter", NULL}, 1947 {102, "Too many segments in parameters", NULL}, 1948 {103, "Target underrun", NULL}, 1949 {104, "Target overrun", NULL}, 1950 {105, "Operation in progress", NULL}, 1951 {106, "Insufficient resources to create ROD", NULL}, 1952 {107, "Insufficient resources to create ROD token", NULL}, 1953 {108, "Commands cleared by device server", NULL}, 1954 {109, "See leave_reason for error", NULL}, /* internal error */ 1955 /* DDPT_CAT_TOKOP_BASE: asc=0x23, ascq=110 follow */ 1956 {110, "Invalid token operation, cause not reportable", NULL}, 1957 {111, "Invalid token operation, unsupported token type", NULL}, 1958 {112, "Invalid token operation, remote token usage not supported", NULL}, 1959 {113, "Invalid token operation, remote token creation not supported", 1960 NULL}, 1961 {114, "Invalid token operation, token unknown", NULL}, 1962 {115, "Invalid token operation, token corrupt", NULL}, 1963 {116, "Invalid token operation, token revoked", NULL}, 1964 {117, "Invalid token operation, token expired", NULL}, 1965 {118, "Invalid token operation, token cancelled", NULL}, 1966 {119, "Invalid token operation, token deleted", NULL}, 1967 {120, "Invalid token operation, invalid token length", NULL}, 1968 1969 /* The following error codes are generated by a Unix OS */ 1970 {126, "Utility found but did not have execute permissions", NULL}, 1971 {127, "Utility to be executed was not found", NULL}, 1972 {128, "Utility stopped/aborted by signal number: 0", "signal # 0 ??"}, 1973 /* 128 + <signal_number>: signal number that aborted the utility. 1974 real time signals start at offset SIGRTMIN */ 1975 /* OS signals from 1 to 126 mapped into this range (129 to 254) */ 1976 {255, "Utility returned 255 or higher", "Windows error number?"}, 1977 {0xffff, NULL, NULL}, /* end marking sentinel */ 1978 }; 1979 1980 #else /* (SG_SCSI_STRINGS && HAVE_NVME && (! IGNORE_NVME)) */ 1981 1982 struct sg_lib_simple_value_name_t sg_lib_nvme_admin_cmd_arr[] = 1983 { 1984 1985 /* Vendor specific 0x80 to 0xff */ 1986 {0xffff, NULL}, /* Sentinel */ 1987 }; 1988 1989 struct sg_lib_simple_value_name_t sg_lib_nvme_nvm_cmd_arr[] = 1990 { 1991 1992 /* Vendor specific 0x80 to 0xff */ 1993 {0xffff, NULL}, /* Sentinel */ 1994 }; 1995 1996 struct sg_lib_value_name_t sg_lib_nvme_cmd_status_arr[] = 1997 { 1998 1999 /* Leave this Sentinel value at end of this array */ 2000 {0x3ff, 0, NULL}, 2001 }; 2002 2003 struct sg_lib_4tuple_u8 sg_lib_scsi_status_sense_arr[] = 2004 { 2005 2006 /* Leave this Sentinel value at end of this array */ 2007 {0xff, 0xff, 0xff, 0xff}, 2008 }; 2009 2010 struct sg_value_2names_t sg_exit_str_arr[] = { 2011 {0xffff, NULL, NULL}, /* end marking sentinel */ 2012 }; 2013 2014 #endif /* (SG_SCSI_STRINGS && HAVE_NVME && (! IGNORE_NVME)) */ 2015