Path: blob/master/drivers/message/fusion/lsi/mpi_raid.h
15111 views
/*1* Copyright (c) 2001-2008 LSI Corporation.2*3*4* Name: mpi_raid.h5* Title: MPI RAID message and structures6* Creation Date: February 27, 20017*8* mpi_raid.h Version: 01.05.059*10* Version History11* ---------------12*13* Date Version Description14* -------- -------- ------------------------------------------------------15* 02-27-01 01.01.01 Original release for this file.16* 03-27-01 01.01.02 Added structure offset comments.17* 08-08-01 01.02.01 Original release for v1.2 work.18* 09-28-01 01.02.02 Major rework for MPI v1.2 Integrated RAID changes.19* 10-04-01 01.02.03 Added ActionData defines for20* MPI_RAID_ACTION_DELETE_VOLUME action.21* 11-01-01 01.02.04 Added define for MPI_RAID_ACTION_ADATA_DO_NOT_SYNC.22* 03-14-02 01.02.05 Added define for MPI_RAID_ACTION_ADATA_LOW_LEVEL_INIT.23* 05-07-02 01.02.06 Added define for MPI_RAID_ACTION_ACTIVATE_VOLUME,24* MPI_RAID_ACTION_INACTIVATE_VOLUME, and25* MPI_RAID_ACTION_ADATA_INACTIVATE_ALL.26* 07-12-02 01.02.07 Added structures for Mailbox request and reply.27* 11-15-02 01.02.08 Added missing MsgContext field to MSG_MAILBOX_REQUEST.28* 04-01-03 01.02.09 New action data option flag for29* MPI_RAID_ACTION_DELETE_VOLUME.30* 05-11-04 01.03.01 Original release for MPI v1.3.31* 08-19-04 01.05.01 Original release for MPI v1.5.32* 01-15-05 01.05.02 Added defines for the two new RAID Actions for33* _SET_RESYNC_RATE and _SET_DATA_SCRUB_RATE.34* 02-28-07 01.05.03 Added new RAID Action, Device FW Update Mode, and35* associated defines.36* 08-07-07 01.05.04 Added Disable Full Rebuild bit to the ActionDataWord37* for the RAID Action MPI_RAID_ACTION_DISABLE_VOLUME.38* 01-15-08 01.05.05 Added define for MPI_RAID_ACTION_SET_VOLUME_NAME.39* --------------------------------------------------------------------------40*/4142#ifndef MPI_RAID_H43#define MPI_RAID_H444546/******************************************************************************47*48* R A I D M e s s a g e s49*50*******************************************************************************/515253/****************************************************************************/54/* RAID Action Request */55/****************************************************************************/5657typedef struct _MSG_RAID_ACTION58{59U8 Action; /* 00h */60U8 Reserved1; /* 01h */61U8 ChainOffset; /* 02h */62U8 Function; /* 03h */63U8 VolumeID; /* 04h */64U8 VolumeBus; /* 05h */65U8 PhysDiskNum; /* 06h */66U8 MsgFlags; /* 07h */67U32 MsgContext; /* 08h */68U32 Reserved2; /* 0Ch */69U32 ActionDataWord; /* 10h */70SGE_SIMPLE_UNION ActionDataSGE; /* 14h */71} MSG_RAID_ACTION_REQUEST, MPI_POINTER PTR_MSG_RAID_ACTION_REQUEST,72MpiRaidActionRequest_t , MPI_POINTER pMpiRaidActionRequest_t;737475/* RAID Action request Action values */7677#define MPI_RAID_ACTION_STATUS (0x00)78#define MPI_RAID_ACTION_INDICATOR_STRUCT (0x01)79#define MPI_RAID_ACTION_CREATE_VOLUME (0x02)80#define MPI_RAID_ACTION_DELETE_VOLUME (0x03)81#define MPI_RAID_ACTION_DISABLE_VOLUME (0x04)82#define MPI_RAID_ACTION_ENABLE_VOLUME (0x05)83#define MPI_RAID_ACTION_QUIESCE_PHYS_IO (0x06)84#define MPI_RAID_ACTION_ENABLE_PHYS_IO (0x07)85#define MPI_RAID_ACTION_CHANGE_VOLUME_SETTINGS (0x08)86#define MPI_RAID_ACTION_PHYSDISK_OFFLINE (0x0A)87#define MPI_RAID_ACTION_PHYSDISK_ONLINE (0x0B)88#define MPI_RAID_ACTION_CHANGE_PHYSDISK_SETTINGS (0x0C)89#define MPI_RAID_ACTION_CREATE_PHYSDISK (0x0D)90#define MPI_RAID_ACTION_DELETE_PHYSDISK (0x0E)91#define MPI_RAID_ACTION_FAIL_PHYSDISK (0x0F)92#define MPI_RAID_ACTION_REPLACE_PHYSDISK (0x10)93#define MPI_RAID_ACTION_ACTIVATE_VOLUME (0x11)94#define MPI_RAID_ACTION_INACTIVATE_VOLUME (0x12)95#define MPI_RAID_ACTION_SET_RESYNC_RATE (0x13)96#define MPI_RAID_ACTION_SET_DATA_SCRUB_RATE (0x14)97#define MPI_RAID_ACTION_DEVICE_FW_UPDATE_MODE (0x15)98#define MPI_RAID_ACTION_SET_VOLUME_NAME (0x16)99100/* ActionDataWord defines for use with MPI_RAID_ACTION_CREATE_VOLUME action */101#define MPI_RAID_ACTION_ADATA_DO_NOT_SYNC (0x00000001)102#define MPI_RAID_ACTION_ADATA_LOW_LEVEL_INIT (0x00000002)103104/* ActionDataWord defines for use with MPI_RAID_ACTION_DELETE_VOLUME action */105#define MPI_RAID_ACTION_ADATA_KEEP_PHYS_DISKS (0x00000000)106#define MPI_RAID_ACTION_ADATA_DEL_PHYS_DISKS (0x00000001)107108#define MPI_RAID_ACTION_ADATA_KEEP_LBA0 (0x00000000)109#define MPI_RAID_ACTION_ADATA_ZERO_LBA0 (0x00000002)110111/* ActionDataWord defines for use with MPI_RAID_ACTION_DISABLE_VOLUME action */112#define MPI_RAID_ACTION_ADATA_DISABLE_FULL_REBUILD (0x00000001)113114/* ActionDataWord defines for use with MPI_RAID_ACTION_ACTIVATE_VOLUME action */115#define MPI_RAID_ACTION_ADATA_INACTIVATE_ALL (0x00000001)116117/* ActionDataWord defines for use with MPI_RAID_ACTION_SET_RESYNC_RATE action */118#define MPI_RAID_ACTION_ADATA_RESYNC_RATE_MASK (0x000000FF)119120/* ActionDataWord defines for use with MPI_RAID_ACTION_SET_DATA_SCRUB_RATE action */121#define MPI_RAID_ACTION_ADATA_DATA_SCRUB_RATE_MASK (0x000000FF)122123/* ActionDataWord defines for use with MPI_RAID_ACTION_DEVICE_FW_UPDATE_MODE action */124#define MPI_RAID_ACTION_ADATA_ENABLE_FW_UPDATE (0x00000001)125#define MPI_RAID_ACTION_ADATA_MASK_FW_UPDATE_TIMEOUT (0x0000FF00)126#define MPI_RAID_ACTION_ADATA_SHIFT_FW_UPDATE_TIMEOUT (8)127128129/* RAID Action reply message */130131typedef struct _MSG_RAID_ACTION_REPLY132{133U8 Action; /* 00h */134U8 Reserved; /* 01h */135U8 MsgLength; /* 02h */136U8 Function; /* 03h */137U8 VolumeID; /* 04h */138U8 VolumeBus; /* 05h */139U8 PhysDiskNum; /* 06h */140U8 MsgFlags; /* 07h */141U32 MsgContext; /* 08h */142U16 ActionStatus; /* 0Ch */143U16 IOCStatus; /* 0Eh */144U32 IOCLogInfo; /* 10h */145U32 VolumeStatus; /* 14h */146U32 ActionData; /* 18h */147} MSG_RAID_ACTION_REPLY, MPI_POINTER PTR_MSG_RAID_ACTION_REPLY,148MpiRaidActionReply_t, MPI_POINTER pMpiRaidActionReply_t;149150151/* RAID Volume reply ActionStatus values */152153#define MPI_RAID_ACTION_ASTATUS_SUCCESS (0x0000)154#define MPI_RAID_ACTION_ASTATUS_INVALID_ACTION (0x0001)155#define MPI_RAID_ACTION_ASTATUS_FAILURE (0x0002)156#define MPI_RAID_ACTION_ASTATUS_IN_PROGRESS (0x0003)157158159/* RAID Volume reply RAID Volume Indicator structure */160161typedef struct _MPI_RAID_VOL_INDICATOR162{163U64 TotalBlocks; /* 00h */164U64 BlocksRemaining; /* 08h */165} MPI_RAID_VOL_INDICATOR, MPI_POINTER PTR_MPI_RAID_VOL_INDICATOR,166MpiRaidVolIndicator_t, MPI_POINTER pMpiRaidVolIndicator_t;167168169/****************************************************************************/170/* SCSI IO RAID Passthrough Request */171/****************************************************************************/172173typedef struct _MSG_SCSI_IO_RAID_PT_REQUEST174{175U8 PhysDiskNum; /* 00h */176U8 Reserved1; /* 01h */177U8 ChainOffset; /* 02h */178U8 Function; /* 03h */179U8 CDBLength; /* 04h */180U8 SenseBufferLength; /* 05h */181U8 Reserved2; /* 06h */182U8 MsgFlags; /* 07h */183U32 MsgContext; /* 08h */184U8 LUN[8]; /* 0Ch */185U32 Control; /* 14h */186U8 CDB[16]; /* 18h */187U32 DataLength; /* 28h */188U32 SenseBufferLowAddr; /* 2Ch */189SGE_IO_UNION SGL; /* 30h */190} MSG_SCSI_IO_RAID_PT_REQUEST, MPI_POINTER PTR_MSG_SCSI_IO_RAID_PT_REQUEST,191SCSIIORaidPassthroughRequest_t, MPI_POINTER pSCSIIORaidPassthroughRequest_t;192193194/* SCSI IO RAID Passthrough reply structure */195196typedef struct _MSG_SCSI_IO_RAID_PT_REPLY197{198U8 PhysDiskNum; /* 00h */199U8 Reserved1; /* 01h */200U8 MsgLength; /* 02h */201U8 Function; /* 03h */202U8 CDBLength; /* 04h */203U8 SenseBufferLength; /* 05h */204U8 Reserved2; /* 06h */205U8 MsgFlags; /* 07h */206U32 MsgContext; /* 08h */207U8 SCSIStatus; /* 0Ch */208U8 SCSIState; /* 0Dh */209U16 IOCStatus; /* 0Eh */210U32 IOCLogInfo; /* 10h */211U32 TransferCount; /* 14h */212U32 SenseCount; /* 18h */213U32 ResponseInfo; /* 1Ch */214} MSG_SCSI_IO_RAID_PT_REPLY, MPI_POINTER PTR_MSG_SCSI_IO_RAID_PT_REPLY,215SCSIIORaidPassthroughReply_t, MPI_POINTER pSCSIIORaidPassthroughReply_t;216217218/****************************************************************************/219/* Mailbox reqeust structure */220/****************************************************************************/221222typedef struct _MSG_MAILBOX_REQUEST223{224U16 Reserved1;225U8 ChainOffset;226U8 Function;227U16 Reserved2;228U8 Reserved3;229U8 MsgFlags;230U32 MsgContext;231U8 Command[10];232U16 Reserved4;233SGE_IO_UNION SGL;234} MSG_MAILBOX_REQUEST, MPI_POINTER PTR_MSG_MAILBOX_REQUEST,235MailboxRequest_t, MPI_POINTER pMailboxRequest_t;236237238/* Mailbox reply structure */239typedef struct _MSG_MAILBOX_REPLY240{241U16 Reserved1; /* 00h */242U8 MsgLength; /* 02h */243U8 Function; /* 03h */244U16 Reserved2; /* 04h */245U8 Reserved3; /* 06h */246U8 MsgFlags; /* 07h */247U32 MsgContext; /* 08h */248U16 MailboxStatus; /* 0Ch */249U16 IOCStatus; /* 0Eh */250U32 IOCLogInfo; /* 10h */251U32 Reserved4; /* 14h */252} MSG_MAILBOX_REPLY, MPI_POINTER PTR_MSG_MAILBOX_REPLY,253MailboxReply_t, MPI_POINTER pMailboxReply_t;254255#endif256257258259260261