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

📄 mic.h

📁 RAID卡的测试程序
💻 H
📖 第 1 页 / 共 5 页
字号:
    u16     ai_NoOfPassiveProcesses;
    u16     ai_NoOfLdi;
    u16     ai_NoOfBkSync;
    u16     ai_NoOfSyncCheck;
    u16     ai_NoOfRebuild;
    u16     ai_NoOfOCE;
    u16     ai_NoOfRLM;
    u16     ai_NoOfMP;
    u16     ai_Reserved2;
    u16     ai_Reserved3[8];
    u16     ai_NoOfOfflinePD;
    u16     ai_NoOfOfflineLD;
    u16     ai_NoOfCriticalLD;
    u64     ai_Reserved4; /* Used for Array Write/Read Counts. Support will be
    decided
                           after discussions */
    u64     ai_Reserved5; /* Write Count */
    u64     ai_Reserved6; /* Error Count */
    
    u32     ai_Reserved[16];
}micArrayInfo_t;

/* PMIC_ARRAY_GET_SETTINGS */
/* PMIC_ARRAY_SET_SETTINGS */

typedef struct micArrayGetSetSettingsCmd
{
    u8          pogss_ScsiOpCode;              
    u8          pogss_MicSignature;        
    u16         pogss_MicOpCode;        
    u8          pogss_UniqueCmdId;        
    u8          pogss_LoginKey;        
    u16         pogss_ArrayId;
    u16         pogss_Reserved;
    u16         pogss_TransferLength;        
    u16         pogss_TransferOffset;        
    u8          pogss_ArrayCount;
    Control_t   pogss_Control; 
} __attribute__ ((packed)) micArrayGetSetSettingsCmd_t;
//} micArrayGetSetSettingsCmd_t;

/* 
 * For PMIC_ARRAY_SET_SETTINGS pogsp_ConfigLock is used
 * instead of pogsp_LoginKey
 */
#define pogsp_ConfigLock  pogsp_LoginKey

typedef struct micArraySettings
{
    u16     as_ArrayId;
    u16     as_Reserved0;
    u32     as_Flags;
    u32     as_Attribs;
    u8      as_ArrayName[32];
    u16     as_SpareAction;

#define SPARE_ACTION_NONE               0x0
#define SPARE_ACTION_ASSOC_SPARE        0x1
#define SPARE_ACTION_DISASSOC_SPARE     0x2

    u16     as_NumberOfAssocArraysInList;
    u32     as_Reserved1[15];
    u16     as_AssocArrayList[2]; 

}micArraySettings_t;




typedef struct micProcessIncompleteArray
{
    u8          pia_ScsiOpCode;
    u8          pia_MicSignature;
    u16         pia_MicOpCode;
    u8          pia_UniqueCmdId;
    u8          pia_LoginKey;
    u16         pia_ArrayId;
    u8          pia_ActionType;

#define MIC_ACCEPT_INCOMPLETE_ARRAY                 0x01
#define MIC_PROCESS_MDD_FOR_INCOMPLETE_ARRAY        0x02
#define MIC_PROCESS_MDD_FOR_CTLR                    0x03

    u8          pia_Reserved1;
    u16         pia_TransferLength;
    u16         pia_TransferOffset;
    u8          pia_Reserved2;
    Control_t   pia_Control;
}__attribute__ ((packed)) micProcessIncompleteArrayCmd_t;


/* 
 * PMIC_PHYSICAL_DRIVE_GET_INFORMATION
 *   micPDInfoPage0 - Raid Specific
 *   micPDInfoPage1 - SATA Specific
 */

typedef struct micPDGetInfoCmd
{
    u8          pgi_ScsiOpCode;              
    u8          pgi_MicSignature;        
    u16         pgi_MicOpCode;        
    u8          pgi_UniqueCmdId;        
    u8          pgi_LoginKey;        
    u16         pgi_PDFlatId;        
    u8          pgi_CodePage;                        
    u8          pgi_Reserved;
    u16         pgi_TransferLength;        
    u16         pgi_TransferOffset;        
    u8          pgi_PDCount;        
    Control_t   pgi_Control; 
} __attribute__ ((packed)) micPDGetInfoCmd_t;
//} micPDGetInfoCmd_t;
//} micPDGetInfoCmd_t;

