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

📄 dac960.h

📁 Linux块设备驱动源码
💻 H
📖 第 1 页 / 共 5 页
字号:
#define DAC960_V1_RebuildFailed_NewDriveFailed	0x0004	/* Consistency */#define DAC960_V1_RebuildSuccessful		0x0100	/* Consistency */#define DAC960_V1_RebuildSuccessfullyTerminated	0x0107	/* Consistency */#define DAC960_V1_BackgroundInitSuccessful	0x0100	/* Consistency */#define DAC960_V1_BackgroundInitAborted		0x0005	/* Consistency */#define DAC960_V1_NoBackgroundInitInProgress	0x0105	/* Consistency */#define DAC960_V1_AddCapacityInProgress		0x0004	/* Consistency */#define DAC960_V1_AddCapacityFailedOrSuspended	0x00F4	/* Consistency */#define DAC960_V1_Config2ChecksumError		0x0002	/* Configuration */#define DAC960_V1_ConfigurationSuspended	0x0106	/* Configuration */#define DAC960_V1_FailedToConfigureNVRAM	0x0105	/* Configuration */#define DAC960_V1_ConfigurationNotSavedStateChange 0x0106 /* Configuration */#define DAC960_V1_SubsystemNotInstalled		0x0001	/* Subsystem */#define DAC960_V1_SubsystemFailed		0x0002	/* Subsystem */#define DAC960_V1_SubsystemBusy			0x0106	/* Subsystem */typedef unsigned short DAC960_V1_CommandStatus_T;/*  Define the DAC960 V1 Firmware Enquiry Command reply structure.*/typedef struct DAC960_V1_Enquiry{  unsigned char NumberOfLogicalDrives;			/* Byte 0 */  unsigned int :24;					/* Bytes 1-3 */  unsigned int LogicalDriveSizes[32];			/* Bytes 4-131 */  unsigned short FlashAge;				/* Bytes 132-133 */  struct {    boolean DeferredWriteError:1;			/* Byte 134 Bit 0 */    boolean BatteryLow:1;				/* Byte 134 Bit 1 */    unsigned char :6;					/* Byte 134 Bits 2-7 */  } StatusFlags;  unsigned char :8;					/* Byte 135 */  unsigned char MinorFirmwareVersion;			/* Byte 136 */  unsigned char MajorFirmwareVersion;			/* Byte 137 */  enum {    DAC960_V1_NoStandbyRebuildOrCheckInProgress =		    0x00,    DAC960_V1_StandbyRebuildInProgress =			    0x01,    DAC960_V1_BackgroundRebuildInProgress =			    0x02,    DAC960_V1_BackgroundCheckInProgress =			    0x03,    DAC960_V1_StandbyRebuildCompletedWithError =		    0xFF,    DAC960_V1_BackgroundRebuildOrCheckFailed_DriveFailed =	    0xF0,    DAC960_V1_BackgroundRebuildOrCheckFailed_LogicalDriveFailed =   0xF1,    DAC960_V1_BackgroundRebuildOrCheckFailed_OtherCauses =	    0xF2,    DAC960_V1_BackgroundRebuildOrCheckSuccessfullyTerminated =	    0xF3  } __attribute__ ((packed)) RebuildFlag;		/* Byte 138 */  unsigned char MaxCommands;				/* Byte 139 */  unsigned char OfflineLogicalDriveCount;		/* Byte 140 */  unsigned char :8;					/* Byte 141 */  unsigned short EventLogSequenceNumber;		/* Bytes 142-143 */  unsigned char CriticalLogicalDriveCount;		/* Byte 144 */  unsigned int :24;					/* Bytes 145-147 */  unsigned char DeadDriveCount;				/* Byte 148 */  unsigned char :8;					/* Byte 149 */  unsigned char RebuildCount;				/* Byte 150 */  struct {    unsigned char :3;					/* Byte 151 Bits 0-2 */    boolean BatteryBackupUnitPresent:1;			/* Byte 151 Bit 3 */    unsigned char :3;					/* Byte 151 Bits 4-6 */    unsigned char :1;					/* Byte 151 Bit 7 */  } MiscFlags;  struct {    unsigned char TargetID;    unsigned char Channel;  } DeadDrives[21];					/* Bytes 152-194 */  unsigned char Reserved[62];				/* Bytes 195-255 */}__attribute__ ((packed))DAC960_V1_Enquiry_T;/*  Define the DAC960 V1 Firmware Enquiry2 Command reply structure.*/typedef struct DAC960_V1_Enquiry2{  struct {    enum {      DAC960_V1_P_PD_PU =			0x01,      DAC960_V1_PL =				0x02,      DAC960_V1_PG =				0x10,      DAC960_V1_PJ =				0x11,      DAC960_V1_PR =				0x12,      DAC960_V1_PT =				0x13,      DAC960_V1_PTL0 =				0x14,      DAC960_V1_PRL =				0x15,      DAC960_V1_PTL1 =				0x16,      DAC960_V1_1164P =				0x20    } __attribute__ ((packed)) SubModel;		/* Byte 0 */    unsigned char ActualChannels;			/* Byte 1 */    enum {      DAC960_V1_FiveChannelBoard =		0x01,      DAC960_V1_ThreeChannelBoard =		0x02,      DAC960_V1_TwoChannelBoard =		0x03,      DAC960_V1_ThreeChannelASIC_DAC =		0x04    } __attribute__ ((packed)) Model;			/* Byte 2 */    enum {      DAC960_V1_EISA_Controller =		0x01,      DAC960_V1_MicroChannel_Controller =	0x02,      DAC960_V1_PCI_Controller =		0x03,      DAC960_V1_SCSItoSCSI_Controller =		0x08    } __attribute__ ((packed)) ProductFamily;		/* Byte 3 */  } HardwareID;						/* Bytes 0-3 */  /* MajorVersion.MinorVersion-FirmwareType-TurnID */  struct {    unsigned char MajorVersion;				/* Byte 4 */    unsigned char MinorVersion;				/* Byte 5 */    unsigned char TurnID;				/* Byte 6 */    char FirmwareType;					/* Byte 7 */  } FirmwareID;						/* Bytes 4-7 */  unsigned char :8;					/* Byte 8 */  unsigned int :24;					/* Bytes 9-11 */  unsigned char ConfiguredChannels;			/* Byte 12 */  unsigned char ActualChannels;				/* Byte 13 */  unsigned char MaxTargets;				/* Byte 14 */  unsigned char MaxTags;				/* Byte 15 */  unsigned char MaxLogicalDrives;			/* Byte 16 */  unsigned char MaxArms;				/* Byte 17 */  unsigned char MaxSpans;				/* Byte 18 */  unsigned char :8;					/* Byte 19 */  unsigned int :32;					/* Bytes 20-23 */  unsigned int MemorySize;				/* Bytes 24-27 */  unsigned int CacheSize;				/* Bytes 28-31 */  unsigned int FlashMemorySize;				/* Bytes 32-35 */  unsigned int NonVolatileMemorySize;			/* Bytes 36-39 */  struct {    enum {      DAC960_V1_RamType_DRAM =			0x0,      DAC960_V1_RamType_EDO =			0x1,      DAC960_V1_RamType_SDRAM =			0x2,      DAC960_V1_RamType_Last =			0x7    } __attribute__ ((packed)) RamType:3;		/* Byte 40 Bits 0-2 */    enum {      DAC960_V1_ErrorCorrection_None =		0x0,      DAC960_V1_ErrorCorrection_Parity =	0x1,      DAC960_V1_ErrorCorrection_ECC =		0x2,      DAC960_V1_ErrorCorrection_Last =		0x7    } __attribute__ ((packed)) ErrorCorrection:3;	/* Byte 40 Bits 3-5 */    boolean FastPageMode:1;				/* Byte 40 Bit 6 */    boolean LowPowerMemory:1;				/* Byte 40 Bit 7 */    unsigned char :8;					/* Bytes 41 */  } MemoryType;  unsigned short ClockSpeed;				/* Bytes 42-43 */  unsigned short MemorySpeed;				/* Bytes 44-45 */  unsigned short HardwareSpeed;				/* Bytes 46-47 */  unsigned int :32;					/* Bytes 48-51 */  unsigned int :32;					/* Bytes 52-55 */  unsigned char :8;					/* Byte 56 */  unsigned char :8;					/* Byte 57 */  unsigned short :16;					/* Bytes 58-59 */  unsigned short MaxCommands;				/* Bytes 60-61 */  unsigned short MaxScatterGatherEntries;		/* Bytes 62-63 */  unsigned short MaxDriveCommands;			/* Bytes 64-65 */  unsigned short MaxIODescriptors;			/* Bytes 66-67 */  unsigned short MaxCombinedSectors;			/* Bytes 68-69 */  unsigned char Latency;				/* Byte 70 */  unsigned char :8;					/* Byte 71 */  unsigned char SCSITimeout;				/* Byte 72 */  unsigned char :8;					/* Byte 73 */  unsigned short MinFreeLines;				/* Bytes 74-75 */  unsigned int :32;					/* Bytes 76-79 */  unsigned int :32;					/* Bytes 80-83 */  unsigned char RebuildRateConstant;			/* Byte 84 */  unsigned char :8;					/* Byte 85 */  unsigned char :8;					/* Byte 86 */  unsigned char :8;					/* Byte 87 */  unsigned int :32;					/* Bytes 88-91 */  unsigned int :32;					/* Bytes 92-95 */  unsigned short PhysicalDriveBlockSize;		/* Bytes 96-97 */  unsigned short LogicalDriveBlockSize;			/* Bytes 98-99 */  unsigned short MaxBlocksPerCommand;			/* Bytes 100-101 */  unsigned short BlockFactor;				/* Bytes 102-103 */  unsigned short CacheLineSize;				/* Bytes 104-105 */  struct {    enum {      DAC960_V1_Narrow_8bit =			0x0,      DAC960_V1_Wide_16bit =			0x1,      DAC960_V1_Wide_32bit =			0x2    } __attribute__ ((packed)) BusWidth:2;		/* Byte 106 Bits 0-1 */    enum {      DAC960_V1_Fast =				0x0,      DAC960_V1_Ultra =				0x1,      DAC960_V1_Ultra2 =			0x2    } __attribute__ ((packed)) BusSpeed:2;		/* Byte 106 Bits 2-3 */    boolean Differential:1;				/* Byte 106 Bit 4 */    unsigned char :3;					/* Byte 106 Bits 5-7 */  } SCSICapability;  unsigned char :8;					/* Byte 107 */  unsigned int :32;					/* Bytes 108-111 */  unsigned short FirmwareBuildNumber;			/* Bytes 112-113 */  enum {    DAC960_V1_AEMI =				0x01,    DAC960_V1_OEM1 =				0x02,    DAC960_V1_OEM2 =				0x04,    DAC960_V1_OEM3 =				0x08,    DAC960_V1_Conner =				0x10,    DAC960_V1_SAFTE =				0x20  } __attribute__ ((packed)) FaultManagementType;	/* Byte 114 */  unsigned char :8;					/* Byte 115 */  struct {    boolean Clustering:1;				/* Byte 116 Bit 0 */    boolean MylexOnlineRAIDExpansion:1;			/* Byte 116 Bit 1 */    boolean ReadAhead:1;				/* Byte 116 Bit 2 */    boolean BackgroundInitialization:1;			/* Byte 116 Bit 3 */    unsigned int :28;					/* Bytes 116-119 */  } FirmwareFeatures;  unsigned int :32;					/* Bytes 120-123 */  unsigned int :32;					/* Bytes 124-127 */}DAC960_V1_Enquiry2_T;/*  Define the DAC960 V1 Firmware Logical Drive State type.*/typedef enum{  DAC960_V1_LogicalDrive_Online =		0x03,  DAC960_V1_LogicalDrive_Critical =		0x04,  DAC960_V1_LogicalDrive_Offline =		0xFF}__attribute__ ((packed))DAC960_V1_LogicalDriveState_T;/*  Define the DAC960 V1 Firmware Logical Drive Information structure.*/typedef struct DAC960_V1_LogicalDriveInformation{  unsigned int LogicalDriveSize;			/* Bytes 0-3 */  DAC960_V1_LogicalDriveState_T LogicalDriveState;	/* Byte 4 */  unsigned char RAIDLevel:7;				/* Byte 5 Bits 0-6 */  boolean WriteBack:1;					/* Byte 5 Bit 7 */  unsigned short :16;					/* Bytes 6-7 */}DAC960_V1_LogicalDriveInformation_T;/*  Define the DAC960 V1 Firmware Get Logical Drive Information Command  reply structure.*/typedef DAC960_V1_LogicalDriveInformation_T	DAC960_V1_LogicalDriveInformationArray_T[DAC960_MaxLogicalDrives];/*  Define the DAC960 V1 Firmware Perform Event Log Operation Types.*/typedef enum{  DAC960_V1_GetEventLogEntry =			0x00}__attribute__ ((packed))DAC960_V1_PerformEventLogOpType_T;/*  Define the DAC960 V1 Firmware Get Event Log Entry Command reply structure.*/typedef struct DAC960_V1_EventLogEntry{  unsigned char MessageType;				/* Byte 0 */  unsigned char MessageLength;				/* Byte 1 */  unsigned char TargetID:5;				/* Byte 2 Bits 0-4 */  unsigned char Channel:3;				/* Byte 2 Bits 5-7 */  unsigned char LogicalUnit:6;				/* Byte 3 Bits 0-5 */  unsigned char :2;					/* Byte 3 Bits 6-7 */  unsigned short SequenceNumber;			/* Bytes 4-5 */  unsigned char ErrorCode:7;				/* Byte 6 Bits 0-6 */  boolean Valid:1;					/* Byte 6 Bit 7 */  unsigned char SegmentNumber;				/* Byte 7 */  DAC960_SCSI_RequestSenseKey_T SenseKey:4;		/* Byte 8 Bits 0-3 */  unsigned char :1;					/* Byte 8 Bit 4 */  boolean ILI:1;					/* Byte 8 Bit 5 */  boolean EOM:1;					/* Byte 8 Bit 6 */  boolean Filemark:1;					/* Byte 8 Bit 7 */  unsigned char Information[4];				/* Bytes 9-12 */  unsigned char AdditionalSenseLength;			/* Byte 13 */  unsigned char CommandSpecificInformation[4];		/* Bytes 14-17 */  unsigned char AdditionalSenseCode;			/* Byte 18 */  unsigned char AdditionalSenseCodeQualifier;		/* Byte 19 */  unsigned char Dummy[12];				/* Bytes 20-31 */}DAC960_V1_EventLogEntry_T;/*  Define the DAC960 V1 Firmware Physical Device State type.*/typedef enum{    DAC960_V1_Device_Dead =			0x00,    DAC960_V1_Device_WriteOnly =		0x02,    DAC960_V1_Device_Online =			0x03,    DAC960_V1_Device_Standby =			0x10}__attribute__ ((packed))DAC960_V1_PhysicalDeviceState_T;/*  Define the DAC960 V1 Firmware Get Device State Command reply structure.  The structure is padded by 2 bytes for compatibility with Version 2.xx  Firmware.*/typedef struct DAC960_V1_DeviceState{  boolean Present:1;					/* Byte 0 Bit 0 */  unsigned char :7;					/* Byte 0 Bits 1-7 */  enum {    DAC960_V1_OtherType =			0x0,    DAC960_V1_DiskType =			0x1,    DAC960_V1_SequentialType =			0x2,    DAC960_V1_CDROM_or_WORM_Type =		0x3    } __attribute__ ((packed)) DeviceType:2;		/* Byte 1 Bits 0-1 */  boolean :1;						/* Byte 1 Bit 2 */  boolean Fast20:1;					/* Byte 1 Bit 3 */  boolean Sync:1;					/* Byte 1 Bit 4 */  boolean Fast:1;					/* Byte 1 Bit 5 */  boolean Wide:1;					/* Byte 1 Bit 6 */  boolean TaggedQueuingSupported:1;			/* Byte 1 Bit 7 */  DAC960_V1_PhysicalDeviceState_T DeviceState;		/* Byte 2 */  unsigned char :8;					/* Byte 3 */  unsigned char SynchronousMultiplier;			/* Byte 4 */  unsigned char SynchronousOffset:5;			/* Byte 5 Bits 0-4 */  unsigned char :3;					/* Byte 5 Bits 5-7 */  unsigned int DiskSize __attribute__ ((packed));	/* Bytes 6-9 */  unsigned short :16;					/* Bytes 10-11 */}DAC960_V1_DeviceState_T;/*  Define the DAC960 V1 Firmware Get Rebuild Progress Command reply structure.*/typedef struct DAC960_V1_RebuildProgress{  unsigned int LogicalDriveNumber;			/* Bytes 0-3 */  unsigned int LogicalDriveSize;			/* Bytes 4-7 */  unsigned int RemainingBlocks;				/* Bytes 8-11 */

⌨️ 快捷键说明

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