Path: blob/master/drivers/message/fusion/lsi/mpi_tool.h
15111 views
/*1* Copyright (c) 2001-2008 LSI Corporation.2*3*4* Name: mpi_tool.h5* Title: MPI Toolbox structures and definitions6* Creation Date: July 30, 20017*8* mpi_tool.h Version: 01.05.039*10* Version History11* ---------------12*13* Date Version Description14* -------- -------- ------------------------------------------------------15* 08-08-01 01.02.01 Original release.16* 08-29-01 01.02.02 Added DIAG_DATA_UPLOAD_HEADER and related defines.17* 01-16-04 01.02.03 Added defines and structures for new tools18*. MPI_TOOLBOX_ISTWI_READ_WRITE_TOOL and19* MPI_TOOLBOX_FC_MANAGEMENT_TOOL.20* 04-29-04 01.02.04 Added message structures for Diagnostic Buffer Post and21* Diagnostic Release requests and replies.22* 05-11-04 01.03.01 Original release for MPI v1.3.23* 08-19-04 01.05.01 Original release for MPI v1.5.24* 10-06-04 01.05.02 Added define for MPI_DIAG_BUF_TYPE_COUNT.25* 02-09-05 01.05.03 Added frame size option to FC management tool.26* Added Beacon tool to the Toolbox.27* --------------------------------------------------------------------------28*/2930#ifndef MPI_TOOL_H31#define MPI_TOOL_H3233#define MPI_TOOLBOX_CLEAN_TOOL (0x00)34#define MPI_TOOLBOX_MEMORY_MOVE_TOOL (0x01)35#define MPI_TOOLBOX_DIAG_DATA_UPLOAD_TOOL (0x02)36#define MPI_TOOLBOX_ISTWI_READ_WRITE_TOOL (0x03)37#define MPI_TOOLBOX_FC_MANAGEMENT_TOOL (0x04)38#define MPI_TOOLBOX_BEACON_TOOL (0x05)394041/****************************************************************************/42/* Toolbox reply */43/****************************************************************************/4445typedef struct _MSG_TOOLBOX_REPLY46{47U8 Tool; /* 00h */48U8 Reserved; /* 01h */49U8 MsgLength; /* 02h */50U8 Function; /* 03h */51U16 Reserved1; /* 04h */52U8 Reserved2; /* 06h */53U8 MsgFlags; /* 07h */54U32 MsgContext; /* 08h */55U16 Reserved3; /* 0Ch */56U16 IOCStatus; /* 0Eh */57U32 IOCLogInfo; /* 10h */58} MSG_TOOLBOX_REPLY, MPI_POINTER PTR_MSG_TOOLBOX_REPLY,59ToolboxReply_t, MPI_POINTER pToolboxReply_t;606162/****************************************************************************/63/* Toolbox Clean Tool request */64/****************************************************************************/6566typedef struct _MSG_TOOLBOX_CLEAN_REQUEST67{68U8 Tool; /* 00h */69U8 Reserved; /* 01h */70U8 ChainOffset; /* 02h */71U8 Function; /* 03h */72U16 Reserved1; /* 04h */73U8 Reserved2; /* 06h */74U8 MsgFlags; /* 07h */75U32 MsgContext; /* 08h */76U32 Flags; /* 0Ch */77} MSG_TOOLBOX_CLEAN_REQUEST, MPI_POINTER PTR_MSG_TOOLBOX_CLEAN_REQUEST,78ToolboxCleanRequest_t, MPI_POINTER pToolboxCleanRequest_t;7980#define MPI_TOOLBOX_CLEAN_NVSRAM (0x00000001)81#define MPI_TOOLBOX_CLEAN_SEEPROM (0x00000002)82#define MPI_TOOLBOX_CLEAN_FLASH (0x00000004)83#define MPI_TOOLBOX_CLEAN_BOOTLOADER (0x04000000)84#define MPI_TOOLBOX_CLEAN_FW_BACKUP (0x08000000)85#define MPI_TOOLBOX_CLEAN_FW_CURRENT (0x10000000)86#define MPI_TOOLBOX_CLEAN_OTHER_PERSIST_PAGES (0x20000000)87#define MPI_TOOLBOX_CLEAN_PERSIST_MANUFACT_PAGES (0x40000000)88#define MPI_TOOLBOX_CLEAN_BOOT_SERVICES (0x80000000)899091/****************************************************************************/92/* Toolbox Memory Move request */93/****************************************************************************/9495typedef struct _MSG_TOOLBOX_MEM_MOVE_REQUEST96{97U8 Tool; /* 00h */98U8 Reserved; /* 01h */99U8 ChainOffset; /* 02h */100U8 Function; /* 03h */101U16 Reserved1; /* 04h */102U8 Reserved2; /* 06h */103U8 MsgFlags; /* 07h */104U32 MsgContext; /* 08h */105SGE_SIMPLE_UNION SGL; /* 0Ch */106} MSG_TOOLBOX_MEM_MOVE_REQUEST, MPI_POINTER PTR_MSG_TOOLBOX_MEM_MOVE_REQUEST,107ToolboxMemMoveRequest_t, MPI_POINTER pToolboxMemMoveRequest_t;108109110/****************************************************************************/111/* Toolbox Diagnostic Data Upload request */112/****************************************************************************/113114typedef struct _MSG_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST115{116U8 Tool; /* 00h */117U8 Reserved; /* 01h */118U8 ChainOffset; /* 02h */119U8 Function; /* 03h */120U16 Reserved1; /* 04h */121U8 Reserved2; /* 06h */122U8 MsgFlags; /* 07h */123U32 MsgContext; /* 08h */124U32 Flags; /* 0Ch */125U32 Reserved3; /* 10h */126SGE_SIMPLE_UNION SGL; /* 14h */127} MSG_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST, MPI_POINTER PTR_MSG_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST,128ToolboxDiagDataUploadRequest_t, MPI_POINTER pToolboxDiagDataUploadRequest_t;129130typedef struct _DIAG_DATA_UPLOAD_HEADER131{132U32 DiagDataLength; /* 00h */133U8 FormatCode; /* 04h */134U8 Reserved; /* 05h */135U16 Reserved1; /* 06h */136} DIAG_DATA_UPLOAD_HEADER, MPI_POINTER PTR_DIAG_DATA_UPLOAD_HEADER,137DiagDataUploadHeader_t, MPI_POINTER pDiagDataUploadHeader_t;138139#define MPI_TB_DIAG_FORMAT_SCSI_PRINTF_1 (0x01)140#define MPI_TB_DIAG_FORMAT_SCSI_2 (0x02)141#define MPI_TB_DIAG_FORMAT_SCSI_3 (0x03)142#define MPI_TB_DIAG_FORMAT_FC_TRACE_1 (0x04)143144145/****************************************************************************/146/* Toolbox ISTWI Read Write request */147/****************************************************************************/148149typedef struct _MSG_TOOLBOX_ISTWI_READ_WRITE_REQUEST150{151U8 Tool; /* 00h */152U8 Reserved; /* 01h */153U8 ChainOffset; /* 02h */154U8 Function; /* 03h */155U16 Reserved1; /* 04h */156U8 Reserved2; /* 06h */157U8 MsgFlags; /* 07h */158U32 MsgContext; /* 08h */159U8 Flags; /* 0Ch */160U8 BusNum; /* 0Dh */161U16 Reserved3; /* 0Eh */162U8 NumAddressBytes; /* 10h */163U8 Reserved4; /* 11h */164U16 DataLength; /* 12h */165U8 DeviceAddr; /* 14h */166U8 Addr1; /* 15h */167U8 Addr2; /* 16h */168U8 Addr3; /* 17h */169U32 Reserved5; /* 18h */170SGE_SIMPLE_UNION SGL; /* 1Ch */171} MSG_TOOLBOX_ISTWI_READ_WRITE_REQUEST, MPI_POINTER PTR_MSG_TOOLBOX_ISTWI_READ_WRITE_REQUEST,172ToolboxIstwiReadWriteRequest_t, MPI_POINTER pToolboxIstwiReadWriteRequest_t;173174#define MPI_TB_ISTWI_FLAGS_WRITE (0x00)175#define MPI_TB_ISTWI_FLAGS_READ (0x01)176177178/****************************************************************************/179/* Toolbox FC Management request */180/****************************************************************************/181182/* ActionInfo for Bus and TargetId */183typedef struct _MPI_TB_FC_MANAGE_BUS_TID_AI184{185U16 Reserved; /* 00h */186U8 Bus; /* 02h */187U8 TargetId; /* 03h */188} MPI_TB_FC_MANAGE_BUS_TID_AI, MPI_POINTER PTR_MPI_TB_FC_MANAGE_BUS_TID_AI,189MpiTbFcManageBusTidAi_t, MPI_POINTER pMpiTbFcManageBusTidAi_t;190191/* ActionInfo for port identifier */192typedef struct _MPI_TB_FC_MANAGE_PID_AI193{194U32 PortIdentifier; /* 00h */195} MPI_TB_FC_MANAGE_PID_AI, MPI_POINTER PTR_MPI_TB_FC_MANAGE_PID_AI,196MpiTbFcManagePidAi_t, MPI_POINTER pMpiTbFcManagePidAi_t;197198/* ActionInfo for set max frame size */199typedef struct _MPI_TB_FC_MANAGE_FRAME_SIZE_AI200{201U16 FrameSize; /* 00h */202U8 PortNum; /* 02h */203U8 Reserved1; /* 03h */204} MPI_TB_FC_MANAGE_FRAME_SIZE_AI, MPI_POINTER PTR_MPI_TB_FC_MANAGE_FRAME_SIZE_AI,205MpiTbFcManageFrameSizeAi_t, MPI_POINTER pMpiTbFcManageFrameSizeAi_t;206207/* union of ActionInfo */208typedef union _MPI_TB_FC_MANAGE_AI_UNION209{210MPI_TB_FC_MANAGE_BUS_TID_AI BusTid;211MPI_TB_FC_MANAGE_PID_AI Port;212MPI_TB_FC_MANAGE_FRAME_SIZE_AI FrameSize;213} MPI_TB_FC_MANAGE_AI_UNION, MPI_POINTER PTR_MPI_TB_FC_MANAGE_AI_UNION,214MpiTbFcManageAiUnion_t, MPI_POINTER pMpiTbFcManageAiUnion_t;215216typedef struct _MSG_TOOLBOX_FC_MANAGE_REQUEST217{218U8 Tool; /* 00h */219U8 Reserved; /* 01h */220U8 ChainOffset; /* 02h */221U8 Function; /* 03h */222U16 Reserved1; /* 04h */223U8 Reserved2; /* 06h */224U8 MsgFlags; /* 07h */225U32 MsgContext; /* 08h */226U8 Action; /* 0Ch */227U8 Reserved3; /* 0Dh */228U16 Reserved4; /* 0Eh */229MPI_TB_FC_MANAGE_AI_UNION ActionInfo; /* 10h */230} MSG_TOOLBOX_FC_MANAGE_REQUEST, MPI_POINTER PTR_MSG_TOOLBOX_FC_MANAGE_REQUEST,231ToolboxFcManageRequest_t, MPI_POINTER pToolboxFcManageRequest_t;232233/* defines for the Action field */234#define MPI_TB_FC_MANAGE_ACTION_DISC_ALL (0x00)235#define MPI_TB_FC_MANAGE_ACTION_DISC_PID (0x01)236#define MPI_TB_FC_MANAGE_ACTION_DISC_BUS_TID (0x02)237#define MPI_TB_FC_MANAGE_ACTION_SET_MAX_FRAME_SIZE (0x03)238239240/****************************************************************************/241/* Toolbox Beacon Tool request */242/****************************************************************************/243244typedef struct _MSG_TOOLBOX_BEACON_REQUEST245{246U8 Tool; /* 00h */247U8 Reserved; /* 01h */248U8 ChainOffset; /* 02h */249U8 Function; /* 03h */250U16 Reserved1; /* 04h */251U8 Reserved2; /* 06h */252U8 MsgFlags; /* 07h */253U32 MsgContext; /* 08h */254U8 ConnectNum; /* 0Ch */255U8 PortNum; /* 0Dh */256U8 Reserved3; /* 0Eh */257U8 Flags; /* 0Fh */258} MSG_TOOLBOX_BEACON_REQUEST, MPI_POINTER PTR_MSG_TOOLBOX_BEACON_REQUEST,259ToolboxBeaconRequest_t, MPI_POINTER pToolboxBeaconRequest_t;260261#define MPI_TOOLBOX_FLAGS_BEACON_MODE_OFF (0x00)262#define MPI_TOOLBOX_FLAGS_BEACON_MODE_ON (0x01)263264265/****************************************************************************/266/* Diagnostic Buffer Post request */267/****************************************************************************/268269typedef struct _MSG_DIAG_BUFFER_POST_REQUEST270{271U8 TraceLevel; /* 00h */272U8 BufferType; /* 01h */273U8 ChainOffset; /* 02h */274U8 Function; /* 03h */275U16 Reserved1; /* 04h */276U8 Reserved2; /* 06h */277U8 MsgFlags; /* 07h */278U32 MsgContext; /* 08h */279U32 ExtendedType; /* 0Ch */280U32 BufferLength; /* 10h */281U32 ProductSpecific[4]; /* 14h */282U32 Reserved3; /* 24h */283U64 BufferAddress; /* 28h */284} MSG_DIAG_BUFFER_POST_REQUEST, MPI_POINTER PTR_MSG_DIAG_BUFFER_POST_REQUEST,285DiagBufferPostRequest_t, MPI_POINTER pDiagBufferPostRequest_t;286287#define MPI_DIAG_BUF_TYPE_TRACE (0x00)288#define MPI_DIAG_BUF_TYPE_SNAPSHOT (0x01)289#define MPI_DIAG_BUF_TYPE_EXTENDED (0x02)290/* count of the number of buffer types */291#define MPI_DIAG_BUF_TYPE_COUNT (0x03)292293#define MPI_DIAG_EXTENDED_QTAG (0x00000001)294295296/* Diagnostic Buffer Post reply */297typedef struct _MSG_DIAG_BUFFER_POST_REPLY298{299U8 Reserved1; /* 00h */300U8 BufferType; /* 01h */301U8 MsgLength; /* 02h */302U8 Function; /* 03h */303U16 Reserved2; /* 04h */304U8 Reserved3; /* 06h */305U8 MsgFlags; /* 07h */306U32 MsgContext; /* 08h */307U16 Reserved4; /* 0Ch */308U16 IOCStatus; /* 0Eh */309U32 IOCLogInfo; /* 10h */310U32 TransferLength; /* 14h */311} MSG_DIAG_BUFFER_POST_REPLY, MPI_POINTER PTR_MSG_DIAG_BUFFER_POST_REPLY,312DiagBufferPostReply_t, MPI_POINTER pDiagBufferPostReply_t;313314315/****************************************************************************/316/* Diagnostic Release request */317/****************************************************************************/318319typedef struct _MSG_DIAG_RELEASE_REQUEST320{321U8 Reserved1; /* 00h */322U8 BufferType; /* 01h */323U8 ChainOffset; /* 02h */324U8 Function; /* 03h */325U16 Reserved2; /* 04h */326U8 Reserved3; /* 06h */327U8 MsgFlags; /* 07h */328U32 MsgContext; /* 08h */329} MSG_DIAG_RELEASE_REQUEST, MPI_POINTER PTR_MSG_DIAG_RELEASE_REQUEST,330DiagReleaseRequest_t, MPI_POINTER pDiagReleaseRequest_t;331332333/* Diagnostic Release reply */334typedef struct _MSG_DIAG_RELEASE_REPLY335{336U8 Reserved1; /* 00h */337U8 BufferType; /* 01h */338U8 MsgLength; /* 02h */339U8 Function; /* 03h */340U16 Reserved2; /* 04h */341U8 Reserved3; /* 06h */342U8 MsgFlags; /* 07h */343U32 MsgContext; /* 08h */344U16 Reserved4; /* 0Ch */345U16 IOCStatus; /* 0Eh */346U32 IOCLogInfo; /* 10h */347} MSG_DIAG_RELEASE_REPLY, MPI_POINTER PTR_MSG_DIAG_RELEASE_REPLY,348DiagReleaseReply_t, MPI_POINTER pDiagReleaseReply_t;349350351#endif352353354355356