#define   MAX_MODEL_NO       22
#define   MAX_SERIAL_NO      24
#define   MAX_FIRMWARE_REV   10

typedef struct micHBAExtentInfo
{
	u16	ei_ExtentIndexInDisk;	/* the extent index on the disk, 0~MAX_BLOCK_PER_DISK-1 */
	u16	ei_Reserved1;	/* the extent index on the disk, 0~MAX_BLOCK_PER_DISK-1 */
	u32	ei_Flags;  
	u16	ei_ArrayID;  
	u16	ei_Reserved2[3];  
	u64 ei_StartLBA;
	u64 ei_Size;
} micHBAExtentInfo_t;

typedef struct micPDInfoPage0
{
    u16     pdi_PageCode;  
    u16     pdi_PageLength; 
    u16     pdi_FlatId;
    u16     pdi_ArrayId;
    u32     pdi_UniqueId;
    u8      pdi_Reserved0;
    u8      pdi_Controller;
    u16     pdi_Channel; 
    u16     pdi_Target;
    u16     pdi_Lun; 
    u16     pdi_EnclosureId;
    u16     pdi_SlotId;
    u16     pdi_SequenceNo;
    u16     pdi_MddSequenceNo;
    u8      pdi_Reserved5[4];
    u64     pdi_PhysicalSize; 
    u64     pdi_LastUnconfiguredFragement;
    u64     pdi_ConfigurableSize;
    u64     pdi_UsedSize;
    u64     pdi_StartBlock;
    u16     pdi_BlockSize;
    u16     pdi_Reserved1;
    u32     pdi_Cylinders;      /* not implented yet. currently values are zeros*/
    u16     pdi_Heads;          /* not implented yet. currently values are zeros*/
    u16     pdi_Sectors;        /* not implented yet. currently values are zeros*/
    u32     pdi_Flags;
    u8      pdi_Reserved2[14];
    u16     pdi_DriveType;          /* SATA, SCSI etc */
    u8      pdi_DriveModelNo[MAX_MODEL_NO];   
    u8      pdi_DriveSerialNo[MAX_SERIAL_NO]; 
    u8      pdi_DriveFirmwareVer[MAX_FIRMWARE_REV];
    u16     pdi_ProtocolMajorVer;  /* 0xffff does not report */
    u16     pdi_ProtocolMinorVer;  /* 0xffff does not report */
    u8      pdi_Reserved3[12];
    u64     pdi_ReadCount;
    u64     pdi_WriteCount; 
    u64     pdi_ErrorCount;
    u8      pdi_DriveAlias[32];
    u8      pdi_Reserved4[16];
}micPDInfoPage0_t; 

