📄 dac960.h
字号:
}DAC960_V2_LogicalDeviceInfo_T;/* Define the DAC960 V2 Firmware Physical Device State type.*/typedef enum{ DAC960_V2_Device_Unconfigured = 0x00, DAC960_V2_Device_Online = 0x01, DAC960_V2_Device_Rebuild = 0x03, DAC960_V2_Device_Missing = 0x04, DAC960_V2_Device_Critical = 0x05, DAC960_V2_Device_Dead = 0x08, DAC960_V2_Device_SuspectedDead = 0x0C, DAC960_V2_Device_CommandedOffline = 0x10, DAC960_V2_Device_Standby = 0x21, DAC960_V2_Device_InvalidState = 0xFF}__attribute__ ((packed))DAC960_V2_PhysicalDeviceState_T;/* Define the DAC960 V2 Firmware Get Physical Device Info reply structure.*/typedef struct DAC960_V2_PhysicalDeviceInfo{ unsigned char :8; /* Byte 0 */ unsigned char Channel; /* Byte 1 */ unsigned char TargetID; /* Byte 2 */ unsigned char LogicalUnit; /* Byte 3 */ /* Configuration Status Bits */ boolean PhysicalDeviceFaultTolerant:1; /* Byte 4 Bit 0 */ boolean PhysicalDeviceConnected:1; /* Byte 4 Bit 1 */ boolean PhysicalDeviceLocalToController:1; /* Byte 4 Bit 2 */ unsigned char :5; /* Byte 4 Bits 3-7 */ /* Multiple Host/Controller Status Bits */ boolean RemoteHostSystemDead:1; /* Byte 5 Bit 0 */ boolean RemoteControllerDead:1; /* Byte 5 Bit 1 */ unsigned char :6; /* Byte 5 Bits 2-7 */ DAC960_V2_PhysicalDeviceState_T PhysicalDeviceState; /* Byte 6 */ unsigned char NegotiatedDataWidthBits; /* Byte 7 */ unsigned short NegotiatedSynchronousMegaTransfers; /* Bytes 8-9 */ /* Multiported Physical Device Information */ unsigned char NumberOfPortConnections; /* Byte 10 */ unsigned char DriveAccessibilityBitmap; /* Byte 11 */ unsigned int :32; /* Bytes 12-15 */ unsigned char NetworkAddress[16]; /* Bytes 16-31 */ unsigned short MaximumTags; /* Bytes 32-33 */ /* Physical Device Operations Status */ boolean ConsistencyCheckInProgress:1; /* Byte 34 Bit 0 */ boolean RebuildInProgress:1; /* Byte 34 Bit 1 */ boolean MakingDataConsistentInProgress:1; /* Byte 34 Bit 2 */ boolean PhysicalDeviceInitializationInProgress:1; /* Byte 34 Bit 3 */ boolean DataMigrationInProgress:1; /* Byte 34 Bit 4 */ boolean PatrolOperationInProgress:1; /* Byte 34 Bit 5 */ unsigned char :2; /* Byte 34 Bits 6-7 */ unsigned char LongOperationStatus; /* Byte 35 */ unsigned char ParityErrors; /* Byte 36 */ unsigned char SoftErrors; /* Byte 37 */ unsigned char HardErrors; /* Byte 38 */ unsigned char MiscellaneousErrors; /* Byte 39 */ unsigned char CommandTimeouts; /* Byte 40 */ unsigned char Retries; /* Byte 41 */ unsigned char Aborts; /* Byte 42 */ unsigned char PredictedFailuresDetected; /* Byte 43 */ unsigned int :32; /* Bytes 44-47 */ unsigned short :16; /* Bytes 48-49 */ unsigned short DeviceBlockSizeInBytes; /* Bytes 50-51 */ unsigned int OriginalDeviceSize; /* Bytes 52-55 */ unsigned int ConfigurableDeviceSize; /* Bytes 56-59 */ unsigned int :32; /* Bytes 60-63 */ unsigned char PhysicalDeviceName[16]; /* Bytes 64-79 */ unsigned char Reserved1[16]; /* Bytes 80-95 */ unsigned char Reserved2[32]; /* Bytes 96-127 */ unsigned char SCSI_InquiryData[36]; /* Bytes 128-163 */ unsigned char Reserved3[20]; /* Bytes 164-183 */ unsigned char Reserved4[8]; /* Bytes 184-191 */ DAC960_ByteCount64_T LastReadBlockNumber; /* Bytes 192-199 */ DAC960_ByteCount64_T LastWrittenBlockNumber; /* Bytes 200-207 */ DAC960_ByteCount64_T ConsistencyCheckBlockNumber; /* Bytes 208-215 */ DAC960_ByteCount64_T RebuildBlockNumber; /* Bytes 216-223 */ DAC960_ByteCount64_T MakingDataConsistentBlockNumber; /* Bytes 224-231 */ DAC960_ByteCount64_T DeviceInitializationBlockNumber; /* Bytes 232-239 */ DAC960_ByteCount64_T DataMigrationBlockNumber; /* Bytes 240-247 */ DAC960_ByteCount64_T PatrolOperationBlockNumber; /* Bytes 248-255 */ unsigned char Reserved5[256]; /* Bytes 256-511 */}DAC960_V2_PhysicalDeviceInfo_T;/* Define the DAC960 V2 Firmware Health Status Buffer structure.*/typedef struct DAC960_V2_HealthStatusBuffer{ unsigned int MicrosecondsFromControllerStartTime; /* Bytes 0-3 */ unsigned int MillisecondsFromControllerStartTime; /* Bytes 4-7 */ unsigned int SecondsFrom1January1970; /* Bytes 8-11 */ unsigned int :32; /* Bytes 12-15 */ unsigned int StatusChangeCounter; /* Bytes 16-19 */ unsigned int :32; /* Bytes 20-23 */ unsigned int DebugOutputMessageBufferIndex; /* Bytes 24-27 */ unsigned int CodedMessageBufferIndex; /* Bytes 28-31 */ unsigned int CurrentTimeTracePageNumber; /* Bytes 32-35 */ unsigned int CurrentProfilerPageNumber; /* Bytes 36-39 */ unsigned int NextEventSequenceNumber; /* Bytes 40-43 */ unsigned int :32; /* Bytes 44-47 */ unsigned char Reserved1[16]; /* Bytes 48-63 */ unsigned char Reserved2[64]; /* Bytes 64-127 */}DAC960_V2_HealthStatusBuffer_T;/* Define the DAC960 V2 Firmware Get Event reply structure.*/typedef struct DAC960_V2_Event{ unsigned int EventSequenceNumber; /* Bytes 0-3 */ unsigned int EventTime; /* Bytes 4-7 */ unsigned int EventCode; /* Bytes 8-11 */ unsigned char :8; /* Byte 12 */ unsigned char Channel; /* Byte 13 */ unsigned char TargetID; /* Byte 14 */ unsigned char LogicalUnit; /* Byte 15 */ unsigned int :32; /* Bytes 16-19 */ unsigned int EventSpecificParameter; /* Bytes 20-23 */ unsigned char RequestSenseData[40]; /* Bytes 24-63 */}DAC960_V2_Event_T;/* Define the DAC960 V2 Firmware Command Control Bits structure.*/typedef struct DAC960_V2_CommandControlBits{ boolean ForceUnitAccess:1; /* Byte 0 Bit 0 */ boolean DisablePageOut:1; /* Byte 0 Bit 1 */ boolean :1; /* Byte 0 Bit 2 */ boolean AdditionalScatterGatherListMemory:1; /* Byte 0 Bit 3 */ boolean DataTransferControllerToHost:1; /* Byte 0 Bit 4 */ boolean :1; /* Byte 0 Bit 5 */ boolean NoAutoRequestSense:1; /* Byte 0 Bit 6 */ boolean DisconnectProhibited:1; /* Byte 0 Bit 7 */}DAC960_V2_CommandControlBits_T;/* Define the DAC960 V2 Firmware Command Timeout structure.*/typedef struct DAC960_V2_CommandTimeout{ unsigned char TimeoutValue:6; /* Byte 0 Bits 0-5 */ enum { DAC960_V2_TimeoutScale_Seconds = 0, DAC960_V2_TimeoutScale_Minutes = 1, DAC960_V2_TimeoutScale_Hours = 2, DAC960_V2_TimeoutScale_Reserved = 3 } __attribute__ ((packed)) TimeoutScale:2; /* Byte 0 Bits 6-7 */}DAC960_V2_CommandTimeout_T;/* Define the DAC960 V2 Firmware Physical Device structure.*/typedef struct DAC960_V2_PhysicalDevice{ unsigned char LogicalUnit; /* Byte 0 */ unsigned char TargetID; /* Byte 1 */ unsigned char Channel:3; /* Byte 2 Bits 0-2 */ unsigned char Controller:5; /* Byte 2 Bits 3-7 */}__attribute__ ((packed))DAC960_V2_PhysicalDevice_T;/* Define the DAC960 V2 Firmware Logical Device structure.*/typedef struct DAC960_V2_LogicalDevice{ unsigned short LogicalDeviceNumber; /* Bytes 0-1 */ unsigned char :3; /* Byte 2 Bits 0-2 */ unsigned char Controller:5; /* Byte 2 Bits 3-7 */}__attribute__ ((packed))DAC960_V2_LogicalDevice_T;/* Define the DAC960 V2 Firmware Operation Device type.*/typedef enum{ DAC960_V2_Physical_Device = 0x00, DAC960_V2_RAID_Device = 0x01, DAC960_V2_Physical_Channel = 0x02, DAC960_V2_RAID_Channel = 0x03, DAC960_V2_Physical_Controller = 0x04, DAC960_V2_RAID_Controller = 0x05, DAC960_V2_Configuration_Group = 0x10, DAC960_V2_Enclosure = 0x11}__attribute__ ((packed))DAC960_V2_OperationDevice_T;/* Define the DAC960 V2 Firmware Translate Physical To Logical Device structure.*/typedef struct DAC960_V2_PhysicalToLogicalDevice{ unsigned short LogicalDeviceNumber; /* Bytes 0-1 */ unsigned short :16; /* Bytes 2-3 */ unsigned char PreviousBootController; /* Byte 4 */ unsigned char PreviousBootChannel; /* Byte 5 */ unsigned char PreviousBootTargetID; /* Byte 6 */ unsigned char PreviousBootLogicalUnit; /* Byte 7 */}DAC960_V2_PhysicalToLogicalDevice_T;/* Define the DAC960 V2 Firmware Scatter/Gather List Entry structure.*/typedef struct DAC960_V2_ScatterGatherSegment{ DAC960_BusAddress64_T SegmentDataPointer; /* Bytes 0-7 */ DAC960_ByteCount64_T SegmentByteCount; /* Bytes 8-15 */}DAC960_V2_ScatterGatherSegment_T;/* Define the DAC960 V2 Firmware Data Transfer Memory Address structure.*/typedef union DAC960_V2_DataTransferMemoryAddress{ DAC960_V2_ScatterGatherSegment_T ScatterGatherSegments[2]; /* Bytes 0-31 */ struct { unsigned short ScatterGatherList0Length; /* Bytes 0-1 */ unsigned short ScatterGatherList1Length; /* Bytes 2-3 */ unsigned short ScatterGatherList2Length; /* Bytes 4-5 */ unsigned short :16; /* Bytes 6-7 */ DAC960_BusAddress64_T ScatterGatherList0Address; /* Bytes 8-15 */ DAC960_BusAddress64_T ScatterGatherList1Address; /* Bytes 16-23 */ DAC960_BusAddress64_T ScatterGatherList2Address; /* Bytes 24-31 */ } ExtendedScatterGather;}DAC960_V2_DataTransferMemoryAddress_T;/* Define the 64 Byte DAC960 V2 Firmware Command Mailbox structure.*/typedef union DAC960_V2_CommandMailbox{ unsigned int Words[16]; /* Words 0-15 */ struct { DAC960_V2_CommandIdentifier_T CommandIdentifier; /* Bytes 0-1 */ DAC960_V2_CommandOpcode_T CommandOpcode; /* Byte 2 */ DAC960_V2_CommandControlBits_T CommandControlBits; /* Byte 3 */ DAC960_ByteCount32_T DataTransferSize:24; /* Bytes 4-6 */ unsigned char DataTransferPageNumber; /* Byte 7 */ DAC960_BusAddress64_T RequestSenseBusAddress; /* Bytes 8-15 */ unsigned int :24; /* Bytes 16-18 */ DAC960_V2_CommandTimeout_T CommandTimeout; /* Byte 19 */ unsigned char RequestSenseSize; /* Byte 20 */ unsigned char IOCTL_Opcode; /* Byte 21 */ unsigned char Reserved[10]; /* Bytes 22-31 */ DAC960_V2_DataTransferMemoryAddress_T DataTransferMemoryAddress; /* Bytes 32-63 */ } Common; struct { DAC960_V2_CommandIdentifier_T CommandIdentifier; /* Bytes 0-1 */ DAC960_V2_CommandOpcode_T CommandOpcode; /* Byte 2 */ DAC960_V2_CommandControlBits_T CommandControlBits; /* Byte 3 */ DAC960_ByteCount32_T DataTransferSize; /* Bytes 4-7 */ DAC960_BusAddress64_T RequestSenseBusAddress; /* Bytes 8-15 */ DAC960_V2_PhysicalDevice_T PhysicalDevice; /* Bytes 16-18 */ DAC960_V2_CommandTimeout_T CommandTimeout; /* Byte 19 */ unsigned char RequestSenseSize; /* Byte 20 */ unsigned char CDBLength; /* Byte 21 */ unsigned char SCSI_CDB[10]; /* Bytes 22-31 */ DAC960_V2_DataTransferMemoryAddress_T DataTransferMemoryAddress; /* Bytes 32-63 */ } SCSI_10; struct { DAC960_V2_CommandIdentifier_T CommandIdentifier; /* Bytes 0-1 */ DAC960_V2_CommandOpcode_T CommandOpcode; /* Byte 2 */ DAC960_V2_CommandControlBits_T CommandControlBits; /* Byte 3 */ DAC960_ByteCount32_T DataTransferSize; /* Bytes 4-7 */ DAC960_BusAddress64_T RequestSenseBusAddress; /* Bytes 8-15 */ DAC960_V2_PhysicalDevice_T PhysicalDevice; /* Bytes 16-18 */ DAC960_V2_CommandTimeout_T CommandTimeout; /* Byte 19 */ unsigned char RequestSenseSize; /* Byte 20 */ unsigned char CDBLength; /* Byte 21 */ unsigned short :16; /* Bytes 22-23 */ DAC960_BusAddress64_T SCSI_CDB_BusAddress; /* Bytes 24-31 */ DAC960_V2_DataTransferMemoryAddress_T DataTransferMemoryAddress; /* Bytes 32-63 */ } SCSI_255; struct { DAC960_V2_CommandIdentifier_T CommandIdentifier; /* Bytes 0-1 */ DAC960_V2_CommandOpcode_T CommandOpcode; /* Byte 2 */ DAC960_V2_CommandControlBits_T CommandControlBits; /* Byte 3 */ DAC960_ByteCount32_T DataTransferSize:24; /* Bytes 4-6 */ unsigned char DataTransferPageNumber; /* Byte 7 */ DAC960_BusAddress64_T RequestSenseBusAddress; /* Bytes 8-15 */ unsigned short :16; /* Bytes 16-17 */ unsigned char ControllerNumber; /* Byte 18 */ DAC960_V2_CommandTimeout_T CommandTimeout; /* Byte 19 */ unsigned char RequestSenseSize; /* Byte 20 */ unsigned char IOCTL_Opcode; /* Byte 21 */ unsigned char Reserved[10]; /* Bytes 22-31 */ DAC960_V2_DataTransferMemoryAddress_T DataTransferMemoryAddress; /* Bytes 32-63 */ } ControllerInfo; struct { DAC960_V2_CommandIdentifier_T CommandIdentifier; /* Bytes 0-1 */ DAC960_V2_CommandOpcode_T CommandOpcode; /* Byte 2 */ DAC960_V2_CommandControlBits_T CommandControlBits; /* Byte 3 */ DAC960_ByteCount32_T DataTransferSize:24; /* Bytes 4-6 */ unsigned char DataTransferPageNumber; /* Byte 7 */ DAC960_BusAddress64_T RequestSenseBusAddress; /* Bytes 8-15 */ DAC960_V2_LogicalDevice_T LogicalDevice; /* Bytes 16-18 */ DAC960_V2_CommandTimeout_T CommandTimeout; /* Byte 19 */ unsigned char RequestSenseSize; /* Byte 20 */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -