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

📄 mic.h

📁 RAID卡的测试程序
💻 H
📖 第 1 页 / 共 5 页
字号:
    u8      cs_MediaPatrolRate;
    u8      cs_RedCheckRate;
    u8      cs_OnlineExpRate;
    u8      cs_LDInitRate;
    u8      cs_MigrationRate;
    u8      cs_PDMRate;
    u8      cs_TransitionRate;
    u32     cs_ReassignedBlockThreshold;
    u32     cs_ErrorBlockThreshold;
    u8      cs_Reserved2[29];
    u8      cs_AutoRebuildEnable;
    u8      cs_MediaPatrolEnable;
    u32     cs_MediaPatrolStartTime;
    u32     cs_MediaPatrolStopTime;
    u8      cs_SpinUpDownEnable;
    u8      cs_Reserved3[27];
    u8      cs_SmartLogEnable;
    u8      cs_SmartPollInterval;
    u8      cs_SmartLogLevel;
    u8      cs_EnclosurePollInterval;
    u8      cs_TempThresholdWarning;
    u8      cs_TempThresholdCritical;
    u8      cs_CtrlTempThresholdCritical;
    u8      cs_CtrlTempThresholdWarning;
    u8      cs_NumOfDrivesToSpin;
    u8      cs_TimeBetweenSpinUp;
    u8      cs_CoercionEnable;
    u8      cs_CoercionMethod;
    u8      cs_ElevatorSortingEnable;
    u8      cs_BuzzerEnable;
    u8      cs_LUNMasking;
    u8      cs_Reserved4[26];
    u8      cs_DebugLevel;
    u8      cs_Reserved5[130];
} micCtrlSettingsPage0_t;

typedef struct micCtrlSettingsPage3
{   
    u16     cs3_PageCode;
    u16     cs3_PageLength;
    
    u16     cs3_DeviceID;
    u8      cs3_Reserved[2];
    
    u32     cs3_Com1CurrentBaud;
    u8      cs3_Com1Enabled;
    u8      cs3_Com1Reserved[15];
    u32     cs3_Com2CurrentBaud;
    u8      cs3_Com2Enabled;
    u8      cs3_Com2Reserved[15];
    u32     cs3_Com3CurrentBaud;
    u8      cs3_Com3Enabled;
    u8      cs3_Com3Reserved[16];
    u8      cs3_WatchdogTimerEnabled;
    u16     cs3_WatchdogTimerCount;
    u8      cs3_Reserved1[16];
    u8      cs3_RTCInfo[16];
    u8      cs3_Reserved2[184];
} micCtrlSettingsPage3_t;

typedef struct micCtrlSettingsPage4
{   
    u16     cs4_PageCode;
    u16     cs4_PageLength;
    
    u16     cs4_DeviceID;
    u16     cs4_NumPorts;

    /* the length of cs4_PortSettings can be variable */
    micISCSIPortNetworkSettings_t   cs4_PortSettings[1];
} micCtrlSettingsPage4_t;

typedef struct micCtrlSettingsPage5
{   
    u16     cs5_PageCode;
    u16     cs5_PageLength;
    
    u16     cs5_DeviceID;
    u16     cs5_Reserved0;

    /* the length of cs5_PortSettings can be variable */
    micEthernetPortNetworkSettings_t    cs5_PortSettings[1];
} micCtrlSettingsPage5_t;

typedef struct micCtrlSettingsPage6
{
    u16     cs6_PageCode;    
    u16     cs6_PageLength; 
    u16     cs6_DeviceID;   
    u8      cs6_RebuildRate;
    u8      cs6_BkSyncRate;
    u8      cs6_MediaPatrolRate;
    u8      cs6_RedCheckRate;
    u8      cs6_LDInitRate;
    u8      cs6_MigrationRate;
    u8      cs6_AutoRebuildEnable;
    u8      cs6_MediaPatrolEnable;
    u8      cs6_SmartPollInterval;
	u8      cs6_SmartLogEnable;
    u8      cs6_EnclosurePollInterval;
    u8      cs6_BuzzerEnable;
    u8      cs6_RebuildPolicy;
	u8		cs6_DefaultTaskTimeoutValue;
	u8		cs6_SmartPollIntervalHigh;
	u8		cs6_Reserved[3];
 } micCtrlSettingsPage6_t;

