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