typedef struct micPDInfoPage1 
{
    u16     pdi1_PageCode;            
    u16     pdi1_PageLength;          
    u16     pdi1_FlatId;            
    u8      pdi1_MaxSecotsSupportedForRWMultiple;
    u8      pdi1_CurrentSectorsForRWMultiple;
    u8      pdi1_MultiwordDMaSupport;
    u8      pdi1_MultipleDmaMode; /* if this is 0, multi mode dma is not selected */
    u8      pdi1_PioModeSupport;
    u8      pdi1_NOPcommandSupport;
    u8      pdi1_NOPCmdEnable;
    u8      pdi1_ReadBufferSupport;
    u8      pdi1_ReadBufferCmdEnable;
    u8      pdi1_WriteBufferSupport;
    u8      pdi1_WriteBufferCmdEnable;
    u8      pdi1_HPASupport;
    u8      pdi1_HPAFeatureSetEnable;           /* host protected area*/
    u8      pdi1_DeviceResetSupport;
    u8      pdi1_DeviceResetCmdEnable;
    u8      pdi1_ServiceInterruptSupport;
    u8      pdi1_ServiceInterruptStateEnabled;
    u8      pdi1_ReleaseInterruptSupport;
    u8      pdi1_ReleaseInterruptEnabled;
    u8      pdi1_RLASupport;
    u8      pdi1_RLASupportEnable;              /* read look ahead*/
    u8      pdi1_WriteCacheSupport;
    u8      pdi1_WriteCachedEnable;
    u8      pdi1_MandatoryPMSupport;
    u8      pdi1_PMFeatureSetEnabled;
    u8      pdi1_RMFeatureSetSupport;
    u8      pdi1_RMFeatureSetEnable;            /* removable media*/
    u8      pdi1_SecurityModeSupport;
    u8      pdi1_SecurityModeFeatureSetEnable;
    u8      pdi1_SMARTFeatureSetSupport;
    u8      pdi1_SMARTFeatureSetEnable;
    u8      pdi1_SMARTSelfTestSupport;
    u8      pdi1_SMARTErrorLoggingSupport;
    u8      pdi1_AAFeatureSetSupport;
    u8      pdi1_AAFeatureSetEnable;            /* automatic acoustic*/
    u8      pdi1_SMSecurityExtCmdSupport;
    u8      pdi1_SMSecurityExtCmdSetEnable;     /* set max */
    u8      pdi1_PUISByFeatureSetSupport;
    u8      pdi1_PUISByFeatureSetEnable;        /* power up in stand by */
    u8      pdi1_RMSNFeatureSetSupport;
    u8      pdi1_RMNFeatureSetEnable;           /* removable media notification */
    u8      pdi1_APMFeatureSetSupport;
    u8      pdi1_APMFeatureSetEnable;           /* advanced power management */
    u8      pdi1_CFAFeatureSetSupport;
    u8      pdi1_CFAFeatureSetEnable;
    u8      pdi1_MCPTCmdSupport;
    u8      pdi1_MCPTCmdSetEnable;              /* media card pass through */
    u8      pdi1_UltraDmaModeSupport;
    u8      pdi1_UltraDmaMode;                  /* if this is 0, ultra dma mode is not selcted */            
    u8      pdi1_RWDmaQueuedCmdSupport;
    u8      pdi1_QueueDepth;

    u8      pdi1_FlushCacheExtSupport;
    u8      pdi1_MandatoryFlashCacheSupport;
    u8      pdi1_DCOFeatureSetSupport;          /* device configuration overlay*/
    u8      pdi1_Bit48FeatureSetSupport;
    u8      pdi1_SFNeededToSpinUpafterPOS;      /* set features command*/
    u8      pdi1_DownLoadMicrocodeCmdSupport;
    u8      pdi1_GPLoggingFeatureSetSupport;    /* general purpose*/
    u8      pdi1_StreamingFeatureSetSupport;
    u8      pdi1_MSNValid;                    /* media serial number*/
    u8      pdi1_Reserved;
    u8      pdi1_Reserved1[59]; /* to align on 128 bytes boundary */
}micPDInfoPage1_t;