/* PMIC_ARRAY_CREATE_CONFIGURATION  */
/* PMIC_ARRAY_DELETE_CONFIGURATION  */
/* PMIC_ARRAY_GET_CONFIGURATION     */
/* PMIC_LOGICAL_DRIVE_ADD          */
/* PMIC_LOGICAL_DRIVE_DELETE       */

#define MAX_LD_NAME_BYTES   32
#define MAX_ARRAY_NAME_BYTES     32 


typedef struct micArrayCreateConfigCmd
{
    u8          cac_ScsiOpCode;
    u8          cac_MicSignature;
    u16         cac_MicOpCode;
    u8          cac_ConfigLock;
    u8          cac_LoginKey;
    u32         cac_Reserved0;
    u16         cac_TransferLength;
    u16         cac_TransferOffset;
    u8          cac_Reserved1;
    Control_t   cac_Control;
} __attribute__ ((packed)) micArrayCreateConfigCmd_t;
//} micArrayCreateConfigCmd_t;

typedef struct micArrayGetConfigCmd
{
    u8          gac_ScsiOpCode;
    u8          gac_MicSignature;
    u16         gac_MicOpCode;
    u8          gac_UniqueCmdId;
    u8          gac_LoginKey;
    u16         gac_StartArrayID;
    u16         gac_Reserved0;
    u16         gac_TransferLength;
    u16         gac_TransferOffset;
    u8          gac_ArrayCount;
    Control_t   gac_Control;
} __attribute__ ((packed)) micArrayGetConfigCmd_t;
//} micArrayGetConfigCmd_t;

typedef struct micArrayDeleteConfigCmd
{
    u8          dac_ScsiOpCode;
    u8          dac_MicSignature;
    u16         dac_MicOpCode;
    u8          dac_ConfigLock;
    u8          dac_LoginKey;
    u16         dac_StartArrayID;
    u16         dac_Reserved0;
    u16         dac_TransferLength;
    u16         dac_Reserved1;
    u8          dac_ArrayCount;
    Control_t   dac_Control;
} __attribute__ ((packed)) micArrayDeleteConfigCmd_t;
//} micArrayDeleteConfigCmd_t;

/* Possible ASCQ values for Disk Array related Commands */
#define MICS_ARRAY_CREATE_ARRAY_FULL        MICS_GENERAL_ERROR_RESERVED_END + 1
#define MICS_ARRAY_CREATE_LD_FULL           MICS_GENERAL_ERROR_RESERVED_END + 2
#define MICS_ARRAY_CREATE_ASSOC_ARRAY_FULL  MICS_GENERAL_ERROR_RESERVED_END + 3
#define MICS_ARRAY_UPDATE_FAILED            MICS_GENERAL_ERROR_RESERVED_END + 4
#define MICS_ARRAY_ATTRIBUTES_INVALID       MICS_GENERAL_ERROR_RESERVED_END + 5
#define MICS_ARRAY_SPARE_ACTION_INVALID     MICS_GENERAL_ERROR_RESERVED_END + 6
#define MICS_ARRAY_ASSOC_ARRAY_ID_INVALID   MICS_GENERAL_ERROR_RESERVED_END + 7

#define MICS_NO_MISSING_DRIVES_FOUND        MICS_GENERAL_ERROR_RESERVED_END + 8

