⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dac960.h

📁 Linux块设备驱动源码
💻 H
📖 第 1 页 / 共 5 页
字号:
}DAC960_V1_RebuildProgress_T;/*  Define the DAC960 V1 Firmware Background Initialization Status Command  reply structure.*/typedef struct DAC960_V1_BackgroundInitializationStatus{  unsigned int LogicalDriveSize;			/* Bytes 0-3 */  unsigned int BlocksCompleted;				/* Bytes 4-7 */  unsigned char Reserved1[12];				/* Bytes 8-19 */  unsigned int LogicalDriveNumber;			/* Bytes 20-23 */  unsigned char RAIDLevel;				/* Byte 24 */  enum {    DAC960_V1_BackgroundInitializationInvalid =	    0x00,    DAC960_V1_BackgroundInitializationStarted =	    0x02,    DAC960_V1_BackgroundInitializationInProgress =  0x04,    DAC960_V1_BackgroundInitializationSuspended =   0x05,    DAC960_V1_BackgroundInitializationCancelled =   0x06  } __attribute__ ((packed)) Status;			/* Byte 25 */  unsigned char Reserved2[6];				/* Bytes 26-31 */}DAC960_V1_BackgroundInitializationStatus_T;/*  Define the DAC960 V1 Firmware Error Table Entry structure.*/typedef struct DAC960_V1_ErrorTableEntry{  unsigned char ParityErrorCount;			/* Byte 0 */  unsigned char SoftErrorCount;				/* Byte 1 */  unsigned char HardErrorCount;				/* Byte 2 */  unsigned char MiscErrorCount;				/* Byte 3 */}DAC960_V1_ErrorTableEntry_T;/*  Define the DAC960 V1 Firmware Get Error Table Command reply structure.*/typedef struct DAC960_V1_ErrorTable{  DAC960_V1_ErrorTableEntry_T    ErrorTableEntries[DAC960_V1_MaxChannels][DAC960_V1_MaxTargets];}DAC960_V1_ErrorTable_T;/*  Define the DAC960 V1 Firmware Read Config2 Command reply structure.*/typedef struct DAC960_V1_Config2{  unsigned char :1;					/* Byte 0 Bit 0 */  boolean ActiveNegationEnabled:1;			/* Byte 0 Bit 1 */  unsigned char :5;					/* Byte 0 Bits 2-6 */  boolean NoRescanIfResetReceivedDuringScan:1;		/* Byte 0 Bit 7 */  boolean StorageWorksSupportEnabled:1;			/* Byte 1 Bit 0 */  boolean HewlettPackardSupportEnabled:1;		/* Byte 1 Bit 1 */  boolean NoDisconnectOnFirstCommand:1;			/* Byte 1 Bit 2 */  unsigned char :2;					/* Byte 1 Bits 3-4 */  boolean AEMI_ARM:1;					/* Byte 1 Bit 5 */  boolean AEMI_OFM:1;					/* Byte 1 Bit 6 */  unsigned char :1;					/* Byte 1 Bit 7 */  enum {    DAC960_V1_OEMID_Mylex =			0x00,    DAC960_V1_OEMID_IBM =			0x08,    DAC960_V1_OEMID_HP =			0x0A,    DAC960_V1_OEMID_DEC =			0x0C,    DAC960_V1_OEMID_Siemens =			0x10,    DAC960_V1_OEMID_Intel =			0x12  } __attribute__ ((packed)) OEMID;			/* Byte 2 */  unsigned char OEMModelNumber;				/* Byte 3 */  unsigned char PhysicalSector;				/* Byte 4 */  unsigned char LogicalSector;				/* Byte 5 */  unsigned char BlockFactor;				/* Byte 6 */  boolean ReadAheadEnabled:1;				/* Byte 7 Bit 0 */  boolean LowBIOSDelay:1;				/* Byte 7 Bit 1 */  unsigned char :2;					/* Byte 7 Bits 2-3 */  boolean ReassignRestrictedToOneSector:1;		/* Byte 7 Bit 4 */  unsigned char :1;					/* Byte 7 Bit 5 */  boolean ForceUnitAccessDuringWriteRecovery:1;		/* Byte 7 Bit 6 */  boolean EnableLeftSymmetricRAID5Algorithm:1;		/* Byte 7 Bit 7 */  unsigned char DefaultRebuildRate;			/* Byte 8 */  unsigned char :8;					/* Byte 9 */  unsigned char BlocksPerCacheLine;			/* Byte 10 */  unsigned char BlocksPerStripe;			/* Byte 11 */  struct {    enum {      DAC960_V1_Async =				0x0,      DAC960_V1_Sync_8MHz =			0x1,      DAC960_V1_Sync_5MHz =			0x2,      DAC960_V1_Sync_10or20MHz =		0x3	/* Byte 11 Bits 0-1 */    } __attribute__ ((packed)) Speed:2;    boolean Force8Bit:1;				/* Byte 11 Bit 2 */    boolean DisableFast20:1;				/* Byte 11 Bit 3 */    unsigned char :3;					/* Byte 11 Bits 4-6 */    boolean EnableTaggedQueuing:1;			/* Byte 11 Bit 7 */  } __attribute__ ((packed)) ChannelParameters[6];	/* Bytes 12-17 */  unsigned char SCSIInitiatorID;			/* Byte 18 */  unsigned char :8;					/* Byte 19 */  enum {    DAC960_V1_StartupMode_ControllerSpinUp =	0x00,    DAC960_V1_StartupMode_PowerOnSpinUp =	0x01  } __attribute__ ((packed)) StartupMode;		/* Byte 20 */  unsigned char SimultaneousDeviceSpinUpCount;		/* Byte 21 */  unsigned char SecondsDelayBetweenSpinUps;		/* Byte 22 */  unsigned char Reserved1[29];				/* Bytes 23-51 */  boolean BIOSDisabled:1;				/* Byte 52 Bit 0 */  boolean CDROMBootEnabled:1;				/* Byte 52 Bit 1 */  unsigned char :3;					/* Byte 52 Bits 2-4 */  enum {    DAC960_V1_Geometry_128_32 =			0x0,    DAC960_V1_Geometry_255_63 =			0x1,    DAC960_V1_Geometry_Reserved1 =		0x2,    DAC960_V1_Geometry_Reserved2 =		0x3  } __attribute__ ((packed)) DriveGeometry:2;		/* Byte 52 Bits 5-6 */  unsigned char :1;					/* Byte 52 Bit 7 */  unsigned char Reserved2[9];				/* Bytes 53-61 */  unsigned short Checksum;				/* Bytes 62-63 */}DAC960_V1_Config2_T;/*  Define the DAC960 V1 Firmware DCDB request structure.*/typedef struct DAC960_V1_DCDB{  unsigned char TargetID:4;				 /* Byte 0 Bits 0-3 */  unsigned char Channel:4;				 /* Byte 0 Bits 4-7 */  enum {    DAC960_V1_DCDB_NoDataTransfer =		0,    DAC960_V1_DCDB_DataTransferDeviceToSystem = 1,    DAC960_V1_DCDB_DataTransferSystemToDevice = 2,    DAC960_V1_DCDB_IllegalDataTransfer =	3  } __attribute__ ((packed)) Direction:2;		 /* Byte 1 Bits 0-1 */  boolean EarlyStatus:1;				 /* Byte 1 Bit 2 */  unsigned char :1;					 /* Byte 1 Bit 3 */  enum {    DAC960_V1_DCDB_Timeout_24_hours =		0,    DAC960_V1_DCDB_Timeout_10_seconds =		1,    DAC960_V1_DCDB_Timeout_60_seconds =		2,    DAC960_V1_DCDB_Timeout_10_minutes =		3  } __attribute__ ((packed)) Timeout:2;			 /* Byte 1 Bits 4-5 */  boolean NoAutomaticRequestSense:1;			 /* Byte 1 Bit 6 */  boolean DisconnectPermitted:1;			 /* Byte 1 Bit 7 */  unsigned short TransferLength;			 /* Bytes 2-3 */  DAC960_BusAddress32_T BusAddress;			 /* Bytes 4-7 */  unsigned char CDBLength:4;				 /* Byte 8 Bits 0-3 */  unsigned char TransferLengthHigh4:4;			 /* Byte 8 Bits 4-7 */  unsigned char SenseLength;				 /* Byte 9 */  unsigned char CDB[12];				 /* Bytes 10-21 */  unsigned char SenseData[64];				 /* Bytes 22-85 */  unsigned char Status;					 /* Byte 86 */  unsigned char :8;					 /* Byte 87 */}DAC960_V1_DCDB_T;/*  Define the DAC960 V1 Firmware Scatter/Gather List Type 1 32 Bit Address  32 Bit Byte Count structure.*/typedef struct DAC960_V1_ScatterGatherSegment{  DAC960_BusAddress32_T SegmentDataPointer;		/* Bytes 0-3 */  DAC960_ByteCount32_T SegmentByteCount;		/* Bytes 4-7 */}DAC960_V1_ScatterGatherSegment_T;/*  Define the 13 Byte DAC960 V1 Firmware Command Mailbox structure.  Bytes 13-15  are not used.  The Command Mailbox structure is padded to 16 bytes for  efficient access.*/typedef union DAC960_V1_CommandMailbox{  unsigned int Words[4];				/* Words 0-3 */  unsigned char Bytes[16];				/* Bytes 0-15 */  struct {    DAC960_V1_CommandOpcode_T CommandOpcode;		/* Byte 0 */    DAC960_V1_CommandIdentifier_T CommandIdentifier;	/* Byte 1 */    unsigned char Dummy[14];				/* Bytes 2-15 */  } __attribute__ ((packed)) Common;  struct {    DAC960_V1_CommandOpcode_T CommandOpcode;		/* Byte 0 */    DAC960_V1_CommandIdentifier_T CommandIdentifier;	/* Byte 1 */    unsigned char Dummy1[6];				/* Bytes 2-7 */    DAC960_BusAddress32_T BusAddress;			/* Bytes 8-11 */    unsigned char Dummy2[4];				/* Bytes 12-15 */  } __attribute__ ((packed)) Type3;  struct {    DAC960_V1_CommandOpcode_T CommandOpcode;		/* Byte 0 */    DAC960_V1_CommandIdentifier_T CommandIdentifier;	/* Byte 1 */    unsigned char CommandOpcode2;			/* Byte 2 */    unsigned char Dummy1[5];				/* Bytes 3-7 */    DAC960_BusAddress32_T BusAddress;			/* Bytes 8-11 */    unsigned char Dummy2[4];				/* Bytes 12-15 */  } __attribute__ ((packed)) Type3B;  struct {    DAC960_V1_CommandOpcode_T CommandOpcode;		/* Byte 0 */    DAC960_V1_CommandIdentifier_T CommandIdentifier;	/* Byte 1 */    unsigned char Dummy1[5];				/* Bytes 2-6 */    unsigned char LogicalDriveNumber:6;			/* Byte 7 Bits 0-6 */    boolean AutoRestore:1;				/* Byte 7 Bit 7 */    unsigned char Dummy2[8];				/* Bytes 8-15 */  } __attribute__ ((packed)) Type3C;  struct {    DAC960_V1_CommandOpcode_T CommandOpcode;		/* Byte 0 */    DAC960_V1_CommandIdentifier_T CommandIdentifier;	/* Byte 1 */    unsigned char Channel;				/* Byte 2 */    unsigned char TargetID;				/* Byte 3 */    DAC960_V1_PhysicalDeviceState_T DeviceState:5;	/* Byte 4 Bits 0-4 */    unsigned char Modifier:3;				/* Byte 4 Bits 5-7 */    unsigned char Dummy1[3];				/* Bytes 5-7 */    DAC960_BusAddress32_T BusAddress;			/* Bytes 8-11 */    unsigned char Dummy2[4];				/* Bytes 12-15 */  } __attribute__ ((packed)) Type3D;  struct {    DAC960_V1_CommandOpcode_T CommandOpcode;		/* Byte 0 */    DAC960_V1_CommandIdentifier_T CommandIdentifier;	/* Byte 1 */    DAC960_V1_PerformEventLogOpType_T OperationType;	/* Byte 2 */    unsigned char OperationQualifier;			/* Byte 3 */    unsigned short SequenceNumber;			/* Bytes 4-5 */    unsigned char Dummy1[2];				/* Bytes 6-7 */    DAC960_BusAddress32_T BusAddress;			/* Bytes 8-11 */    unsigned char Dummy2[4];				/* Bytes 12-15 */  } __attribute__ ((packed)) Type3E;  struct {    DAC960_V1_CommandOpcode_T CommandOpcode;		/* Byte 0 */    DAC960_V1_CommandIdentifier_T CommandIdentifier;	/* Byte 1 */    unsigned char Dummy1[2];				/* Bytes 2-3 */    unsigned char RebuildRateConstant;			/* Byte 4 */    unsigned char Dummy2[3];				/* Bytes 5-7 */    DAC960_BusAddress32_T BusAddress;			/* Bytes 8-11 */    unsigned char Dummy3[4];				/* Bytes 12-15 */  } __attribute__ ((packed)) Type3R;  struct {    DAC960_V1_CommandOpcode_T CommandOpcode;		/* Byte 0 */    DAC960_V1_CommandIdentifier_T CommandIdentifier;	/* Byte 1 */    unsigned short TransferLength;			/* Bytes 2-3 */    unsigned int LogicalBlockAddress;			/* Bytes 4-7 */    DAC960_BusAddress32_T BusAddress;			/* Bytes 8-11 */    unsigned char LogicalDriveNumber;			/* Byte 12 */    unsigned char Dummy[3];				/* Bytes 13-15 */  } __attribute__ ((packed)) Type4;  struct {    DAC960_V1_CommandOpcode_T CommandOpcode;		/* Byte 0 */    DAC960_V1_CommandIdentifier_T CommandIdentifier;	/* Byte 1 */    struct {      unsigned short TransferLength:11;			/* Bytes 2-3 */      unsigned char LogicalDriveNumber:5;		/* Byte 3 Bits 3-7 */    } __attribute__ ((packed)) LD;    unsigned int LogicalBlockAddress;			/* Bytes 4-7 */    DAC960_BusAddress32_T BusAddress;			/* Bytes 8-11 */    unsigned char ScatterGatherCount:6;			/* Byte 12 Bits 0-5 */    enum {      DAC960_V1_ScatterGather_32BitAddress_32BitByteCount = 0x0,      DAC960_V1_ScatterGather_32BitAddress_16BitByteCount = 0x1,      DAC960_V1_ScatterGather_32BitByteCount_32BitAddress = 0x2,      DAC960_V1_ScatterGather_16BitByteCount_32BitAddress = 0x3    } __attribute__ ((packed)) ScatterGatherType:2;	/* Byte 12 Bits 6-7 */    unsigned char Dummy[3];				/* Bytes 13-15 */  } __attribute__ ((packed)) Type5;  struct {    DAC960_V1_CommandOpcode_T CommandOpcode;		/* Byte 0 */    DAC960_V1_CommandIdentifier_T CommandIdentifier;	/* Byte 1 */    unsigned char CommandOpcode2;			/* Byte 2 */    unsigned char :8;					/* Byte 3 */    DAC960_BusAddress32_T CommandMailboxesBusAddress;	/* Bytes 4-7 */    DAC960_BusAddress32_T StatusMailboxesBusAddress;	/* Bytes 8-11 */    unsigned char Dummy[4];				/* Bytes 12-15 */  } __attribute__ ((packed)) TypeX;}DAC960_V1_CommandMailbox_T;/*  Define the DAC960 V2 Firmware Command Opcodes.*/typedef enum{  DAC960_V2_MemCopy =				0x01,  DAC960_V2_SCSI_10_Passthru =			0x02,  DAC960_V2_SCSI_255_Passthru =			0x03,  DAC960_V2_SCSI_10 =				0x04,  DAC960_V2_SCSI_256 =				0x05,  DAC960_V2_IOCTL =				0x20}__attribute__ ((packed))DAC960_V2_CommandOpcode_T;/*  Define the DAC960 V2 Firmware IOCTL Opcodes.*/typedef enum{  DAC960_V2_GetControllerInfo =			0x01,  DAC960_V2_GetLogicalDeviceInfoValid =		0x03,  DAC960_V2_GetPhysicalDeviceInfoValid =	0x05,  DAC960_V2_GetHealthStatus =			0x11,  DAC960_V2_GetEvent =				0x15,  DAC960_V2_StartDiscovery =			0x81,  DAC960_V2_SetDeviceState =			0x82,  DAC960_V2_RebuildDeviceStart =		0x88,  DAC960_V2_RebuildDeviceStop =			0x89,  DAC960_V2_ConsistencyCheckStart =		0x8C,  DAC960_V2_ConsistencyCheckStop =		0x8D,  DAC960_V2_SetMemoryMailbox =			0x8E,  DAC960_V2_PauseDevice =			0x92,  DAC960_V2_TranslatePhysicalToLogicalDevice =	0xC5}__attribute__ ((packed))DAC960_V2_IOCTL_Opcode_T;/*  Define the DAC960 V2 Firmware Command Identifier type.*/typedef unsigned short DAC960_V2_CommandIdentifier_T;/*  Define the DAC960 V2 Firmware Command Status Codes.*/#define DAC960_V2_NormalCompletion		0x00#define DAC960_V2_AbormalCompletion		0x02#define DAC960_V2_DeviceBusy			0x08#define DAC960_V2_DeviceNonresponsive		0x0E#define DAC960_V2_DeviceNonresponsive2		0x0F#define DAC960_V2_DeviceRevervationConflict	0x18typedef unsigned char DAC960_V2_CommandStatus_T;/*

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -