This repository has been archived by the owner on Aug 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
ssi.h
2239 lines (2093 loc) · 74 KB
/
ssi.h
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 2011 - 2017 Intel Corporation
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/**
* @file SSI\ssi.h
*
* @brief This file specifies the Standard Storage Interface(SSI).
**/
#ifndef __SSI_H
#define __SSI_H
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _MSC_VER
#ifdef ISDI_2_EXPORTS
#define SSI_API __declspec(dllexport)
#else
#define SSI_API __declspec(dllimport)
#endif
#else
#define SSI_API
#pragma GCC visibility push(default)
#endif
/**
* @name Base Types
* These typedefs defines the base types used in this specification
*/
/*@{*/
typedef char SSI_Char;
typedef unsigned char SSI_Uint8;
typedef char SSI_Int8;
typedef unsigned short SSI_Uint16;
typedef short SSI_Int16;
typedef unsigned int SSI_Uint32;
typedef int SSI_Int32;
typedef long long SSI_Int64;
typedef unsigned long long SSI_Uint64;
/*@}*/
/**
* @typedef SSI_Bool
* @brief This defines the Boolean type for SSI.
*/
typedef SSI_Uint32 SSI_Bool;
/**
* @name Boolean Defines
* These typedefs defines the SSI_TRUE & SSI_FALSE for the specification
*/
/*@{*/
#define SSI_TRUE 1
#define SSI_FALSE 0
/*@}*/
/**
* @typedef SSI_Handle
* @brief This defines the SSI_Handle which is used as opaque reference to objects.
*/
typedef SSI_Uint32 SSI_Handle;
/**
* @var SSI_NULL_HANDLE
* @brief Defines the Null Handle reprensented in the specification.
*/
static const SSI_Handle SSI_NULL_HANDLE = 0;
/**
* @var SSI_INVALID_SLOTNUMBER
* @brief Defines the Invalid SlotNumber reprensented in the specification.
*/
static const SSI_Uint32 SSI_INVALID_SLOTNUMBER = 0xFFFFFFFF;
/**
* @def SSI_LIBRARY_VERSION
*
* @brief Version of ssi api library
**/
#define SSI_LIBRARY_VERSION "0.1.0.1"
/**
* @def SSI_VOLUME_NAME_LENGTH
*
* @brief Ssi volume name length.
**/
#define SSI_VOLUME_NAME_LENGTH 17
/**
* @def SSI_SOFTWARE_VERSION_LENGTH
*
* @brief Ssi software version length.
**/
#define SSI_SOFTWARE_VERSION_LENGTH 32
/**
* @def SSI_VENDOR_LENGTH
*
* @brief Ssi vendor length.
**/
#define SSI_VENDOR_LENGTH 8
/**
* @def SSI_PRODUCT_ID_LENGTH
*
* @brief Ssi product identifier length.
**/
#define SSI_PRODUCT_ID_LENGTH 16
/**
* @def SSI_PRODUCT_REV_LENGTH
*
* @brief Ssi product reverse length.
**/
#define SSI_PRODUCT_REV_LENGTH 5
/**
* @def SSI_PRODUCT_REV_LENGTH
*
* @brief Ssi logical id length.
**/
#define SSI_LOGICAL_ID_LENGTH 17
/**
* @def SSI_CONTROLLER_NAME_LENGTH
*
* @brief Ssi controller name length.
**/
#define SSI_CONTROLLER_NAME_LENGTH 256
/**
* @def SSI_END_DEVICE_SERIALNO_LENGTH
*
* @brief Ssi end device serialno length.
**/
#define SSI_END_DEVICE_SERIALNO_LENGTH 21
/**
* @def SSI_END_DEVICE_MODEL_LENGTH
*
* @brief Ssi end device model length.
**/
#define SSI_END_DEVICE_MODEL_LENGTH 41
/**
* @def SSI_END_DEVICE_FIRMWARE_LENGTH
*
* @brief Ssi end device firmware length.
**/
#define SSI_END_DEVICE_FIRMWARE_LENGTH 21
/**
* @def SSI_ROUTING_DEVICE_COMPONENT_LENGTH
*
* @brief Ssi routing device component length.
**/
#define SSI_ROUTING_DEVICE_COMPONENT_LENGTH 8
/**
* @def SSI_ROUTING_DEVICE_COMPONENT_REV_LENGTH
*
* @brief Ssi routing device component reverse length.
**/
#define SSI_ROUTING_DEVICE_COMPONENT_REV_LENGTH 5
/**
* @def SSI_ARRAY_NAME_LENGTH
*
* @brief Ssi array name length.
**/
#define SSI_ARRAY_NAME_LENGTH 21
/**
* @def SSI_DISK_PASSWORD_LENGTH
*
* @brief Ssi disk password length.
**/
#define SSI_DISK_PASSWORD_LENGTH 32
/**
* @def SSI_DEFAULT_STORAGE_POOL
*
* @brief Ssi default storage pool.
**/
#define SSI_DEFAULT_STORAGE_POOL 0
/**
* @def SSI_UNIQUE_ID_LENGTH
*
* @brief Ssi default unique id length.
**/
#define SSI_UNIQUE_ID_LENGTH 40
/**
* @enum SSI_Status
*
* @brief Values that represent SSI_Status.
**/
typedef enum _SSI_Status
{
/** Function completed successfully */
SSI_StatusOk = 0,
/** Library was unable to allocate a new session */
SSI_StatusInsufficientResources = 1,
/** Null pointer was passed to a out parameter */
SSI_StatusInvalidParameter = 2,
/** Invalid handle was passed to a function */
SSI_StatusInvalidHandle = 3,
/** The stripe size is not valid for the specific RAID level */
SSI_StatusInvalidStripSize = 4,
/** (Volume name) parameter contains one or more invalid characters */
SSI_StatusInvalidString = 5,
/** Invalid volume size parameter */
SSI_StatusInvalidSize = 6,
/** Invalid RAID level parameter for volume creation / migration */
SSI_StatusInvalidRaidLevel = 7,
/** Session handle is invalid (previously destroyed) */
SSI_StatusInvalidSession = 8,
/** Call failed to complete within specified timeframe */
SSI_StatusTimeout = 9,
/** Function is not supported on this platform */
SSI_StatusNotImplemented = 10,
/** Library has already been initialized */
SSI_StatusDuplicate = 11,
/** Library hasn't been initialized, yet */
SSI_StatusNotInitialized = 12,
/** Not enough items (disks, etc) have been specified */
SSI_StatusBufferTooSmall = 13,
/** Action is not supported */
SSI_StatusNotSupported = 14,
/** Function failed to complete */
SSI_StatusFailed = 15,
/** Finalize failed to cleanup library */
SSI_StatusInternalError = 16,
/** Scope passed is either invalid or not valid for current operation */
SSI_StatusInvalidScope = 17,
/** Item not in appropriate state for action to complete successfully */
SSI_StatusInvalidState = 18,
/** Maximum number of unlock attempts has been exceeded */
SSI_StatusRetriesExceeded = 19,
/** Password is incorrect for locked item */
SSI_StatusWrongPassword = 20,
/** Invalid meta data size */
SSI_StatusDataExceedsLimits = 21,
/** User has insufficient privileges to execute function */
SSI_StatusInsufficientPrivileges = 22,
/** Driver has returned a busy notification */
SSI_StatusDriverBusy = 23,
/** Too many items (disks, etc) have been specified */
SSI_StatusBufferTooLarge = 24,
/** Disable on-device cache failed */
SSI_StatusDisableCacheFailed = 25,
/** Unsupported action during trial */
SSI_TrialLimitation = 26,
/** Raid Level not supported */
SSI_UnsupportedRAIDLevel = 27,
/** Invalid RWH Mode */
SSI_InvalidRWHMode = 28,
/** Unsupported Disk */
SSI_UnsupportedDisk = 29,
/** Mark as normal failed */
SSI_MarkAsNormalFailed = 30,
/** Invalid number of disks */
SSI_InvalidNumberOfDisks = 31,
/** Invalid logical sector size */
SSI_InvalidLogicalSectorSize = 34,
/** Non-intel drive not supported */
SSI_NonIntelDriveNotSupported = 35,
/** Uncheck journaling drive failed */
SSI_UncheckJournalingDriveFailed = 36,
/** Disk too small */
SSI_DiskTooSmall = 37,
/** Disk on wrong controller */
SSI_DiskOnWrongController = 38,
/** Volume over 2 Tb not allowed */
SSI_VolumeOver2TbNotAllowed = 39,
/** Duplicated volume name */
SSI_DuplicatedVolumeName = 40,
/** Invalid Cache Mode */
SSI_InvalidCacheMode = 41,
/** Invalid Controller Mode */
SSI_InvalidControllerMode = 42,
/** Invalid Disk */
SSI_InvalidDisk = 43,
/** Invalid Cache Policy */
SSI_InvalidCachePolicy = 44,
/** Invalid Volume */
SSI_InvalidVolume = 45
} SSI_Status;
/**
* @enum SSI_VolumeCachePolicy
*
* @brief Values that represent SSI_VolumeCachePolicy.
**/
typedef enum _SSI_VolumeCachePolicy
{
/** Cache policy is unknown */
SSI_VolumeCachePolicyUnknown = 0,
/** Cache is disabled */
SSI_VolumeCachePolicyOff = 1,
/** Write operations are not cached */
SSI_VolumeCachePolicyWriteThrough = 2,
/** Write operations are cached */
SSI_VolumeCachePolicyWriteBack = 3
} SSI_VolumeCachePolicy;
/**
* @enum SSI_WriteCachePolicy
*
* @brief Values that represent SSI_WriteCachePolicy.
**/
typedef enum _SSI_WriteCachePolicy
{
/** Cache policy is unknown */
SSI_WriteCachePolicyUnknown = 0,
/** Cache is disabled */
SSI_WriteCachePolicyOff = 1,
/** Write cache is enabled */
SSI_WriteCachePolicyOn = 2
} SSI_WriteCachePolicy;
/**
* @enum SSI_VolCacheSize
*
* @brief Values that represent SSI_VolCacheSize.
**/
typedef enum _SSI_VolCacheSize
{
/** Cache size is unknown */
SSI_VolCacheSizeUnknown = 0x00,
/** Cache is in safe mode (write caching disabled) */
SSI_VolCacheSizeSafeMode = 0x01,
/** Inbox driver settings */
SSI_VolCacheSizeInbox = 0x02,
/** Volume cache size is 4MB */
SSI_VolCacheSize4MB = 0x04,
/** Volume cache size is 16MB */
SSI_VolCacheSize16MB = 0x10
} SSI_VolCacheSize;
/**
* @enum SSI_RaidLevel
*
* @brief Values that represent various Raid Levels.
**/
typedef enum _SSI_RaidLevel
{
/** Invalid RaidLevel */
SSI_RaidInvalid = 0x00,
/** RAID 0 - striping*/
SSI_Raid0 = 0x01,
/** RAID 1 - mirroring*/
SSI_Raid1 = 0x02,
/** RAID 10 - striping + mirroring*/
SSI_Raid10 = 0x04,
/** RAID 5 - striping with parity*/
SSI_Raid5 = 0x08,
/** RAID 6 - striping, parity, and data-recovery*/
SSI_Raid6 = 0x10,
/** Unknown Raid level */
SSI_RaidUnknown = 0x80000000,
} SSI_RaidLevel;
/**
* @enum SSI_StripSize
*
* @brief Values that represent SSI_StripSize.
**/
typedef enum _SSI_StripSize
{
/** Unknown stripe size */
SSI_StripSizeUnknown = 0x0000,
/** 2KB stripe size */
SSI_StripSize2kB = 0x0001,
/** 4KB stripe size */
SSI_StripSize4kB = 0x0002,
/** 8KB stripe size */
SSI_StripSize8kB = 0x0004,
/** 16KB stripe size */
SSI_StripSize16kB = 0x0008,
/** 32KB stripe size */
SSI_StripSize32kB = 0x0010,
/** 64KB stripe size */
SSI_StripSize64kB = 0x0020,
/** 128KB stripe size */
SSI_StripSize128kB = 0x0040,
/** 256KB stripe size */
SSI_StripSize256kB = 0x0080,
/** 512KB stripe size */
SSI_StripSize512kB = 0x0100,
/** 1MB stripe size */
SSI_StripSize1MB = 0x0200,
/** 2MB stripe size */
SSI_StripSize2MB = 0x0400,
/** 4MB stripe size */
SSI_StripSize4MB = 0x0800,
/** 8MB stripe size */
SSI_StripSize8MB = 0x1000,
/** 16MB stripe size */
SSI_StripSize16MB = 0x2000,
/** 32MB stripe size */
SSI_StripSize32MB = 0x4000,
/** 64MB stripe size */
SSI_StripSize64MB = 0x8000,
} SSI_StripSize;
/**
* @enum SSI_Rwh
*
* @brief Close Raid Write Hole Policy.
**/
typedef enum _SSI_RwhPolicy
{
SSI_RwhOff = 0,
SSI_RwhDistributed = 1,
SSI_RwhJournalingDrive = 2,
SSI_RwhInvalid = 3,
} SSI_RwhPolicy;
/**
* @enum SSI_DeviceType
*
* @brief Values that represent Device types.
**/
typedef enum _SSI_DeviceType
{
/** Device type is unknown */
SSI_DeviceTypeUnknown = 0,
/** Controller type */
SSI_DeviceTypeController = 1,
/** End device type */
SSI_DeviceTypeEndDevice = 2,
/** Routing device type */
SSI_DeviceTypeRoutingDevice = 3,
} SSI_DeviceType;
/**
* @enum SSI_ScopeType
*
* @brief Values that represent various scopes in SSI.
**/
typedef enum _SSI_ScopeType
{
/** Scope is none */
SSI_ScopeTypeNone = 0,
/** Controller Scope for Direct attached */
SSI_ScopeTypeControllerDirect = 1,
/** Controller Scope for Controller complete */
SSI_ScopeTypeControllerAll = 2,
/** RaidInfo Scope */
SSI_ScopeTypeRaidInfo = 3,
/** EndDevice Scope */
SSI_ScopeTypeEndDevice = 4,
/** Routing Device Scope*/
SSI_ScopeTypeRoutingDevice = 5,
/** Port Scope */
SSI_ScopeTypePort = 6,
/** Phy Scope */
SSI_ScopeTypePhy = 7,
/** Array Scope */
SSI_ScopeTypeArray = 8,
/** Enclosure Scope */
SSI_ScopeTypeEnclosure = 9,
} SSI_ScopeType;
/**
* @struct SSI_ScsiAddress
*
* @brief Structure to represent the Scsi Address in SSI.
**/
typedef struct _SSI_ScsiAddress
{
/** SCSI host */
SSI_Uint8 host;
/** SCSI bus */
SSI_Uint8 bus;
/** SCSI target */
SSI_Uint8 target;
/** SCSI lun */
SSI_Uint8 lun;
} SSI_ScsiAddress;
/**
* @struct SSI_BdfAddress
*
* @brief Structure to represent the BDF address in SSI.
**/
typedef struct _SSI_BdfAddress
{
/** BDF domain number */
SSI_Uint32 domain;
/** BDF bus number */
SSI_Uint8 bus;
/** BDF device number */
SSI_Uint8 device;
/** BDF function number */
SSI_Uint8 function;
} SSI_BdfAddress;
/**
* @struct SSI_Address
*
* @brief Structure to represent Address in SSI.
**/
typedef struct _SSI_Address
{
/** If true, scsiAddress is valid */
//SSI_Bool scsiAddressPresent;
/** SCSI address */
SSI_ScsiAddress scsiAddress;
/** If true, sasAddress is valid */
SSI_Bool sasAddressPresent;
/** SAS address */
SSI_Uint64 sasAddress;
/** if true, bdfAddress is valid */
SSI_Bool bdfAddressPresent;
/** BDF address */
SSI_BdfAddress bdfAddress;
} SSI_Address;
/**
* @enum SSI_HardwareKeyType
*
* @brief Values that represent SKU modes in SSI.
**/
typedef enum _SSI_HardwareKeyType
{
/** Unknown SKU mode */
SSI_Unknown_SKU = 0,
/** VMD 3-story SKU */
SSI_HardwareKey3story = 1,
/** VROC Standard SKU */
SSI_HardwareKeyVROCStandard = 2,
/** VROC Premium SKU */
SSI_HardwareKeyVROCPremium = 3,
/** VROC Intel-SSD-only */
SSI_HardwareKeyVROCIntelSSDonly = 4
} SSI_HardwareKeyType;
/**
* @struct SSI_SystemInfo
*
* @brief Structure defines overall library, driver info.
**/
typedef struct _SSI_SystemInfo
{
/** Major version of the library's interface */
SSI_Uint32 interfaceVersionMajor;
/** Minor version of the library's interface */
SSI_Uint32 interfaceVersionMinor;
/** Library version */
SSI_Char libraryVersion[SSI_SOFTWARE_VERSION_LENGTH];
/** Maximum Sessions */
SSI_Uint32 maxSessions;
/** If true, library supports #SSI_SetVolCacheSize function */
SSI_Bool setVolCacheSizeSupport;
/** If true, library supports #SSI_PassthroughCommand function */
SSI_Bool passthroughCommandSupport;
} SSI_SystemInfo;
/**
* @struct SSI_RaidInfo
*
* @brief Structure that defines Raid specific data.
**/
typedef struct _SSI_RaidInfo
{
/** Handle to the Raid Information structure represented by this table */
SSI_Handle raidHandle;
/** Unique Id equal to "ra:" + controller.deviceId */
SSI_Char uniqueId[SSI_UNIQUE_ID_LENGTH];
/** Maximum disks allowed per array */
SSI_Uint32 maxDisksPerArray;
/** Maximum disks allowed to be used as array members */
SSI_Uint32 maxRaidDisksSupported;
/** Maximum volumes per array */
SSI_Uint32 maxVolumesPerArray;
/** Maximum volumes that may be created */
SSI_Uint32 maxVolumesPerHba;
/** If true, controller supports RAID */
SSI_Bool raidEnabled;
/** If true, spare disks do not have to be associated with a specific array */
SSI_Bool supportsGlobalSpare;
/** If true, spare disks can be assigned on a specific volume */
SSI_Bool supportsDedicatedSpare;
/** If true, volumes can be created using data from an existing member disk */
SSI_Bool supportsCreateFromExisting;
/** If true, controller supports empty arrays (arrays with no volumes) */
SSI_Bool supportsEmptyArrays;
} SSI_RaidInfo;
/**
* @enum SSI_ControllerType
*
* @brief Values that represents the Controller types.
**/
typedef enum _SSI_ControllerType
{
/** Unknown controller type */
SSI_ControllerTypeUnknown = 0,
/** AHCI (SATA) controller */
SSI_ControllerTypeAHCI = 1,
/** SCU (SAS) controller */
SSI_ControllerTypeSCU = 2,
/** NVMe controller */
SSI_ControllerTypeNVME = 3,
/** VMD controller */
SSI_ControllerTypeVMD = 4
} SSI_ControllerType;
typedef enum _SSI_TrialState
{
SSI_Trial_State_Unknown = 0,
SSI_Trial_State_Not_Started = 1,
SSI_Trial_State_Started = 2,
SSI_Trial_State_Expired = 3
} SSI_TrialState;
/**
* @struct SSI_HardwareVersion
*
* @brief Strucuture to Define Controller hardware identification(PCI).
**/
typedef struct _SSI_HardwareVersion
{
/** Vendor id of device, as reported by PCI enumeration */
SSI_Uint16 vendorId;
/** Device id of device, as reported by PCI enumeration */
SSI_Uint16 deviceId;
/** Subsystem id of device, as reported by PCI enumeration */
SSI_Uint16 subSystemId;
/** Hardware revision ID of device, as reported by PCI enumeration */
SSI_Uint8 hardwareRevisionId;
/** Subclass code of device, as reported by PCI enumeration */
SSI_Uint8 subClassCode;
/** Subvendor id of device, as reported by PCI enumeration */
SSI_Uint16 subVendorId;
} SSI_HardwareVersion;
/**
* @struct SSI_ControllerInfo
*
* @brief Structure to define the Controller Information.
**/
typedef struct _SSI_ControllerInfo
{
/** handle to controller */
SSI_Handle controllerHandle;
/** Unique Id equal to "co:" + hardwareVer.deviceId */
SSI_Char uniqueId[SSI_UNIQUE_ID_LENGTH];
/** address of controller */
SSI_Address controllerAddress;
/** name of controller */
SSI_Char controllerName[SSI_CONTROLLER_NAME_LENGTH];
/** type of controller */
SSI_ControllerType controllerType;
/** handle to Raid Info for the controller */
SSI_Handle raidInfoHandle;
/** driver version string */
SSI_Char driverVer[SSI_SOFTWARE_VERSION_LENGTH];
/** OROM/EFI version string */
SSI_Char prebootManagerVer[SSI_SOFTWARE_VERSION_LENGTH];
/** Hardware-specific identification info */
SSI_HardwareVersion hardwareVer;
/** If true, OROM/EFI has been loaded */
SSI_Bool prebootManagerLoaded;
/** If true, OROM supports system volumes greater than 2 TB */
SSI_Bool twoTbVolumePrebootSupport;
/** If true, OROM supports system disks greater than 2TB */
SSI_Bool twoTbDiskPrebootSupport;
/** If true, arrays may not be created with a mix of internal/external disks */
SSI_Bool disableESataSpanning;
/** If true, controller is using H/W XOR acceleration */
SSI_Bool xorSupported;
/** If true, controller is using NVSRAM */
SSI_Bool nvsramSupported;
/** If true, #SSI_PhyLocate function supports phys attached to this controller */
SSI_Bool phyLocateSupport;
/** If true, #SSI_PhyRemove function supports phys attached to this controller */
SSI_Bool phyRemoveDiskSupport;
/** If true, #SSI_DiskUnlock function supports disks attached to this controller */
SSI_Bool diskUnlockSupport;
/** If true, #SSI_AssignStoragePool function supports devices attached to this controller */
SSI_Bool assignStoragePoolSupport;
/** If true, #SSI_MarkAsNormal function supports devices attached to this controller */
SSI_Bool markAsNormalSupport;
/** If true, #SSI_VolumeDelete may be applied to this controller's volumes */
SSI_Bool volumeDeleteSupport;
/** If true, #SSI_ArrayCreate may be applied to this controller's volumes */
SSI_Bool arrayCreateSupport;
/** If true, #SSI_VolumeModify may be applied to this controller's volumes */
SSI_Bool volumeModifySupport;
/** If true, #SSI_VolumeRename may be applied to this controller's volumes */
SSI_Bool volumeRenameSupport;
/** If true, #SSI_AddDisksToArray may be applied to this controller's volumes */
SSI_Bool addDisksToArraySupport;
/** If true, #SSI_VolumeSetCachePolicy may be applied to this controller's volumes */
SSI_Bool volumeSetCachePolicySupport;
/** If true, #SSI_VolumeCancelVerify may be applied to this controller's volumes */
SSI_Bool volumeCancelVerifySupport;
/** If true, #SSI_MarkAsSpare may be applied to devices attached to this controller */
SSI_Bool markAsSpareSupport;
/** If true, Enabling or disabling read patrol is supported for this controller. */
SSI_Bool readPatrolSupport;
/** If true, Read Patrol is enabled for this controller */
SSI_Bool readPatrolEnabled;
/** If true, H/W XOR is enabled for this controller */
SSI_Bool xorEnabled;
/** If true, Enabling or disabling rebuild on hot insert is supported for this controller. */
SSI_Bool rohiSupport;
/** If true, Rebuild on hot insert is enabled for this controller */
SSI_Bool rohiEnabled;
/** type of sku mode */
SSI_HardwareKeyType hardwareSkuMode;
/** If true, 3rd Party Vendor disks are supported */
SSI_Bool supportsTPV;
/** Trial state Information */
SSI_TrialState trialState;
/** Count of days to expired trial */
SSI_Int32 remainingDays;
} SSI_ControllerInfo;
/**
* @enum SSI_PhyProtocol
*
* @brief Values that represent Phy Protocol.
**/
typedef enum _SSI_PhyProtocol
{
/** Phy protocol could not be determined */
SSI_PhyProtocolUnknown = 0,
/** SATA protocol */
SSI_PhyProtocolSATA = 1,
/** SAS management protocol */
SSI_PhyProtocolSMP = 2,
/** Serial tunneling protocol */
SSI_PhyProtocolSTP = 3,
/** Serial SCSI protocol */
SSI_PhyProtocolSSP = 4,
/** NVMe protocol */
SSI_PhyProtocolNVME = 5
} SSI_PhyProtocol;
/**
* @enum SSI_PhySpeed
*
* @brief Values that represent Phy link Speed.
**/
typedef enum _SSI_PhySpeed
{
/** Link speed is unknown */
SSI_PhySpeedUnknown = 0,
/** Generation 1 speed (1.5 Gbps) */
SSI_PhySpeed_1_5_GEN1 = 1,
/** Generation 2 speed (3.0 Gbps) */
SSI_PhySpeed_3_0_GEN2 = 2,
/** Generation 3 speed (6.0 Gbps) */
SSI_PhySpeed_6_0_GEN3 = 3
} SSI_PhySpeed;
/**
* @struct SSI_PhyInfo
*
* @brief Structure that represents Phy Information in SSI.
**/
typedef struct _SSI_PhyInfo
{
/** Handle to phy */
SSI_Handle phyHandle;
/** Unique Id equal to "ph:" + device uniqueId + "/" + phyNumber */
SSI_Char uniqueId[SSI_UNIQUE_ID_LENGTH];
/** Phy's address */
SSI_Address phyAddress;
/** Indicates which phy on the parent device this represents */
SSI_Uint32 phyNumber;
/** Connection protocol */
SSI_PhyProtocol protocol;
/** Logical port object that identifies connection between phys.
Value is SSI_INVALID_HANDLE if phy is not connected. */
SSI_Handle associatedPort;
/** Type of device that phy is contained in */
SSI_DeviceType deviceType;
/** Handle to the device that phy is contained in */
SSI_Handle deviceHandle;
/** If true, phy is external */
SSI_Bool isExternal;
/** If true, hot plug even can be detected */
SSI_Bool hotPlugCap;
/** Minimum hardware speed phy can operate at */
SSI_PhySpeed minHWLinkSpeed;
/** Maximum hardware speed phy can operate at */
SSI_PhySpeed maxHWLinkSpeed;
/** Minimum programmed speed phy can operate at */
SSI_PhySpeed minLinkSpeed;
/** Maximum programmed speed phy can operate at */
SSI_PhySpeed maxLinkSpeed;
/** Negotiated link speed */
SSI_PhySpeed negotiatedLinkSpeed;
/** If true, following counts contain valid */
SSI_Bool countsValid;
/** Number of invalid DWORDs that have been received since PWR reset */
SSI_Uint32 invalildDWORDsCount;
/** Number of frames received */
SSI_Uint32 receivedFramesCount;
/** Number of frames transmitted */
SSI_Uint32 transmittedFramesCount;
/** Number of DWORDs received */
SSI_Uint32 receivedDWORDsCount;
/** Number of DWORDs transmitted */
SSI_Uint32 transmittedDWORDsCount;
/** Number of times the py has restarted the link reset sequence due to lost DWORD synchronization */
SSI_Uint32 syncLostCount;
/** Number of DWORDs containing running disparity errors */
SSI_Uint32 runningDisparityErrorsCount;
/** Number of CRC errors */
SSI_Uint32 crcErrorsCount;
/** Number of short frames received */
SSI_Uint32 shortFramesReceivedCount;
/** Number of done frames received */
SSI_Uint32 doneFrameReceivedCount;
/** Number of times the phy reset problem has occurred */
SSI_Uint32 PHYResetCount;
} SSI_PhyInfo;
/**
* @struct SSI_PortInfo
*
* @brief Structure for Port Information.
**/
typedef struct _SSI_PortInfo
{
/** Port Handle */
SSI_Handle portHandle;
/** Unique Id equal to "po:" + localDevice id + "/" + handle */
SSI_Char uniqueId[SSI_UNIQUE_ID_LENGTH];
/** Port Address */
SSI_Address portAddress;
/** Width of the port defined by the number of phys - x1, x2 or x4 */
SSI_Uint32 numPhys;
/** Local device type */
SSI_DeviceType localDeviceType;
/** Handle to the local device */
SSI_Handle localDeviceHandle;
/** Port that this is connected to on the remote device. */
SSI_Handle connectedToPort;
} SSI_PortInfo;
/**
* @struct SSI_EnclosureInfo
*
* @brief Defines the Enclosure Information.
**/
typedef struct _SSI_EnclosureInfo
{
/** Enclosure Handle */
SSI_Handle enclosureHandle;
/** Unique Id equal to "en:" + logicalId */
SSI_Char uniqueId[SSI_UNIQUE_ID_LENGTH];
/** Unique Key for enclosure lookups */
SSI_Uint32 enclosureKey;
/** Vendor identification string */
SSI_Char vendorInfo[SSI_VENDOR_LENGTH];
/** Product identification string */
SSI_Char productId[SSI_PRODUCT_ID_LENGTH];
/** Product revision string */
SSI_Char productRev[SSI_PRODUCT_REV_LENGTH];
/** Unique logical identifier of the enclosure */
SSI_Char logicalId[SSI_LOGICAL_ID_LENGTH];
/** Number of processors in the enclosure */
SSI_Uint32 processorCount;
/** Number of sub-enclosures in the enclosure */
SSI_Uint32 subenclosureCount;
/** Number of elements in the enclosure */
SSI_Uint32 elementCount;
/** If the enclosure supports slot information, number of slots in the enclosure */
SSI_Uint32 numberOfSlots;
} SSI_EnclosureInfo;
/**
* @enum SSI_EndDeviceType
*
* @brief Values that represent EndDevice(Disk) Type.
**/
typedef enum _SSI_EndDeviceType
{
/** Device type cannot be determined or represented by other type in enumeration */
SSI_EndDeviceTypeUnknown = 0,
/** Device that exposes itself as a disk (magnetic HDDs, SSDs) */
SSI_EndDeviceTypeDisk = 1,
/** Non disk storage devices (CDROM, Blue Ray, DVD, and tape drives) */
SSI_EndDeviceTypeNonDiskStorage = 2,
/** Non storage-devices (enclosure elements, processor) */
SSI_EndDeviceTypeNonStorage = 3
} SSI_EndDeviceType;
/**
* @enum SSI_DiskType
*
* @brief Values that represents the type of Disk.
**/
typedef enum _SSI_DiskType
{
/** Disk cannot be determined or represented by other type in enumeration */
SSI_DiskTypeUnknown = 0,
/** SATA disk */
SSI_DiskTypeSATA = 1,
/** SAS disk */
SSI_DiskTypeSAS = 2,
/** NVMe disk */
SSI_DiskTypeNVME = 3,
/** VMD disk */
SSI_DiskTypeVMD = 4
} SSI_DiskType;
/**
* @enum SSI_DiskState
*
* @brief Values that represents the state of the Disk.
**/
typedef enum _SSI_DiskState
{
/** Disk is in an unknown (likely bad) state */
SSI_DiskStateUnknown = 0,
/** Disk is offline */
SSI_DiskStateOffline = 1,
/** Disk is not in system */
SSI_DiskStateMissing = 2,
/** Disk is in failed (multiple read/write failure) state */
SSI_DiskStateFailed = 3,
/** Disk is reporting a SMART event */
SSI_DiskStateSmartEventTriggered = 4,
/** Disk contains metadata not understood by driver */
SSI_DiskStateConfigIsUprev = 5,
/** Normal, healthy state */
SSI_DiskStateNormal = 6,
/** Security is enabled (unable to read disk) */
SSI_DiskStateLocked = 7,
/** Disk is manually set to offline using user tools */
SSI_DiskStateManualOffline = 8,
/** Disk is not supported */
SSI_DiskStateIncompatible = 9,
/** Disk is not supported */
SSI_DiskStateUnsupported = 10
} SSI_DiskState;
/**
* @enum SSI_DiskUsage
*
* @brief Values that represents Disk Usage.
**/
typedef enum _SSI_DiskUsage
{
/** Disk usage cannot be determined or represented by another usage enumeration */
SSI_DiskUsageUnknown = 0,
/** Disk is a member of an array */
SSI_DiskUsageArrayMember = 1,
/** Pass through disk */
SSI_DiskUsagePassThru = 2,
/** Disk is a member of an offline array */
SSI_DiskUsageOfflineArray = 3,
/** Disk is marked as a spare */