#define MICS_ARRAY_INCOMPLETE               MICS_GENERAL_ERROR_RESERVED_END + 9
#define MICS_INVALID_ARRAY_PD_COUNT         MICS_GENERAL_ERROR_RESERVED_END + 10
#define MICS_INVALID_ARRAY_FLAGS            MICS_GENERAL_ERROR_RESERVED_END + 11
#define MICS_INVALID_PD_SIZE                MICS_GENERAL_ERROR_RESERVED_END + 12
#define MICS_INVALID_LD_PD_COUNT            MICS_GENERAL_ERROR_RESERVED_END + 13
#define MICS_INVALID_LD_AXLE_COUNT          MICS_GENERAL_ERROR_RESERVED_END + 14
#define MICS_INVALID_LD_RAID_LEVEL          MICS_GENERAL_ERROR_RESERVED_END + 15
#define MICS_INVALID_LD_STRIPE_SIZE         MICS_GENERAL_ERROR_RESERVED_END + 16
#define MICS_INVALID_LD_FLAGS               MICS_GENERAL_ERROR_RESERVED_END + 17
#define MICS_INVALID_LD_ATTRIBS             MICS_GENERAL_ERROR_RESERVED_END + 18
#define MICS_INVALID_LD_AXLE_SPINDLE_COUNT  MICS_GENERAL_ERROR_RESERVED_END + 19
#define MICS_INVALID_LD_AXLE_NUM            MICS_GENERAL_ERROR_RESERVED_END + 20
#define MICS_INVALID_LD_PD_FLATID           MICS_GENERAL_ERROR_RESERVED_END + 21
#define MICS_INVALID_LD_PD_COMPSIZE         MICS_GENERAL_ERROR_RESERVED_END + 22
#define MICS_INVALID_LD_PD_STARTBLOCK       MICS_GENERAL_ERROR_RESERVED_END + 23







typedef struct micLogicalDriveAddCmd
{
    u8          ald_ScsiOpCode;              
    u8          ald_MicSignature;        
    u16         ald_MicOpCode;        
    u8          ald_ConfigLock;        
    u8          ald_LoginKey;        
    u16         ald_Reserved0;
    u16         ald_ArrayID;
    u16         ald_TransferLength;        
    u16         ald_TransferOffset;        
    u8          ald_LDCount; 
    Control_t   ald_Control; 
} __attribute__ ((packed)) micLogicalDriveAddCmd_t;
//} micLogicalDriveAddCmd_t;

typedef struct micLogicalDriveDeleteCmd
{
    u8          dld_ScsiOpCode;              
    u8          dld_MicSignature;        
    u16         dld_MicOpCode;        
    u8          dld_ConfigLock;        
    u8          dld_LoginKey;        
    u16         dld_StartLDID;
    u16         dld_ArrayID;
    u16         dld_TransferLength;        
    u16         dld_Reserved1;        
    u8          dld_LDCount; 
    Control_t   dld_Control; 
} __attribute__ ((packed)) micLogicalDriveDeleteCmd_t;
//} micLogicalDriveDeleteCmd_t;
                                   
typedef struct micArrayConfigurationDef
{
    IN OUT u8  acd_ArrayName[MAX_ARRAY_NAME_BYTES];
    IN OUT u16 acd_ArrayID;
    IN OUT u16 acd_NoOfLogicalDrives;
    IN OUT u16 acd_NoOfPhysicalDrives;
    IN OUT u16 acd_Reserved1;
    IN OUT u8  acd_ArrayAttributes;      /* Defines if MP is enabled etc */
           u8  acd_Reserved2[3];
    IN OUT u32 acd_ArrayFlags;           /* Defines the type of the Array, like
                                           Global spare, dedicated spare etc., */
    IN OUT u32 acd_NoOfArraysAssociated; /* For a Spare Array, lists the Array
                                           WWNs of the Data Array to which this
                                           spare drive is assigned to. For Data
                                           Array, lists the Spare Array WWNs
                                           which are assigned to the Data Array
                                         */
    IN OUT u32 acd_AssociatedArrayInformationBegin[1];

}micArrayConfigurationDef_t;


typedef struct micComponentDeviceDef 
{
    IN OUT u16 cdd_SequenceNo;
           u16 cdd_Reserved1;
    IN OUT u64 cdd_StartBlock;
    IN OUT u64 cdd_ComponentSizeinBlocks;
    IN OUT u16 cdd_DeviceFlatId;
           u16 cdd_Reserved2;
    IN OUT u32 cdd_PDUniqueID;
    IN OUT u32 cdd_PDFlags;
    u32 cdd_Reserved3[4];

}micComponentDeviceDef_t;

