core_ses.h
来自「6440linuxDriver的源代码」· C头文件 代码 · 共 413 行
H
413 行
/*[ ReceiveDiagnostic ]SES_PG_CONFIGURATION(ConfigurationPageHeader), ( EnclosureDescriptorHeader + EnclosureDescriptor + TypeDescriptorHeader )SES_PG_DEVICE_ELEMENT_STATUS (DeviceElementStatusPage), ( DeviceElementStatusDescriptorEIP0 + ( SasPhyDescriptor... ) ) / ( DeviceElementStatusDescriptorEIP1 + ( SasPhyDescriptor... ) )SES_PG_ELEMENT_DESCRIPTOR (ElementDescriptorPage), ElementDescriptorSES_PG_ENCLOSURE_STATUS (EnclosureStatusPage), DeviceElementForEnclosureStatusPage / ArrayElementForEnclosureStatusPage[ SendDiagnostic ]SES_PG_ENCLOSURE_CONTROL (EnclosureControlPage), DeviceElementForEnclosureControlPage / ArrayElementForEnclosureControlPage*//* SES2 Page Code */#define SES_PG_SUPPORTED_DIAGNOSTICS 0x00#define SES_PG_CONFIGURATION 0x01 #define SES_PG_ENCLOSURE_STATUS 0x02#define SES_PG_ENCLOSURE_CONTROL 0x02#define SES_PG_HELP_TEXT 0x03 #define SES_PG_STRING_IN 0x04 #define SES_PG_THRESHOLD_IN 0x05 #define SES_PG_ELEMENT_DESCRIPTOR 0x07#define SES_PG_SHORT_ENCLOSURE_STATUS 0x08#define SES_PG_ENCLOSURE_BUSY 0x09#define SES_PG_DEVICE_ELEMENT_STATUS 0x0a#define SES_PG_SUBENCLOSURE_HELP_TEXT 0x0b#define SES_PG_SUBENCLOSURE_STRING_IN 0x0c#define SES_PG_SUPPORTED_SES_DIAGNOSTICS 0x0d#define SES_PG_VENDOR_SPECIFIC_SES_PAGE 0x10#define SES_PG_VENDOR_PAGEA0 0xa0/* Element Type */#define SES_TYPE_UNSPECIFIED 0x00#define SES_TYPE_DEVICE 0x01#define SES_TYPE_POWER_SUPPLY 0x02#define SES_TYPE_FAN 0x03#define SES_TYPE_TEMPERATURE_SENSOR 0x04#define SES_TYPE_DOOR_LOCK 0x05#define SES_TYPE_SPEAKER 0x06#define SES_TYPE_ES_CONTROLLER 0x07#define SES_TYPE_SCC_CONTROLLER 0x08#define SES_TYPE_NONVOLATILE_CACHE 0x09#define SES_TYPE_UPS 0x0B#define SES_TYPE_DISPLAY 0x0C#define SES_TYPE_KEYPAD 0x0D#define SES_TYPE_ENCLOSURE 0x0E#define SES_TYPE_SCSI_TRANSCEIVER 0x0F#define SES_TYPE_LANGUAGE 0x10#define SES_TYPE_COMM_PORT 0x11#define SES_TYPE_VOLTAGE_SENSOR 0x12#define SES_TYPE_CURRENT_SENSOR 0x13#define SES_TYPE_SCSI_TARGET_PORT 0x14#define SES_TYPE_SCSI_INITIATOR_PORT 0x15#define SES_TYPE_SIMPLE_SUBENCLOSURE 0x16#define SES_TYPE_ARRAY_DEVICE 0x17#define SES_TYPE_VENDOR_SPECIFIC 0x80 typedef struct _ReceiveDiagnostic { MV_U8 OperationCode; MV_U8 PCV:1; MV_U8 Reserved:7; MV_U8 PageCode; MV_U8 AllocationLength[2]; MV_U8 Control; }ReceiveDiagnostic, *PReceiveDiagnostic;typedef struct _SendDiagnostic{ MV_U8 OperationCode; MV_U8 UnitOffL:1; MV_U8 DevOffL:1; MV_U8 SelfTest:1; MV_U8 Reserved:1; MV_U8 PF:1; MV_U8 SelfTestCode:3; MV_U8 ParamLength[2]; MV_U8 Control;}SendDiagnostic, *PSendDiagnostic;/* SES_PG_CONFIGURATION */typedef struct _ConfigurationPageHeader{ MV_U8 PageCode; MV_U8 SubEnclosureCount; MV_U8 PageLength[2]; MV_U8 GenerationCode[4];} ConfigurationPageHeader, *PConfigurationPageHeader;typedef struct _EnclosureDescriptorHeader{ MV_U8 EnclosureServiceProcessesCount:3; MV_U8 Reserved1:1; MV_U8 RelativeEnclosureServiceProcessID:3; MV_U8 Reserved2:1; MV_U8 SubEnclosureID; MV_U8 NumberOfElementTypesSupported; MV_U8 EnclosureDescriptorLength; } EnclosureDescriptorHeader, *PEnclosureDescriptorHeader;typedef struct _EnclosureDescriptor{ MV_U8 EnclosureLogicalID[8]; MV_U8 EnclosureVendorID[8]; MV_U8 ProductID[16]; MV_U8 ProductRevisionLevel[4]; MV_U8 VendorSpecific; } EnclosureDescriptor, *PEnclosureDescriptor;typedef struct _TypeDescriptorHeader{ MV_U8 ElementType; MV_U8 NumberOfPossibleElements; MV_U8 SubEnclosureID; MV_U8 TypeDescriptorTextLength;} TypeDescriptorHeader, *PTypeDescriptorHeader;/* SES_PG_DEVICE_ELEMENT_STATUS */typedef struct _DeviceElementStatusPage{ MV_U8 PageCode; MV_U8 Reserved; MV_U8 PageLength[2]; MV_U8 GenerationCode[4];} DeviceElementStatusPage, *PDeviceElementStatusPage;typedef struct _DeviceElementStatusDescriptorEIP0{ MV_U8 ProtocolID:4; MV_U8 bEIP:1; MV_U8 Reserved1:2; MV_U8 Invalid:1; MV_U8 DeviceElementStatusDescriptorLength; MV_U8 PhyDescriptorCount; MV_U8 NotAllPhys:1; MV_U8 Reserved2:5; MV_U8 DescriptorType:2;} DeviceElementStatusDescriptorEIP0, *PDeviceElementStatusDescriptorEIP0;typedef struct _DeviceElementStatusDescriptorEIP1{ MV_U8 ProtocolID:4; MV_U8 bEIP:1; MV_U8 Reserved1:2; MV_U8 Invalid:1; MV_U8 DeviceElementStatusDescriptorLength; MV_U8 Reserved2; MV_U8 ElementIndex; MV_U8 PhyDescriptorCount; MV_U8 NotAllPhys:1; MV_U8 Reserved3:5; MV_U8 DescriptorType:2; MV_U8 Reserved4; MV_U8 BayNumber;} DeviceElementStatusDescriptorEIP1, *PDeviceElementStatusDescriptorEIP1;typedef union { DeviceElementStatusDescriptorEIP0 EIP0; DeviceElementStatusDescriptorEIP1 EIP1; }DeviceElementStatusDescriptor, *PDeviceElementStatusDescriptor;typedef struct _SasPhyDescriptor{ MV_U8 Reserved1:4; MV_U8 DeviceType:3; MV_U8 Reserved2:1; MV_U8 Reserved3; MV_U8 Reserved4:1; MV_U8 SMPInitiatorPort:1; MV_U8 STPInitiatorPort:1; MV_U8 SSPInitiatorPort:1; MV_U8 Reserved5:4; MV_U8 Reserved6:1; MV_U8 SMPTargetPort:1; MV_U8 STPTargetPort:1; MV_U8 SSPTargetPort:1; MV_U8 Reserved7:4; MV_U8 AttachedSASAddress[8]; MV_U8 SASAddress[8]; MV_U8 PhyIdentifier; MV_U8 Reserved8[7];} SasPhyDescriptor, *PSasPhyDescriptor;/* SES_PG_ELEMENT_DESCRIPTOR */typedef struct _ElementDescriptorPage{ MV_U8 PageCode; MV_U8 Reserved1; MV_U8 PageLength[2]; MV_U8 GenerationCode[4];} ElementDescriptorPage, *PElementDescriptorPage;typedef struct _ElementDescriptor{ MV_U8 Reserved1; MV_U8 Reserved2; MV_U8 DescriptorLength[2]; MV_U8 Descriptor[1];} ElementDescriptor, *PElementDescriptor;/* SES_PG_ENCLOSURE_STATUS */typedef struct _OverallEnclosureStatus{ MV_U8 UnrecoverableCondition:1; MV_U8 CriticalCondition:1; MV_U8 NoncriticalCondition:1; MV_U8 InformationCondition:1; MV_U8 InvalidOperationRequested:1; MV_U8 Reserved1:3;} OverallEnclosureStatus, *pOverallEnclosureStatus;typedef struct _EnclosureStatusPage{ MV_U8 PageCode; OverallEnclosureStatus Status; MV_U8 PageLength[2]; MV_U8 GenerationCode[4];} EnclosureStatusPage, *PEnclosureStatusPage;typedef struct _DeviceElementForEnclosureStatusPage{ MV_U8 ElementStatusCode:4; MV_U8 Swap:1; MV_U8 Reserved1:1; MV_U8 Prdfail:1; MV_U8 Reserved2:1; MV_U8 SlotAddress; MV_U8 Report:1; MV_U8 Ident:1; MV_U8 Rmv:1; MV_U8 ReadyToInsert:1; MV_U8 EnclosureBypassedB:1; MV_U8 EnclosureBypassedA:1; MV_U8 DoNotRemove:1; MV_U8 AppClientBypassedA:1; MV_U8 DeviceBypassedB:1; MV_U8 DeviceBypassedA:1; MV_U8 BypassedB:1; MV_U8 BypassedA:1; MV_U8 DeviceOff:1; MV_U8 FaultReqstd:1; MV_U8 FaultSensed:1; MV_U8 AppClientBypassedB:1;}DeviceElementForEnclosureStatusPage, *PDeviceElementForEnclosureStatusPage;/* Element Status */enum{ SES_STATUS_UNSUPPORTED = 0x00, SES_STATUS_OK, SES_STATUS_CRITICAL, SES_STATUS_NONCRITICAL, SES_STATUS_UNRECOVERABLE, SES_STATUS_NOTINSTALLED, SES_STATUS_UNKNOWN, SES_STATUS_NOTAVAILABLE, SES_STATUS_RESERVED}; typedef struct _ArrayElementForEnclosureStatusPage{ MV_U8 StatusCode:4; MV_U8 Swap:1; MV_U8 Reserved1:1; MV_U8 PredictedFailure:1; MV_U8 Reserved2:1; MV_U8 RebuildRemapAbort:1; MV_U8 RebuildRemap:1; MV_U8 InFailedArray:1; MV_U8 InCriticalArray:1; MV_U8 ConsistencyCheck:1; MV_U8 HotSpare:1; MV_U8 ReservedDevice:1; MV_U8 OK:1; MV_U8 Report:1; MV_U8 Identify:1; MV_U8 Rmv:1; MV_U8 ReadyToInsert:1; MV_U8 EnclosureBypassedB:1; MV_U8 EnclosureBypassedA:1; MV_U8 DoNotRemove:1; MV_U8 AppBypassedA:1; MV_U8 DeviceBypassedB:1; MV_U8 DeviceBypassedA:1; MV_U8 BypassedB:1; MV_U8 BypassedA:1; MV_U8 DeviceOff:1; MV_U8 FaultRequested:1; MV_U8 FaultSensed:1; MV_U8 AppBypassedB:1;} ArrayElementForEnclosureStatusPage, *PArrayElementForEnclosureStatusPage;/* SES_PG_ENCLOSURE_CONTROL */typedef struct _EnclosureControlPage{ MV_U8 PageCode; MV_U8 UnrecoverableCondition:1; MV_U8 CriticalCondition:1; MV_U8 NoncriticalCondition:1; MV_U8 InformationCondition:1; MV_U8 Reserved1:4; MV_U8 PageLength[2]; MV_U8 GenerationCode[4];} EnclosureControlPage, *PEnclosureControlPage;typedef struct _DeviceElementForEnclosureControlPage{ MV_U8 Reserved1:4; MV_U8 ResetSwap:1; MV_U8 Disable:1; MV_U8 PredictedFailure:1; MV_U8 Select:1; MV_U8 Reserved2; MV_U8 Reserved3:1; MV_U8 RequestIdentify:1; MV_U8 RequestRemove:1; MV_U8 RequestInsert:1; MV_U8 Reserved4:2; MV_U8 DoNotRemove:1; MV_U8 Reserved5:1; MV_U8 Reserved6:2; MV_U8 EnableBypassB:1; MV_U8 EnableBypassA:1; MV_U8 DeviceOff:1; MV_U8 RequestFault:1; MV_U8 Reserved7:2;} DeviceElementForEnclosureControlPage, *PDeviceElementForEnclosureControlPage;typedef struct _ArrayElementForEnclosureControlPage{ MV_U8 Reserved1:4; MV_U8 ResetSwap:1; MV_U8 Disable:1; MV_U8 PredictedFailure:1; MV_U8 Select:1; MV_U8 RequestRebuildRemapAbort:1; MV_U8 RequestRebuildRemap:1; MV_U8 RequestInFailedArray:1; MV_U8 RequestInCriticalArray:1; MV_U8 RequestConsistencyCheck:1; MV_U8 RequestHotSpare:1; MV_U8 RequestReservedDevice:1; MV_U8 RequestOK:1; MV_U8 Reserved2:1; MV_U8 RequestIdentify:1; MV_U8 RequestRemove:1; MV_U8 RequestInsert:1; MV_U8 Reserved3:2; MV_U8 DoNotRemove:1; MV_U8 Active:1; MV_U8 Reserved4:2; MV_U8 EnableBypassB:1; MV_U8 EnableBypassA:1; MV_U8 DeviceOff:1; MV_U8 RequestFault:1; MV_U8 Reserved5:2;} ArrayElementForEnclosureControlPage, *PArrayElementForEnclosureControlPage;typedef union { DeviceElementForEnclosureStatusPage Status; DeviceElementForEnclosureControlPage Control; }DeviceEnclosureElement, *PDeviceEnclosureElement;typedef union { ArrayElementForEnclosureStatusPage Status; ArrayElementForEnclosureControlPage Control; }ArrayEnclosureElement, *PArrayEnclosureElement;typedef union { DeviceEnclosureElement DeviceType; ArrayEnclosureElement ArrayType; }SesEnclosureElement, *PSesEnclosureElement;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?