-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsg_lib_data.c
2064 lines (1965 loc) · 94.1 KB
/
sg_lib_data.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Copyright (c) 2007-2023 Douglas Gilbert.
* All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the BSD_LICENSE file.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <stdlib.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
#else
#define SG_SCSI_STRINGS 1
#endif
#include "sg_lib.h"
#include "sg_lib_data.h"
const char * const sg_lib_version_str = "3.14 20231125";
/* spc6r11, sbc5r05, zbc3r03 */
/* indexed by pdt; those that map to own index do not decay */
const int sg_lib_pdt_decay_arr[32] = {
PDT_DISK, PDT_TAPE, PDT_TAPE /* printer */, PDT_PROCESSOR,
PDT_DISK /* WO */, PDT_MMC, PDT_SCANNER, PDT_DISK /* optical */,
PDT_MCHANGER, PDT_COMMS, 0xa, 0xb,
PDT_SAC, PDT_SES, PDT_DISK /* rbc */, PDT_OCRW,
PDT_BCC, PDT_OSD, PDT_TAPE /* adc */, PDT_SMD,
PDT_DISK /* zbc */, 0x15, 0x16, 0x17,
0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, PDT_WLUN, PDT_UNKNOWN
};
/* SCSI Status values */
const struct sg_lib_simple_value_name_t sg_lib_sstatus_str_arr[] = {
{0x0, "Good"},
{0x2, "Check Condition"},
{0x4, "Condition Met"},
{0x8, "Busy"},
{0x10, "Intermediate (obsolete)"},
{0x14, "Intermediate-Condition Met (obsolete)"},
{0x18, "Reservation Conflict"},
{0x22, "Command terminated (obsolete)"},
{0x28, "Task Set Full"},
{0x30, "ACA Active"},
{0x40, "Task Aborted"},
{0xffff, NULL},
};
#ifdef SG_SCSI_STRINGS
const struct sg_lib_value_name_t sg_lib_normal_opcodes[] = {
{0, PDT_ALL, "Test Unit Ready"},
{0x1, PDT_ALL, "Rezero Unit"},
{0x1, PDT_TAPE, "Rewind"},
{0x3, PDT_ALL, "Request Sense"},
{0x4, PDT_DISK_ZBC, "Format Unit"},
{0x4, PDT_TAPE, "Format medium"},
{0x4, PDT_PRINTER, "Format"},
{0x5, PDT_TAPE, "Read Block Limits"},
{0x7, PDT_DISK_ZBC, "Reassign Blocks"},
{0x7, PDT_MCHANGER, "Initialize element status"},
{0x8, PDT_DISK_ZBC, "Read(6)"}, /* obsolete in sbc3r30 */
{0x8, PDT_PROCESSOR, "Receive"},
{0xa, PDT_DISK_ZBC, "Write(6)"}, /* obsolete in sbc3r30 */
{0xa, PDT_PRINTER, "Print"},
{0xa, PDT_PROCESSOR, "Send"},
{0xb, PDT_ALL, "Seek(6)"},
{0xb, PDT_TAPE, "Set capacity"},
{0xb, PDT_PRINTER, "Slew and print"},
{0xf, PDT_TAPE, "Read reverse(6)"},
{0x10, PDT_TAPE, "Write filemarks(6)"},
{0x10, PDT_PRINTER, "Synchronize buffer"},
{0x11, PDT_TAPE, "Space(6)"},
{0x12, PDT_ALL, "Inquiry"},
{0x13, PDT_TAPE, "Verify(6)"}, /* SSC */
{0x14, PDT_ALL, "Recover buffered data"},
{0x15, PDT_ALL, "Mode select(6)"},/* sbc3r31 recommends Mode select(10) */
{0x16, PDT_ALL, "Reserve(6)"}, /* obsolete in SPC-4 r11 */
{0x16, PDT_MCHANGER, "Reserve element(6)"},
{0x17, PDT_ALL, "Release(6)"}, /* obsolete in SPC-4 r11 */
{0x17, PDT_MCHANGER, "Release element(6)"},
{0x18, PDT_ALL, "Copy"}, /* obsolete in SPC-4 r11 */
{0x19, PDT_ALL, "Erase(6)"},
{0x1a, PDT_ALL, "Mode sense(6)"},/* sbc3r31 recommends Mode sense(10) */
{0x1b, PDT_ALL, "Start stop unit"},
{0x1b, PDT_TAPE, "Load unload"},
{0x1b, PDT_ADC, "Load unload"},
{0x1b, PDT_PRINTER, "Stop print"},
{0x1c, PDT_ALL, "Receive diagnostic results"},
{0x1d, PDT_ALL, "Send diagnostic"},
{0x1e, PDT_ALL, "Prevent allow medium removal"},
{0x23, PDT_MMC, "Read Format capacities"},
{0x24, PDT_ALL, "Set window"},
{0x25, PDT_ALL, "Read capacity(10)"},
/* sbc3r31 recommends Read capacity(16) */
{0x25, PDT_OCRW, "Read card capacity"},
{0x28, PDT_ALL, "Read(10)"}, /* sbc3r31 recommends Read(16) */
{0x29, PDT_ALL, "Read generation"},
{0x2a, PDT_ALL, "Write(10)"}, /* sbc3r31 recommends Write(16) */
{0x2b, PDT_ALL, "Seek(10)"},
{0x2b, PDT_TAPE, "Locate(10)"},
{0x2b, PDT_MCHANGER, "Position to element"},
{0x2c, PDT_ALL, "Erase(10)"},
{0x2d, PDT_OPTICAL, "Read updated block"},
{0x2e, PDT_ALL, "Write and verify(10)"},
/* sbc3r31 recommends Write and verify(16) */
{0x2f, PDT_ALL, "Verify(10)"}, /* sbc3r31 recommends Verify(16) */
{0x30, PDT_ALL, "Search data high(10)"},
{0x31, PDT_ALL, "Search data equal(10)"},
{0x32, PDT_ALL, "Search data low(10)"},
{0x33, PDT_ALL, "Set limits(10)"},
{0x34, PDT_ALL, "Pre-fetch(10)"}, /* sbc3r31 recommends Pre-fetch(16) */
{0x34, PDT_TAPE, "Read position"},
{0x35, PDT_ALL, "Synchronize cache(10)"},
/* SBC-3 r31 recommends Synchronize cache(16) */
{0x36, PDT_ALL, "Lock unlock cache(10)"},
{0x37, PDT_MCHANGER, "Initialize element status with range"},
{0x37, PDT_ALL, "Read defect data(10)"},
/* SBC-3 r31 recommends Read defect data(12) */
{0x38, PDT_DISK_ZBC, "Format with preset scan"},
{0x38, PDT_OCRW, "Medium scan"},
{0x39, PDT_ALL, "Compare"}, /* obsolete in SPC-4 r11 */
{0x3a, PDT_ALL, "Copy and verify"}, /* obsolete in SPC-4 r11 */
{0x3b, PDT_ALL, "Write buffer"},
{0x3c, PDT_ALL, "Read buffer(10)"},
{0x3d, PDT_OPTICAL, "Update block"},
{0x3e, PDT_ALL, "Read long(10)"}, /* obsolete in SBC-4 r7 */
{0x3f, PDT_ALL, "Write long(10)"}, /* sbc3r31 recommends Write long(16) */
{0x40, PDT_ALL, "Change definition"}, /* obsolete in SPC-4 r11 */
{0x41, PDT_ALL, "Write same(10)"}, /* sbc3r31 recommends Write same(16) */
{0x42, PDT_DISK_ZBC, "Unmap"}, /* added SPC-4 rev 18 */
{0x42, PDT_MMC, "Read sub-channel"},
{0x43, PDT_MMC, "Read TOC/PMA/ATIP"},
{0x44, PDT_ALL, "Report density support"},
{0x45, PDT_MMC, "Play audio(10)"},
{0x46, PDT_MMC, "Get configuration"},
{0x47, PDT_MMC, "Play audio msf"},
{0x48, PDT_ALL, "Sanitize"},
{0x4a, PDT_MMC, "Get event status notification"},
{0x4b, PDT_MMC, "Pause/resume"},
{0x4c, PDT_ALL, "Log select"},
{0x4d, PDT_ALL, "Log sense"},
{0x4e, PDT_MMC, "Stop play/scan"},
{0x50, PDT_DISK, "Xdwrite(10)"}, /* obsolete in SBC-3 r31 */
{0x51, PDT_DISK, "Xpwrite(10)"}, /* obsolete in SBC-4 r15 */
{0x51, PDT_MMC, "Read disk information"},
{0x52, PDT_DISK, "Xdread(10)"}, /* obsolete in SBC-3 r31 */
{0x52, PDT_MMC, "Read track information"},
{0x53, PDT_DISK, "Xdwriteread(10)"}, /* obsolete in SBC-4 r15 */
{0x54, PDT_MMC, "Send OPC information"},
{0x55, PDT_ALL, "Mode select(10)"},
{0x56, PDT_ALL, "Reserve(10)"}, /* obsolete in SPC-4 r11 */
{0x56, PDT_MCHANGER, "Reserve element(10)"},
{0x57, PDT_ALL, "Release(10)"}, /* obsolete in SPC-4 r11 */
{0x57, PDT_MCHANGER, "Release element(10)"},
{0x58, PDT_MMC, "Repair track"},
{0x5a, PDT_ALL, "Mode sense(10)"},
{0x5b, PDT_MMC, "Close track/session"},
{0x5c, PDT_MMC, "Read buffer capacity"},
{0x5d, PDT_MMC, "Send cue sheet"},
{0x5e, PDT_ALL, "Persistent reserve in"},
{0x5f, PDT_ALL, "Persistent reserve out"},
{0x7e, PDT_ALL, "Extended cdb (XCBD)"}, /* added in SPC-4 r12 */
{0x80, PDT_DISK, "Xdwrite extended(16)"}, /* obsolete in SBC-4 r15 */
{0x80, PDT_TAPE, "Write filemarks(16)"},
{0x81, PDT_DISK, "Rebuild(16)"},
{0x81, PDT_TAPE, "Read reverse(16)"},
{0x82, PDT_DISK, "Regenerate(16)"},
{0x83, PDT_ALL, "Third party copy out"},/* Extended copy before spc4r34 */
/* Following was "Receive copy results", before spc4r34 */
{0x84, PDT_ALL, "Third party copy in"},
{0x85, PDT_ALL, "ATA pass-through(16)"}, /* was 0x98 in spc3 rev21c */
{0x86, PDT_ALL, "Access control in"},
{0x87, PDT_ALL, "Access control out"},
{0x88, PDT_ALL, "Read(16)"},
{0x89, PDT_ALL, "Compare and write"},
{0x8a, PDT_ALL, "Write(16)"},
{0x8b, PDT_DISK, "Orwrite(16)"},
{0x8c, PDT_ALL, "Read attribute"},
{0x8d, PDT_ALL, "Write attribute"},
{0x8e, PDT_ALL, "Write and verify(16)"},
{0x8f, PDT_ALL, "Verify(16)"},
{0x90, PDT_ALL, "Pre-fetch(16)"},
{0x91, PDT_ALL, "Synchronize cache(16)"},
{0x91, PDT_TAPE, "Space(16)"},
{0x92, PDT_DISK, "Lock unlock cache(16)"},
{0x92, PDT_TAPE, "Locate(16)"},
{0x93, PDT_ALL, "Write same(16)"},
{0x93, PDT_TAPE, "Erase(16)"},
{0x94, PDT_DISK_ZBC, "ZBC out"}, /* new sbc4r04, has service actions */
{0x95, PDT_DISK_ZBC, "ZBC in"}, /* new sbc4r04, has service actions */
{0x9a, PDT_ALL, "Write stream(16)"}, /* added sbc4r07 */
{0x9b, PDT_ALL, "Read buffer(16)"}, /* added spc5r02 */
{0x9c, PDT_ALL, "Write atomic(16)"},
{0x9d, PDT_ALL, "Service action bidirectional"}, /* added spc4r35 */
{0x9e, PDT_ALL, "Service action in(16)"},
{0x9f, PDT_ALL, "Service action out(16)"},
{0xa0, PDT_ALL, "Report luns"},
{0xa1, PDT_ALL, "ATA pass-through(12)"},
{0xa1, PDT_MMC, "Blank"},
{0xa2, PDT_ALL, "Security protocol in"},
{0xa3, PDT_ALL, "Maintenance in"},
{0xa3, PDT_MMC, "Send key"},
{0xa4, PDT_ALL, "Maintenance out"},
{0xa4, PDT_MMC, "Report key"},
{0xa5, PDT_ALL, "Move medium"},
{0xa5, PDT_MMC, "Play audio(12)"},
{0xa6, PDT_MCHANGER, "Exchange medium"},
{0xa6, PDT_MMC, "Load/unload medium"},
{0xa7, PDT_OPTICAL, "Move medium attached"},
{0xa7, PDT_MMC, "Set read ahead"},
{0xa8, PDT_ALL, "Read(12)"}, /* SBC-3 r31 recommends Read(16) */
{0xa9, PDT_ALL, "Service action out(12)"},
{0xaa, PDT_ALL, "Write(12)"}, /* SBC-3 r31 recommends Write(16) */
{0xab, PDT_ALL, "Service action in(12)"},
{0xac, PDT_OPTICAL, "erase(12)"},
{0xac, PDT_MMC, "Get performance"},
{0xad, PDT_MMC, "Read DVD/BD structure"},
{0xae, PDT_ALL, "Write and verify(12)"},
/* SBC-3 r31 recommends Write and verify(16) */
{0xaf, PDT_ALL, "Verify(12)"}, /* SBC-3 r31 recommends Verify(16) */
{0xb0, PDT_DISK, "Search data high(12)"},
{0xb1, PDT_DISK, "Search data equal(12)"},
{0xb1, PDT_MCHANGER, "Open/close import/export element"},
{0xb2, PDT_DISK, "Search data low(12)"},
{0xb3, PDT_DISK, "Set limits(12)"},
{0xb4, PDT_ALL, "Read element status attached"},
{0xb5, PDT_MCHANGER, "Request volume element address"},
{0xb5, PDT_ALL, "Security protocol out"},
{0xb6, PDT_MCHANGER, "Send volume tag"},
{0xb6, PDT_MMC, "Set streaming"},
{0xb7, PDT_ALL, "Read defect data(12)"},
{0xb8, PDT_ALL, "Read element status"},
{0xb9, PDT_MMC, "Read CD msf"},
{0xba, PDT_MMC, "Scan"},
{0xba, PDT_ALL, "Redundancy group in"},
{0xbb, PDT_ALL, "Redundancy group out"},
{0xbb, PDT_MMC, "Set CD speed"},
{0xbc, PDT_ALL, "Spare in"},
{0xbd, PDT_ALL, "Spare out"},
{0xbd, PDT_MMC, "Mechanism status"},
{0xbe, PDT_MMC, "Read CD"},
{0xbe, PDT_ALL, "Volume set in"},
{0xbf, PDT_MMC, "Send DVD/BD structure"},
{0xbf, PDT_ALL, "Volume set out"},
{0xffff, 0, NULL},
};
/* Read buffer(10) [0x3c] and Read buffer(16) [0x9b] service actions (sa),
* need prefix */
const struct sg_lib_value_name_t sg_lib_read_buff_arr[] = {
{0x0, PDT_ALL, "combined header and data [or multiple modes]"},
{0x2, PDT_ALL, "data"},
{0x3, PDT_ALL, "descriptor"},
{0xa, PDT_ALL, "read data from echo buffer"},
{0xb, PDT_ALL, "echo buffer descriptor"},
{0xf, PDT_ALL, "read microcode status"}, /* added in spc5r20 */
{0x1a, PDT_ALL, "enable expander comms protocol and echo buffer"},
{0x1c, PDT_ALL, "error history"},
{0xffff, 0, NULL},
};
/* Write buffer [0x3b] service actions, need prefix */
const struct sg_lib_value_name_t sg_lib_write_buff_arr[] = {
{0x0, PDT_ALL, "combined header and data [or multiple modes]"},
{0x2, PDT_ALL, "data"},
{0x4, PDT_ALL, "download microcode and activate"},
{0x5, PDT_ALL, "download microcode, save, and activate"},
{0x6, PDT_ALL, "download microcode with offsets and activate"},
{0x7, PDT_ALL, "download microcode with offsets, save, and activate"},
{0xa, PDT_ALL, "write data to echo buffer"},
{0xd, PDT_ALL, "download microcode with offsets, select activation "
"events, save and defer activate"},
{0xe, PDT_ALL, "download microcode with offsets, save and defer activate"},
{0xf, PDT_ALL, "activate deferred microcode"},
{0x1a, PDT_ALL, "enable expander comms protocol and echo buffer"},
{0x1b, PDT_ALL, "disable expander comms protocol"},
{0x1c, PDT_ALL, "download application client error history"},
{0xffff, 0, NULL},
};
/* Read position (SSC) [0x34] service actions, need prefix */
const struct sg_lib_value_name_t sg_lib_read_pos_arr[] = {
{0x0, PDT_TAPE, "short form - block id"},
{0x1, PDT_TAPE, "short form - vendor specific"},
{0x6, PDT_TAPE, "long form"},
{0x8, PDT_TAPE, "extended form"},
{0xffff, 0, NULL},
};
/* Maintenance in [0xa3] service actions */
const struct sg_lib_value_name_t sg_lib_maint_in_arr[] = {
{0x0, PDT_SAC, "Report assigned/unassigned p_extent"},
{0x0, PDT_ADC, "Report automation device attributes"},
{0x1, PDT_SAC, "Report component device"},
{0x2, PDT_SAC, "Report component device attachments"},
{0x3, PDT_SAC, "Report peripheral device"},
{0x4, PDT_SAC, "Report peripheral device associations"},
{0x5, PDT_ALL, "Report identifying information"},
/* was "Report device identifier" prior to spc4r07 */
{0x6, PDT_SAC, "Report states"},
{0x7, PDT_SAC, "Report device identification"},
{0x8, PDT_SAC, "Report unconfigured capacity"},
{0x9, PDT_SAC, "Report supported configuration method"},
{0xa, PDT_ALL, "Report target port groups"},
{0xb, PDT_ALL, "Report aliases"},
{0xc, PDT_ALL, "Report supported operation codes"},
{0xd, PDT_ALL, "Report supported task management functions"},
{0xe, PDT_ALL, "Report priority"},
{0xf, PDT_ALL, "Report timestamp"},
{0x10, PDT_ALL, "Management protocol in"},
{0x1d, PDT_DISK, "Report provisioning initialization pattern"},
/* added in sbc4r07, shares sa 0x1d with ssc5r01 (tape) */
{0x1d, PDT_TAPE, "Receive recommended access order"},
{0x1e, PDT_TAPE, "Read dynamic runtime attribute"},
{0x1e, PDT_ADC, "Report automation device attributes"},
{0x1f, PDT_ALL, "Maintenance in vendor specific"},
{0xffff, 0, NULL},
};
/* Maintenance out [0xa4] service actions */
const struct sg_lib_value_name_t sg_lib_maint_out_arr[] = {
{0x0, PDT_SAC, "Add peripheral device / component device"},
{0x0, PDT_ADC, "Set automation device attribute"},
{0x1, PDT_SAC, "Attach to component device"},
{0x2, PDT_SAC, "Exchange p_extent"},
{0x3, PDT_SAC, "Exchange peripheral device / component device"},
{0x4, PDT_SAC, "Instruct component device"},
{0x5, PDT_SAC, "Remove peripheral device / component device"},
{0x6, PDT_ALL, "Set identifying information"},
/* was "Set device identifier" prior to spc4r07 */
{0x7, PDT_SAC, "Break peripheral device / component device"},
{0xa, PDT_ALL, "Set target port groups"},
{0xb, PDT_ALL, "Change aliases"},
{0xc, PDT_ALL, "Remove I_T nexus"},
{0xe, PDT_ALL, "Set priority"},
{0xf, PDT_ALL, "Set timestamp"},
{0x10, PDT_ALL, "Management protocol out"},
{0x1d, PDT_TAPE, "Generate recommended access order"},
{0x1e, PDT_TAPE, "write dynamic runtime attribute"},
{0x1e, PDT_ADC, "Set automation device attributes"},
{0x1f, PDT_ALL, "Maintenance out vendor specific"},
{0xffff, 0, NULL},
};
/* Sanitize [0x48] service actions, need prefix */
const struct sg_lib_value_name_t sg_lib_sanitize_sa_arr[] = {
{0x1, PDT_ALL, "overwrite"},
{0x2, PDT_ALL, "block erase"},
{0x3, PDT_ALL, "cryptographic erase"},
{0x1f, PDT_ALL, "exit failure mode"},
{0xffff, 0, NULL},
};
/* Service action in(12) [0xab] service actions */
const struct sg_lib_value_name_t sg_lib_serv_in12_arr[] = {
{0x1, PDT_ALL, "Read media serial number"},
{0xffff, 0, NULL},
};
/* Service action out(12) [0xa9] service actions */
const struct sg_lib_value_name_t sg_lib_serv_out12_arr[] = {
{0x1f, PDT_ADC, "Set medium attribute"},
{0xff, PDT_ALL, "Impossible command name"},
{0xffff, 0, NULL},
};
/* Service action in(16) [0x9e] service actions */
const struct sg_lib_value_name_t sg_lib_serv_in16_arr[] = {
{0xf, PDT_ALL, "Receive binding report"}, /* added spc5r11 */
{0x10, PDT_ALL, "Read capacity(16)"},
{0x11, PDT_ALL, "Read long(16)"}, /* obsolete in SBC-4 r7 */
{0x12, PDT_ALL, "Get LBA status(16)"},/* also 32 byte variant sbc4r14 */
{0x13, PDT_ALL, "Report referrals"},
{0x14, PDT_ALL, "Stream control"},
{0x15, PDT_ALL, "Background control"},
{0x16, PDT_ALL, "Get stream status"},
{0x17, PDT_ALL, "Get physical element status"}, /* added sbc4r13 */
{0x18, PDT_ALL, "Remove element and truncate"}, /* added sbc4r13 */
{0x19, PDT_ALL, "Restore elements and rebuild"}, /* added sbc4r19 */
{0x1a, PDT_ALL, "Remove element and modify zones"}, /* added zbc2r07 */
{0xffff, 0, NULL},
};
/* Service action out(16) [0x9f] service actions */
const struct sg_lib_value_name_t sg_lib_serv_out16_arr[] = {
{0x0b, PDT_ALL, "Test bind"}, /* added spc5r13 */
{0x0c, PDT_ALL, "Prepare bind report"}, /* added spc5r11 */
{0x0d, PDT_ALL, "Set affiliation"},
{0x0e, PDT_ALL, "Bind"},
{0x0f, PDT_ALL, "Unbind"},
{0x11, PDT_ALL, "Write long(16)"},
{0x12, PDT_ALL, "Write scattered(16)"}, /* added sbc4r11 */
{0x14, PDT_DISK_ZBC, "Reset write pointer"},
{0x1f, PDT_ADC, "Notify data transfer device(16)"},
{0xffff, 0, NULL},
};
/* Service action bidirectional [0x9d] service actions */
const struct sg_lib_value_name_t sg_lib_serv_bidi_arr[] = {
{0xffff, 0, NULL},
};
/* Persistent reserve in [0x5e] service actions, need prefix */
const struct sg_lib_value_name_t sg_lib_pr_in_arr[] = {
{0x0, PDT_ALL, "read keys"},
{0x1, PDT_ALL, "read reservation"},
{0x2, PDT_ALL, "report capabilities"},
{0x3, PDT_ALL, "read full status"},
{0xffff, 0, NULL},
};
/* Persistent reserve out [0x5f] service actions, need prefix */
const struct sg_lib_value_name_t sg_lib_pr_out_arr[] = {
{0x0, PDT_ALL, "register"},
{0x1, PDT_ALL, "reserve"},
{0x2, PDT_ALL, "release"},
{0x3, PDT_ALL, "clear"},
{0x4, PDT_ALL, "preempt"},
{0x5, PDT_ALL, "preempt and abort"},
{0x6, PDT_ALL, "register and ignore existing key"},
{0x7, PDT_ALL, "register and move"},
{0x8, PDT_ALL, "replace lost reservation"},
{0xffff, 0, NULL},
};
/* Third party copy in [0x83] service actions
* Opcode 'Receive copy results' was renamed 'Third party copy in' in spc4r34
* LID1 is an abbreviation of List Identifier length of 1 byte. In SPC-5
* LID1 discontinued (references back to SPC-4) and "(LID4)" suffix removed
* as there is no need to differentiate. */
const struct sg_lib_value_name_t sg_lib_xcopy_sa_arr[] = { /* originating */
{0x0, PDT_ALL, "Extended copy(LID1)"},
{0x1, PDT_ALL, "Extended copy"}, /* 'Extended copy(LID4)' until spc5r01 */
{0x10, PDT_ALL, "Populate token"},
{0x11, PDT_ALL, "Write using token"},
{0x16, PDT_TAPE, "Set tape stream mirroring"}, /* ADC-4 and SSC-5 */
{0x1c, PDT_ALL, "Copy operation abort"},
{0xffff, 0, NULL},
};
/* Third party copy out [0x84] service actions
* Opcode 'Extended copy' was renamed 'Third party copy out' in spc4r34
* LID4 is an abbreviation of List Identifier length of 4 bytes */
const struct sg_lib_value_name_t sg_lib_rec_copy_sa_arr[] = { /* retrieve */
{0x0, PDT_ALL, "Receive copy status(LID1)"},
{0x1, PDT_ALL, "Receive copy data(LID1)"},
{0x3, PDT_ALL, "Receive copy operating parameters"},
{0x4, PDT_ALL, "Receive copy failure details(LID1)"},
{0x5, PDT_ALL, "Receive copy status"},/* was: Receive copy status(LID4) */
{0x6, PDT_ALL, "Receive copy data"}, /* was: Receive copy data(LID4) */
{0x7, PDT_ALL, "Receive ROD token information"},
{0x8, PDT_ALL, "Report all ROD tokens"},
{0x16, PDT_TAPE, "Report tape stream mirroring"}, /* SSC-5 */
{0xffff, 0, NULL},
};
/* Variable length cdb [0x7f] service actions (more than 16 bytes long) */
const struct sg_lib_value_name_t sg_lib_variable_length_arr[] = {
{0x1, PDT_ALL, "Rebuild(32)"},
{0x2, PDT_ALL, "Regenerate(32)"},
{0x3, PDT_ALL, "Xdread(32)"}, /* obsolete in SBC-3 r31 */
{0x4, PDT_ALL, "Xdwrite(32)"}, /* obsolete in SBC-3 r31 */
{0x5, PDT_ALL, "Xdwrite extended(32)"}, /* obsolete in SBC-4 r15 */
{0x6, PDT_ALL, "Xpwrite(32)"}, /* obsolete in SBC-4 r15 */
{0x7, PDT_ALL, "Xdwriteread(32)"}, /* obsolete in SBC-4 r15 */
{0x8, PDT_ALL, "Xdwrite extended(64)"}, /* obsolete in SBC-4 r15 */
{0x9, PDT_ALL, "Read(32)"},
{0xa, PDT_ALL, "Verify(32)"},
{0xb, PDT_ALL, "Write(32)"},
{0xc, PDT_ALL, "Write and verify(32)"},
{0xd, PDT_ALL, "Write same(32)"},
{0xe, PDT_ALL, "Orwrite(32)"}, /* added sbc3r25 */
{0xf, PDT_ALL, "Atomic write(32)"}, /* added sbc4r02 */
{0x10, PDT_ALL, "Write stream(32)"}, /* added sbc4r07 */
{0x11, PDT_ALL, "Write scattered(32)"}, /* added sbc4r11 */
{0x12, PDT_ALL, "Get LBA status(32)"}, /* added sbc4r14 */
{0x1800, PDT_ALL, "Receive credential"},
{0x1ff0, PDT_ALL, "ATA pass-through(32)"},/* added sat4r05 */
{0x8801, PDT_ALL, "Format OSD (osd)"},
{0x8802, PDT_ALL, "Create (osd)"},
{0x8803, PDT_ALL, "List (osd)"},
{0x8805, PDT_ALL, "Read (osd)"},
{0x8806, PDT_ALL, "Write (osd)"},
{0x8807, PDT_ALL, "Append (osd)"},
{0x8808, PDT_ALL, "Flush (osd)"},
{0x880a, PDT_ALL, "Remove (osd)"},
{0x880b, PDT_ALL, "Create partition (osd)"},
{0x880c, PDT_ALL, "Remove partition (osd)"},
{0x880e, PDT_ALL, "Get attributes (osd)"},
{0x880f, PDT_ALL, "Set attributes (osd)"},
{0x8812, PDT_ALL, "Create and write (osd)"},
{0x8815, PDT_ALL, "Create collection (osd)"},
{0x8816, PDT_ALL, "Remove collection (osd)"},
{0x8817, PDT_ALL, "List collection (osd)"},
{0x8818, PDT_ALL, "Set key (osd)"},
{0x8819, PDT_ALL, "Set master key (osd)"},
{0x881a, PDT_ALL, "Flush collection (osd)"},
{0x881b, PDT_ALL, "Flush partition (osd)"},
{0x881c, PDT_ALL, "Flush OSD (osd)"},
{0x8880, PDT_ALL, "Object structure check (osd-2)"},
{0x8881, PDT_ALL, "Format OSD (osd-2)"},
{0x8882, PDT_ALL, "Create (osd-2)"},
{0x8883, PDT_ALL, "List (osd-2)"},
{0x8884, PDT_ALL, "Punch (osd-2)"},
{0x8885, PDT_ALL, "Read (osd-2)"},
{0x8886, PDT_ALL, "Write (osd-2)"},
{0x8887, PDT_ALL, "Append (osd-2)"},
{0x8888, PDT_ALL, "Flush (osd-2)"},
{0x8889, PDT_ALL, "Clear (osd-2)"},
{0x888a, PDT_ALL, "Remove (osd-2)"},
{0x888b, PDT_ALL, "Create partition (osd-2)"},
{0x888c, PDT_ALL, "Remove partition (osd-2)"},
{0x888e, PDT_ALL, "Get attributes (osd-2)"},
{0x888f, PDT_ALL, "Set attributes (osd-2)"},
{0x8892, PDT_ALL, "Create and write (osd-2)"},
{0x8895, PDT_ALL, "Create collection (osd-2)"},
{0x8896, PDT_ALL, "Remove collection (osd-2)"},
{0x8897, PDT_ALL, "List collection (osd-2)"},
{0x8898, PDT_ALL, "Set key (osd-2)"},
{0x8899, PDT_ALL, "Set master key (osd-2)"},
{0x889a, PDT_ALL, "Flush collection (osd-2)"},
{0x889b, PDT_ALL, "Flush partition (osd-2)"},
{0x889c, PDT_ALL, "Flush OSD (osd-2)"},
{0x88a0, PDT_ALL, "Query (osd-2)"},
{0x88a1, PDT_ALL, "Remove member objects (osd-2)"},
{0x88a2, PDT_ALL, "Get member attributes (osd-2)"},
{0x88a3, PDT_ALL, "Set member attributes (osd-2)"},
{0x88b1, PDT_ALL, "Read map (osd-2)"},
{0x8f7c, PDT_ALL, "Perform SCSI command (osd-2)"},
{0x8f7d, PDT_ALL, "Perform task management function (osd-2)"},
{0x8f7e, PDT_ALL, "Perform SCSI command (osd)"},
{0x8f7f, PDT_ALL, "Perform task management function (osd)"},
{0xffff, 0, NULL},
};
/* Zoning out [0x94] service actions */
const struct sg_lib_value_name_t sg_lib_zoning_out_arr[] = {
{0x1, PDT_DISK_ZBC, "Close zone"},
{0x2, PDT_DISK_ZBC, "Finish zone"},
{0x3, PDT_DISK_ZBC, "Open zone"},
{0x4, PDT_DISK_ZBC, "Reset write pointer"},
{0x10, PDT_DISK_ZBC, "Sequentialize zone"}, /* zbc2r01b */
{0xffff, 0, NULL},
};
/* Zoning in [0x95] service actions */
const struct sg_lib_value_name_t sg_lib_zoning_in_arr[] = {
{0x0, PDT_DISK_ZBC, "Report zones"},
{0x6, PDT_DISK_ZBC, "Report realms"}, /* zbc2r04 */
{0x7, PDT_DISK_ZBC, "Report zone domains"}, /* zbc2r04 */
{0x8, PDT_DISK_ZBC, "Zone activate"}, /* zbc2r04 */
{0x9, PDT_DISK_ZBC, "Zone query"}, /* zbc2r04 */
{0xffff, 0, NULL},
};
const char * const sg_lib_tapealert_strs[] = {
"<parameter code 0, unknown>", /* 0x0 */
"Read warning",
"Write warning",
"Hard error",
"Media",
"Read failure",
"Write failure",
"Media life",
"Not data grade", /* 0x8 */
"Write protect",
"No removal",
"Cleaning media",
"Unsupported format",
"Recoverable mechanical cartridge failure",
"Unrecoverable mechanical cartridge failure",
"Memory chip in cartridge failure",
"Forced eject", /* 0x10 */
"Read only format",
"Tape directory corrupted on load",
"Nearing media life",
"Cleaning required",
"Cleaning requested",
"Expired cleaning media",
"Invalid cleaning tape",
"Retension requested", /* 0x18 */
"Dual port interface error",
"Cooling fan failing",
"Power supply failure",
"Power consumption",
"Drive maintenance",
"Hardware A",
"Hardware B",
"Interface", /* 0x20 */
"Eject media",
"Microcode update fail",
"Drive humidity",
"Drive temperature",
"Drive voltage",
"Predictive failure",
"Diagnostics required",
"Reserved (28h)", /* 0x28 */
"Reserved (29h)",
"Reserved (2Ah)",
"Reserved (2Bh)",
"Reserved (2Ch)",
"Reserved (2Dh)",
"Reserved (2Eh)",
"External data encryption control - communications failure",
"External data encryption control - key manager returned error",/* 0x30 */
"Diminished native capacity",
"Lost statistics",
"Tape directory invalid at unload",
"Tape system area write failure",
"Tape system area read failure",
"No start of data",
"Loading failure",
"Unrecoverable unload failure", /* 0x38 */
"Automation interface failure",
"Firmware failure",
"WORM medium - integrity check failed",
"WORM medium - overwrite attempted",
"Encryption policy violation",
"Reserved (3Eh)",
"Reserved (3Fh)",
"Reserved (40h)", /* 0x40 */
NULL,
};
/* Read attribute [0x8c] service actions */
const struct sg_lib_value_name_t sg_lib_read_attr_arr[] = {
{0x0, PDT_ALL, "attribute values"},
{0x1, PDT_ALL, "attribute list"},
{0x2, PDT_ALL, "logical volume list"},
{0x3, PDT_ALL, "partition list"},
{0x5, PDT_ALL, "supported attributes"},
{0xffff, 0, NULL},
};
#else /* SG_SCSI_STRINGS */
const struct sg_lib_value_name_t sg_lib_normal_opcodes[] = {
{0xffff, 0, NULL},
};
const struct sg_lib_value_name_t sg_lib_read_buff_arr[] = { /* opcode 0x3c */
{0xffff, 0, NULL},
};
const struct sg_lib_value_name_t sg_lib_write_buff_arr[] = { /* opcode 0x3b */
{0xffff, 0, NULL},
};
/* opcode 0x34 (SSC) */
const struct sg_lib_value_name_t sg_lib_read_pos_arr[] = {
{0xffff, 0, NULL},
};
const struct sg_lib_value_name_t sg_lib_maint_in_arr[] = { /* opcode 0xa3 */
{0xffff, 0, NULL},
};
const struct sg_lib_value_name_t sg_lib_maint_out_arr[] = { /* opcode 0xa4 */
{0xffff, 0, NULL},
};
/* opcode 0x94 */
const struct sg_lib_value_name_t sg_lib_sanitize_sa_arr[] = {
{0xffff, 0, NULL},
};
const struct sg_lib_value_name_t sg_lib_serv_in12_arr[] = { /* opcode 0xab */
{0xffff, 0, NULL},
};
const struct sg_lib_value_name_t sg_lib_serv_out12_arr[] = { /* opcode 0xa9 */
{0xffff, 0, NULL},
};
const struct sg_lib_value_name_t sg_lib_serv_in16_arr[] = { /* opcode 0x9e */
{0xffff, 0, NULL},
};
const struct sg_lib_value_name_t sg_lib_serv_out16_arr[] = { /* opcode 0x9f */
{0xffff, 0, NULL},
};
const struct sg_lib_value_name_t sg_lib_serv_bidi_arr[] = { /* opcode 0x9d */
{0xffff, 0, NULL},
};
const struct sg_lib_value_name_t sg_lib_pr_in_arr[] = { /* opcode 0x5e */
{0xffff, 0, NULL},
};
const struct sg_lib_value_name_t sg_lib_pr_out_arr[] = { /* opcode 0x5f */
{0xffff, 0, NULL},
};
const struct sg_lib_value_name_t sg_lib_xcopy_sa_arr[] = { /* opcode 0x83 */
{0xffff, 0, NULL},
};
const struct sg_lib_value_name_t sg_lib_rec_copy_sa_arr[] = { /* opcode 0x84 */
{0xffff, 0, NULL},
};
const struct sg_lib_value_name_t sg_lib_variable_length_arr[] = {
{0xffff, 0, NULL},
};
const struct sg_lib_value_name_t sg_lib_zoning_out_arr[] = {
{0xffff, 0, NULL},
};
const struct sg_lib_value_name_t sg_lib_zoning_in_arr[] = {
{0xffff, 0, NULL},
};
const struct sg_lib_value_name_t sg_lib_read_attr_arr[] = {
{0xffff, 0, NULL},
};
const char * const sg_lib_tapealert_strs[] = {
NULL,
};
#endif /* SG_SCSI_STRINGS */
/* A conveniently formatted list of SCSI ASC/ASCQ codes and their
* corresponding text can be found at: www.t10.org/lists/asc-num.txt
* The following should match asc-num.txt dated 20231114*/
#ifdef SG_SCSI_STRINGS
const struct sg_lib_asc_ascq_range_t sg_lib_asc_ascq_range[] =
{
{0x40,0x01,0x7f,"Ram failure [0x%x]"},
{0x40,0x80,0xff,"Diagnostic failure on component [0x%x]"},
{0x41,0x01,0xff,"Data path failure [0x%x]"},
{0x42,0x01,0xff,"Power-on or self-test failure [0x%x]"},
{0x4d,0x00,0xff,"Tagged overlapped commands [0x%x]"},
{0x70,0x00,0xff,"Decompression exception short algorithm id of 0x%x"},
{0, 0, 0, NULL}
};
const struct sg_lib_asc_ascq_t sg_lib_asc_ascq[] =
{
{0x00,0x00,"No additional sense information"},
{0x00,0x01,"Filemark detected"},
{0x00,0x02,"End-of-partition/medium detected"},
{0x00,0x03,"Setmark detected"},
{0x00,0x04,"Beginning-of-partition/medium detected"},
{0x00,0x05,"End-of-data detected"},
{0x00,0x06,"I/O process terminated"},
{0x00,0x07,"Programmable early warning detected"},
{0x00,0x11,"Audio play operation in progress"},
{0x00,0x12,"Audio play operation paused"},
{0x00,0x13,"Audio play operation successfully completed"},
{0x00,0x14,"Audio play operation stopped due to error"},
{0x00,0x15,"No current audio status to return"},
{0x00,0x16,"operation in progress"},
{0x00,0x17,"Cleaning requested"},
{0x00,0x18,"Erase operation in progress"},
{0x00,0x19,"Locate operation in progress"},
{0x00,0x1a,"Rewind operation in progress"},
{0x00,0x1b,"Set capacity operation in progress"},
{0x00,0x1c,"Verify operation in progress"},
{0x00,0x1d,"ATA pass through information available"},
{0x00,0x1e,"Conflicting SA creation request"},
{0x00,0x1f,"Logical unit transitioning to another power condition"},
{0x00,0x20,"Extended copy information available"},
{0x00,0x21,"Atomic command aborted due to ACA"},
{0x00,0x22,"Deferred microcode is pending"},
{0x00,0x23,"Overlapping atomic command in progress"}, /* spc6r08 */
{0x01,0x00,"No index/sector signal"},
{0x02,0x00,"No seek complete"},
{0x03,0x00,"Peripheral device write fault"},
{0x03,0x01,"No write current"},
{0x03,0x02,"Excessive write errors"},
{0x04,0x00,"Logical unit not ready, cause not reportable"},
{0x04,0x01,"Logical unit is in process of becoming ready"},
{0x04,0x02,"Logical unit not ready, "
"initializing command required"},
{0x04,0x03,"Logical unit not ready, "
"manual intervention required"},
{0x04,0x04,"Logical unit not ready, format in progress"},
{0x04,0x05,"Logical unit not ready, rebuild in progress"},
{0x04,0x06,"Logical unit not ready, recalculation in progress"},
{0x04,0x07,"Logical unit not ready, operation in progress"},
{0x04,0x08,"Logical unit not ready, long write in progress"},
{0x04,0x09,"Logical unit not ready, self-test in progress"},
{0x04,0x0a,"Logical unit "
"not accessible, asymmetric access state transition"},
{0x04,0x0b,"Logical unit "
"not accessible, target port in standby state"},
{0x04,0x0c,"Logical unit "
"not accessible, target port in unavailable state"},
{0x04,0x0d,"Logical unit not ready, structure check required"},
{0x04,0x0e,"Logical unit not ready, security session in progress"},
{0x04,0x10,"Logical unit not ready, "
"auxiliary memory not accessible"},
{0x04,0x11,"Logical unit not ready, "
"notify (enable spinup) required"},
{0x04,0x12,"Logical unit not ready, offline"},
{0x04,0x13,"Logical unit not ready, SA creation in progress"},
{0x04,0x14,"Logical unit not ready, space allocation in progress"},
{0x04,0x15,"Logical unit not ready, robotics disabled"},
{0x04,0x16,"Logical unit not ready, configuration required"},
{0x04,0x17,"Logical unit not ready, calibration required"},
{0x04,0x18,"Logical unit not ready, a door is open"},
{0x04,0x19,"Logical unit not ready, operating in sequential mode"},
{0x04,0x1a,"Logical unit not ready, start stop unit command in progress"},
{0x04,0x1b,"Logical unit not ready, sanitize in progress"},
{0x04,0x1c,"Logical unit not ready, additional power use not yet "
"granted"},
{0x04,0x1d,"Logical unit not ready, configuration in progress"},
{0x04,0x1e,"Logical unit not ready, microcode activation required"},
{0x04,0x1f,"Logical unit not ready, microcode download required"},
{0x04,0x20,"Logical unit not ready, logical unit reset required"},
{0x04,0x21,"Logical unit not ready, hard reset required"},
{0x04,0x22,"Logical unit not ready, power cycle required"},
{0x04,0x23,"Logical unit not ready, affiliation required"},
{0x04,0x24,"Depopulation in progress"}, /* spc5r15 */
{0x04,0x25,"Depopulation restoration in progress"}, /* spc6r02 */
{0x05,0x00,"Logical unit does not respond to selection"},
{0x06,0x00,"No reference position found"},
{0x07,0x00,"Multiple peripheral devices selected"},
{0x08,0x00,"Logical unit communication failure"},
{0x08,0x01,"Logical unit communication time-out"},
{0x08,0x02,"Logical unit communication parity error"},
{0x08,0x03,"Logical unit communication CRC error (Ultra-DMA/32)"},
{0x08,0x04,"Unreachable copy target"},
{0x09,0x00,"Track following error"},
{0x09,0x01,"Tracking servo failure"},
{0x09,0x02,"Focus servo failure"},
{0x09,0x03,"Spindle servo failure"},
{0x09,0x04,"Head select fault"},
{0x09,0x05,"Vibration induced tracking error"},
{0x0A,0x00,"Error log overflow"},
{0x0B,0x00,"Warning"},
{0x0B,0x01,"Warning - specified temperature exceeded"},
{0x0B,0x02,"Warning - enclosure degraded"},
{0x0B,0x03,"Warning - background self-test failed"},
{0x0B,0x04,"Warning - background pre-scan detected medium error"},
{0x0B,0x05,"Warning - background medium scan detected medium error"},
{0x0B,0x06,"Warning - non-volatile cache now volatile"},
{0x0B,0x07,"Warning - degraded power to non-volatile cache"},
{0x0B,0x08,"Warning - power loss expected"},
{0x0B,0x09,"Warning - device statistics notification active"},
{0x0B,0x0A,"Warning - high critical temperature limit exceeded"},
{0x0B,0x0B,"Warning - low critical temperature limit exceeded"},
{0x0B,0x0C,"Warning - high operating temperature limit exceeded"},
{0x0B,0x0D,"Warning - low operating temperature limit exceeded"},
{0x0B,0x0E,"Warning - high critical humidity limit exceeded"},
{0x0B,0x0F,"Warning - low critical humidity limit exceeded"},
{0x0B,0x10,"Warning - high operating humidity limit exceeded"},
{0x0B,0x11,"Warning - low operating humidity limit exceeded"},
{0x0B,0x12,"Warning - microcode security at risk"},
{0x0B,0x13,"Warning - microcode digital signature validation failure"},
{0x0B,0x14,"Warning - physical element status change"}, /* spc5r15 */
{0x0C,0x00,"Write error"},
{0x0C,0x01,"Write error - recovered with auto reallocation"},
{0x0C,0x02,"Write error - auto reallocation failed"},
{0x0C,0x03,"Write error - recommend reassignment"},
{0x0C,0x04,"Compression check miscompare error"},
{0x0C,0x05,"Data expansion occurred during compression"},
{0x0C,0x06,"Block not compressible"},
{0x0C,0x07,"Write error - recovery needed"},
{0x0C,0x08,"Write error - recovery failed"},
{0x0C,0x09,"Write error - loss of streaming"},
{0x0C,0x0A,"Write error - padding blocks added"},
{0x0C,0x0B,"Auxiliary memory write error"},
{0x0C,0x0C,"Write error - unexpected unsolicited data"},
{0x0C,0x0D,"Write error - not enough unsolicited data"},
{0x0C,0x0E,"Multiple write errors"},
{0x0C,0x0F,"Defects in error window"},
{0x0C,0x10,"Incomplete multiple atomic write operations"},
{0x0C,0x11,"Write error - recovery scan needed"},
{0x0C,0x12,"Write error - insufficient zone resources"},
{0x0D,0x00,"Error detected by third party temporary initiator"},
{0x0D,0x01,"Third party device failure"},
{0x0D,0x02,"Copy target device not reachable"},
{0x0D,0x03,"Incorrect copy target device type"},
{0x0D,0x04,"Copy target device data underrun"},
{0x0D,0x05,"Copy target device data overrun"},
{0x0E,0x00,"Invalid information unit"},
{0x0E,0x01,"Information unit too short"},
{0x0E,0x02,"Information unit too long"},
{0x0E,0x03,"Invalid field in command information unit"},
{0x10,0x00,"Id CRC or ECC error"},
{0x10,0x01,"Logical block guard check failed"},
{0x10,0x02,"Logical block application tag check failed"},
{0x10,0x03,"Logical block reference tag check failed"},
{0x10,0x04,"Logical block protection error on recover buffered data"},
{0x10,0x05,"Logical block protection method error"},
{0x11,0x00,"Unrecovered read error"},
{0x11,0x01,"Read retries exhausted"},
{0x11,0x02,"Error too long to correct"},
{0x11,0x03,"Multiple read errors"},
{0x11,0x04,"Unrecovered read error - auto reallocate failed"},
{0x11,0x05,"L-EC uncorrectable error"},
{0x11,0x06,"CIRC unrecovered error"},
{0x11,0x07,"Data re-synchronization error"},
{0x11,0x08,"Incomplete block read"},
{0x11,0x09,"No gap found"},
{0x11,0x0A,"Miscorrected error"},
{0x11,0x0B,"Unrecovered read error - recommend reassignment"},
{0x11,0x0C,"Unrecovered read error - recommend rewrite the data"},
{0x11,0x0D,"De-compression CRC error"},
{0x11,0x0E,"Cannot decompress using declared algorithm"},
{0x11,0x0F,"Error reading UPC/EAN number"},
{0x11,0x10,"Error reading ISRC number"},
{0x11,0x11,"Read error - loss of streaming"},
{0x11,0x12,"Auxiliary memory read error"},
{0x11,0x13,"Read error - failed retransmission request"},
{0x11,0x14,"Read error - LBA marked bad by application client"},
{0x11,0x15,"Write after sanitize required"},
{0x12,0x00,"Address mark not found for id field"},
{0x13,0x00,"Address mark not found for data field"},
{0x14,0x00,"Recorded entity not found"},
{0x14,0x01,"Record not found"},
{0x14,0x02,"Filemark or setmark not found"},
{0x14,0x03,"End-of-data not found"},
{0x14,0x04,"Block sequence error"},
{0x14,0x05,"Record not found - recommend reassignment"},
{0x14,0x06,"Record not found - data auto-reallocated"},
{0x14,0x07,"Locate operation failure"},
{0x15,0x00,"Random positioning error"},
{0x15,0x01,"Mechanical positioning error"},
{0x15,0x02,"Positioning error detected by read of medium"},
{0x16,0x00,"Data synchronization mark error"},
{0x16,0x01,"Data sync error - data rewritten"},
{0x16,0x02,"Data sync error - recommend rewrite"},
{0x16,0x03,"Data sync error - data auto-reallocated"},
{0x16,0x04,"Data sync error - recommend reassignment"},
{0x17,0x00,"Recovered data with no error correction applied"},
{0x17,0x01,"Recovered data with retries"},
{0x17,0x02,"Recovered data with positive head offset"},
{0x17,0x03,"Recovered data with negative head offset"},
{0x17,0x04,"Recovered data with retries and/or circ applied"},
{0x17,0x05,"Recovered data using previous sector id"},
{0x17,0x06,"Recovered data without ECC - data auto-reallocated"},
{0x17,0x07,"Recovered data without ECC - recommend reassignment"},
{0x17,0x08,"Recovered data without ECC - recommend rewrite"},
{0x17,0x09,"Recovered data without ECC - data rewritten"},
{0x18,0x00,"Recovered data with error correction applied"},
{0x18,0x01,"Recovered data with error corr. & retries applied"},
{0x18,0x02,"Recovered data - data auto-reallocated"},
{0x18,0x03,"Recovered data with CIRC"},
{0x18,0x04,"Recovered data with L-EC"},
{0x18,0x05,"Recovered data - recommend reassignment"},
{0x18,0x06,"Recovered data - recommend rewrite"},
{0x18,0x07,"Recovered data with ECC - data rewritten"},
{0x18,0x08,"Recovered data with linking"},
{0x19,0x00,"Defect list error"},
{0x19,0x01,"Defect list not available"},
{0x19,0x02,"Defect list error in primary list"},
{0x19,0x03,"Defect list error in grown list"},
{0x1A,0x00,"Parameter list length error"},
{0x1B,0x00,"Synchronous data transfer error"},
{0x1C,0x00,"Defect list not found"},
{0x1C,0x01,"Primary defect list not found"},
{0x1C,0x02,"Grown defect list not found"},
{0x1D,0x00,"Miscompare during verify operation"},
{0x1D,0x01,"Miscompare verify of unmapped lba"},
{0x1E,0x00,"Recovered id with ECC correction"},
{0x1F,0x00,"Partial defect list transfer"},
{0x20,0x00,"Invalid command operation code"},
{0x20,0x01,"Access denied - initiator pending-enrolled"},
{0x20,0x02,"Access denied - no access rights"},
{0x20,0x03,"Access denied - invalid mgmt id key"},
{0x20,0x04,"Illegal command while in write capable state"},
{0x20,0x05,"Write type operation while in read capable state (obs)"},
{0x20,0x06,"Illegal command while in explicit address mode"},
{0x20,0x07,"Illegal command while in implicit address mode"},
{0x20,0x08,"Access denied - enrollment conflict"},
{0x20,0x09,"Access denied - invalid LU identifier"},
{0x20,0x0A,"Access denied - invalid proxy token"},
{0x20,0x0B,"Access denied - ACL LUN conflict"},
{0x20,0x0C,"Illegal command when not in append-only mode"},
{0x20,0x0D,"Not an administrative logical unit"},
{0x20,0x0E,"Not a subsidiary logical unit"},
{0x20,0x0F,"Not a conglomerate logical unit"},
{0x21,0x00,"Logical block address out of range"},
{0x21,0x01,"Invalid element address"},
{0x21,0x02,"Invalid address for write"},
{0x21,0x03,"Invalid write crossing layer jump"},
{0x21,0x04,"Unaligned write command"},
{0x21,0x05,"Write boundary violation"},
{0x21,0x06,"Attempt to read invalid data"},
{0x21,0x07,"Read boundary violation"},
{0x21,0x08,"Misaligned write command"},
{0x21,0x09,"Attempt to access gap zone"},
{0x22,0x00,"Illegal function (use 20 00, 24 00, or 26 00)"},
{0x23,0x00,"Invalid token operation, cause not reportable"},
{0x23,0x01,"Invalid token operation, unsupported token type"},
{0x23,0x02,"Invalid token operation, remote token usage not supported"},
{0x23,0x03,"invalid token operation, remote rod token creation not "
"supported"},
{0x23,0x04,"Invalid token operation, token unknown"},
{0x23,0x05,"Invalid token operation, token corrupt"},