#define LD_MAX_AXLES                16

/* It must be noted that for a Hybrid RAID 50 and 51, the Max PDs per 
 * Axle would be only 16.
 * For all other RAID Levels, wherever applicable, the Max PDs per Axle would be
 * 256 
 */

typedef struct micLDAxleDefinition
{
    IN OUT u16 lad_AxleNum;
    IN OUT u16 lad_NumPDInAxle;
    IN OUT u32 lad_AxleFlags;
    IN OUT u32 lad_Reserved1[4];
    IN OUT micComponentDeviceDef_t lad_AxlePDDefinition[1];
    
}micLDAxleDefinition_t;

typedef struct micLogicalDriveDef
{ 
    IN OUT u16      ldd_ArrayID;
           u16      ldd_Reserved1;
    IN OUT u16      ldd_LDFlatID;
           u16      ldd_Reserved2;
    OUT    u32      ldd_LDUniqueID;
    IN OUT u8       ldd_RaidLevel;
           u8       ldd_Reserved4[3];
    IN OUT u8       ldd_LDName[MAX_LD_NAME_BYTES];
    IN OUT u32      ldd_StripeSizeInBlocks;
    IN OUT u64      ldd_LDSizeInBlocks;
    IN OUT u32      ldd_LDFlags;
    IN OUT u32      ldd_LDAttributes;
    IN OUT u16      ldd_LDNoOfAxles;
           u16      ldd_Reserved5;
    IN OUT u16      ldd_NoOfUsedPD;
           u16      ldd_Reserved6;
           u8       ldd_Wwn[8];
           u32      ldd_Reserved7[13];

    IN OUT micLDAxleDefinition_t LDAxleDefinition[1];
}micLogicalDriveDef_t;                                           


typedef struct micPhysicalDeviceDef
{

    u16 pdd_PDFlatId;
    u16 pdd_Reserved1;
    u32 pdd_Reserved2;
    u32 pdd_Reserved3;
           
    u32 pdd_PDUniqueID;
    u32 pdd_SequenceNo;
    u16 pdd_ArrayID;
    u16 pdd_Reserved4;
    u32 pdd_PDFlags;
    u64 pdd_PDSize;
    u64 pdd_PDConfigurableSize;

    u32 pdd_Reserved[8];

}micPhysicalDeviceDef_t;

/* 
 * Data structure for  PMIC_CREATE_ARRAY_CONFIGURATION  &
 * PMIC_DELETE_ARRAY_CONFIGURATION  will be as follows
 *
 *      -------------------    
 *      | micUPCD_t (1)   |
 *      -------------------
 *      | micUPD_t (1..n) |
 *      -------------------
 *      | micUVD_t (0..n) |
 *      -------------------
 */

/* PMIC_ARRAY_GET_INFORMATION */

typedef struct micArrayGetInfoCmd
{
    u8          agi_ScsiOpCode;
    u8          agi_MicSignature;
    u16         agi_MicOpCode;
    u8          agi_UniqueCmdId;
    u8          agi_LoginKey;
    u16         agi_ArrayId;
    u16         agi_Reserved;
    u16         agi_TransferLength;
    u16         agi_TransferOffset;
    u8          agi_ArrayCount;
    Control_t   agi_Control;
} __attribute__ ((packed)) micArrayGetInfoCmd_t;
//} micArrayGetInfoCmd_t;

typedef struct micArrayInfo
{
    u16     ai_ArrayId;
    u16     ai_Reserved1;
    u8      ai_ArrayName[32];
    u8      ai_WWN[8];
    u16     ai_NoOfPD;
    u16     ai_NoOfLD;
    u32     ai_Flags;
    u32     ai_Attribs;
    u16     ai_NoOfAssociatedArrays;

⌨️ 快捷键说明

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