typedef struct micPDInfoPage2
{
    u16     pdi2_PageCode;  
    u16     pdi2_PageLength; 
    u16     pdi2_FlatId;
    u16     pdi2_ArrayId;
    u8      pdi2_Controller;
    u8      pdi2_SecurityModeSupport;
    u16     pdi2_Channel; 
    u16     pdi2_Target;
    u16     pdi2_EnclosureId;
    u16     pdi2_SlotId;
    u16     pdi2_SequenceNo;
    u8      pdi2_WriteCacheSupport;
    u8      pdi2_WriteCachedEnable;
    u8      pdi2_SMARTFeatureSetSupport;						
    u8      pdi2_SMARTFeatureSetEnable;
    u64     pdi2_PhysicalSize; 
    u64     pdi2_UsedSize;
    u64     pdi2_StartBlock;
    u16     pdi2_BlockSize;
    u16     pdi2_DriveType; /* SATA, SCSI etc */
    u32     pdi2_Cylinders;      
    u16     pdi2_Heads;          
    u16     pdi2_Sectors;        
    u32     pdi2_Flags;
    u8      pdi2_DriveModelNo[MAX_MODEL_NO];   
    u8      pdi2_DriveSerialNo[MAX_SERIAL_NO]; 
    u8      pdi2_DriveFirmwareVer[MAX_FIRMWARE_REV];
    u64     pdi2_ReadCount;
    u64     pdi2_WriteCount; 
    u64     pdi2_ErrorCount;
    u8      pdi2_MultiwordDMaSupport; 
    u8      pdi2_MultipleDmaMode; /* if this is 0, multi mode dma is not selected */ 
    u8      pdi2_PioModeSupport; 
    u8      pdi2_UltraDmaModeSupport; 
    u8      pdi2_UltraDmaMode;                  /* if this is 0, ultra dma mode is not selcted */ 
    u8      pdi2_3GSupport;                   /* check if 3G feature is supported */ 
	u8		pdi2_3GEnable;
	u8		pdi2_ExtentCount;
	micHBAExtentInfo_t pdi2_ExtentInfo[16];

} micPDInfoPage2_t; 

typedef struct micGetMissingPDInfoCmd
{
    u8          gmpi_ScsiOpCode;
    u8          gmpi_MicSignature;
    u16         gmpi_MicOpCode;
    u8          gmpi_UniqueCmdId;
    u8          gmpi_LoginKey;
    u32         gmpi_Reserved1;
    u16         gmpi_TransferLength;
    u16         gmpi_TransferOffset;
    u8          gmpi_Count;
    Control_t   gmpi_Control;

} __attribute__ ((packed)) micGetMissingPDInfoCmd_t;


typedef struct micMissingPDInfo
{
    u16 mpi_NoOFMissingDrivesDetected;
    u16 mpi_NoOfMissingDrivesReturned;
    u32 mpi_Reserved1;

    micPDInfoPage0_t PDInfo[1];

}micMissingPDInfo_t;


/*
 * PMIC_PHYSICAL_DRIVE_GET_SETTINGS
 * PMIC_PHYSICAL_DRIVE_SET_SETTINGS
 *   micPDSETTINGPage0 - Raid Specific
 *   micPDSETTINGPage1 - SATA Specific
 */

typedef struct micPDGetSetSettingsCmd
{
    u8          pgss_ScsiOpCode;              
    u8          pgss_MicSignature;        
    u16         pgss_MicOpCode;        
    u8          pgss_UniqueCmdId;        
    u8          pgss_LoginKey;        
    u16         pgss_FlatId;        
    u8          pgss_PageCode;
    u8          pgss_Reserved;
    u16         pgss_TransferLength;        
    u16         pgss_TransferOffset;        
    u8          pgss_PDCount;        
    Control_t   pgss_Control; 
} __attribute__ ((packed)) micPDGetSetSettingsCmd_t;
//} micPDGetSetSettingsCmd_t;

/* 
 * For PMIC_PHYSICAL_DRIVE_SET_SETTINGS pgsp_ConfigLock is used
 * instead of pgsp_LoginKey
 */
#define pgss_ConfigLock  pgss_LoginKey

typedef struct micPDSettingsPage0Internal
{
    u16     pdsp_FlatId;
    u16     pdsp_Reserved;
    u32     pdsp_Blocksize;
    u32     pdsp_Flags;
    u8      pdsp_PDAlias[32];
    u8      pdsp_Reserved1[18];

}micPDSetPage0Internal_t;

typedef struct micPDSettingsPage0 
{
    u16     pds_PageCode;   
    u16     pds_PageLength; 
    
    micPDSetPage0Internal_t pds_PDSettings[1];
    
}micPDSettingsPage0_t; 

typedef struct micPDSettingsPage1Internal
{
    u16     pds1_FlatId;       // this will be 0xFFFF

⌨️ 快捷键说明

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