linux/drivers/scsi/mpt2sas/mpi/mpi2_tool.h
<<
>>
Prefs
   1/*
   2 *  Copyright (c) 2000-2010 LSI Corporation.
   3 *
   4 *
   5 *           Name:  mpi2_tool.h
   6 *          Title:  MPI diagnostic tool structures and definitions
   7 *  Creation Date:  March 26, 2007
   8 *
   9 *    mpi2_tool.h Version:  02.00.06
  10 *
  11 *  Version History
  12 *  ---------------
  13 *
  14 *  Date      Version   Description
  15 *  --------  --------  ------------------------------------------------------
  16 *  04-30-07  02.00.00  Corresponds to Fusion-MPT MPI Specification Rev A.
  17 *  12-18-07  02.00.01  Added Diagnostic Buffer Post and Diagnostic Release
  18 *                      structures and defines.
  19 *  02-29-08  02.00.02  Modified various names to make them 32-character unique.
  20 *  05-06-09  02.00.03  Added ISTWI Read Write Tool and Diagnostic CLI Tool.
  21 *  07-30-09  02.00.04  Added ExtendedType field to DiagnosticBufferPost request
  22 *                      and reply messages.
  23 *                      Added MPI2_DIAG_BUF_TYPE_EXTENDED.
  24 *                      Incremented MPI2_DIAG_BUF_TYPE_COUNT.
  25 *  05-12-10  02.00.05  Added Diagnostic Data Upload tool.
  26 *  08-11-10  02.00.06  Added defines that were missing for Diagnostic Buffer
  27 *                      Post Request.
  28 *  --------------------------------------------------------------------------
  29 */
  30
  31#ifndef MPI2_TOOL_H
  32#define MPI2_TOOL_H
  33
  34/*****************************************************************************
  35*
  36*               Toolbox Messages
  37*
  38*****************************************************************************/
  39
  40/* defines for the Tools */
  41#define MPI2_TOOLBOX_CLEAN_TOOL                     (0x00)
  42#define MPI2_TOOLBOX_MEMORY_MOVE_TOOL               (0x01)
  43#define MPI2_TOOLBOX_DIAG_DATA_UPLOAD_TOOL          (0x02)
  44#define MPI2_TOOLBOX_ISTWI_READ_WRITE_TOOL          (0x03)
  45#define MPI2_TOOLBOX_BEACON_TOOL                    (0x05)
  46#define MPI2_TOOLBOX_DIAGNOSTIC_CLI_TOOL            (0x06)
  47
  48
  49/****************************************************************************
  50*  Toolbox reply
  51****************************************************************************/
  52
  53typedef struct _MPI2_TOOLBOX_REPLY
  54{
  55    U8                      Tool;                       /* 0x00 */
  56    U8                      Reserved1;                  /* 0x01 */
  57    U8                      MsgLength;                  /* 0x02 */
  58    U8                      Function;                   /* 0x03 */
  59    U16                     Reserved2;                  /* 0x04 */
  60    U8                      Reserved3;                  /* 0x06 */
  61    U8                      MsgFlags;                   /* 0x07 */
  62    U8                      VP_ID;                      /* 0x08 */
  63    U8                      VF_ID;                      /* 0x09 */
  64    U16                     Reserved4;                  /* 0x0A */
  65    U16                     Reserved5;                  /* 0x0C */
  66    U16                     IOCStatus;                  /* 0x0E */
  67    U32                     IOCLogInfo;                 /* 0x10 */
  68} MPI2_TOOLBOX_REPLY, MPI2_POINTER PTR_MPI2_TOOLBOX_REPLY,
  69  Mpi2ToolboxReply_t, MPI2_POINTER pMpi2ToolboxReply_t;
  70
  71
  72/****************************************************************************
  73*  Toolbox Clean Tool request
  74****************************************************************************/
  75
  76typedef struct _MPI2_TOOLBOX_CLEAN_REQUEST
  77{
  78    U8                      Tool;                       /* 0x00 */
  79    U8                      Reserved1;                  /* 0x01 */
  80    U8                      ChainOffset;                /* 0x02 */
  81    U8                      Function;                   /* 0x03 */
  82    U16                     Reserved2;                  /* 0x04 */
  83    U8                      Reserved3;                  /* 0x06 */
  84    U8                      MsgFlags;                   /* 0x07 */
  85    U8                      VP_ID;                      /* 0x08 */
  86    U8                      VF_ID;                      /* 0x09 */
  87    U16                     Reserved4;                  /* 0x0A */
  88    U32                     Flags;                      /* 0x0C */
  89   } MPI2_TOOLBOX_CLEAN_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_CLEAN_REQUEST,
  90  Mpi2ToolboxCleanRequest_t, MPI2_POINTER pMpi2ToolboxCleanRequest_t;
  91
  92/* values for the Flags field */
  93#define MPI2_TOOLBOX_CLEAN_BOOT_SERVICES            (0x80000000)
  94#define MPI2_TOOLBOX_CLEAN_PERSIST_MANUFACT_PAGES   (0x40000000)
  95#define MPI2_TOOLBOX_CLEAN_OTHER_PERSIST_PAGES      (0x20000000)
  96#define MPI2_TOOLBOX_CLEAN_FW_CURRENT               (0x10000000)
  97#define MPI2_TOOLBOX_CLEAN_FW_BACKUP                (0x08000000)
  98#define MPI2_TOOLBOX_CLEAN_MEGARAID                 (0x02000000)
  99#define MPI2_TOOLBOX_CLEAN_INITIALIZATION           (0x01000000)
 100#define MPI2_TOOLBOX_CLEAN_FLASH                    (0x00000004)
 101#define MPI2_TOOLBOX_CLEAN_SEEPROM                  (0x00000002)
 102#define MPI2_TOOLBOX_CLEAN_NVSRAM                   (0x00000001)
 103
 104
 105/****************************************************************************
 106*  Toolbox Memory Move request
 107****************************************************************************/
 108
 109typedef struct _MPI2_TOOLBOX_MEM_MOVE_REQUEST {
 110    U8                      Tool;                       /* 0x00 */
 111    U8                      Reserved1;                  /* 0x01 */
 112    U8                      ChainOffset;                /* 0x02 */
 113    U8                      Function;                   /* 0x03 */
 114    U16                     Reserved2;                  /* 0x04 */
 115    U8                      Reserved3;                  /* 0x06 */
 116    U8                      MsgFlags;                   /* 0x07 */
 117    U8                      VP_ID;                      /* 0x08 */
 118    U8                      VF_ID;                      /* 0x09 */
 119    U16                     Reserved4;                  /* 0x0A */
 120    MPI2_SGE_SIMPLE_UNION   SGL;                        /* 0x0C */
 121} MPI2_TOOLBOX_MEM_MOVE_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_MEM_MOVE_REQUEST,
 122  Mpi2ToolboxMemMoveRequest_t, MPI2_POINTER pMpi2ToolboxMemMoveRequest_t;
 123
 124
 125/****************************************************************************
 126*  Toolbox Diagnostic Data Upload request
 127****************************************************************************/
 128
 129typedef struct _MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST {
 130        U8                      Tool;                       /* 0x00 */
 131        U8                      Reserved1;                  /* 0x01 */
 132        U8                      ChainOffset;                /* 0x02 */
 133        U8                      Function;                   /* 0x03 */
 134        U16                     Reserved2;                  /* 0x04 */
 135        U8                      Reserved3;                  /* 0x06 */
 136        U8                      MsgFlags;                   /* 0x07 */
 137        U8                      VP_ID;                      /* 0x08 */
 138        U8                      VF_ID;                      /* 0x09 */
 139        U16                     Reserved4;                  /* 0x0A */
 140        U8                      SGLFlags;                   /* 0x0C */
 141        U8                      Reserved5;                  /* 0x0D */
 142        U16                     Reserved6;                  /* 0x0E */
 143        U32                     Flags;                      /* 0x10 */
 144        U32                     DataLength;                 /* 0x14 */
 145        MPI2_SGE_SIMPLE_UNION   SGL;                        /* 0x18 */
 146} MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST,
 147MPI2_POINTER PTR_MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST,
 148Mpi2ToolboxDiagDataUploadRequest_t,
 149MPI2_POINTER pMpi2ToolboxDiagDataUploadRequest_t;
 150
 151/* use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
 152
 153
 154typedef struct _MPI2_DIAG_DATA_UPLOAD_HEADER {
 155        U32                     DiagDataLength;             /* 00h */
 156        U8                      FormatCode;                 /* 04h */
 157        U8                      Reserved1;                  /* 05h */
 158        U16                     Reserved2;                  /* 06h */
 159} MPI2_DIAG_DATA_UPLOAD_HEADER, MPI2_POINTER PTR_MPI2_DIAG_DATA_UPLOAD_HEADER,
 160Mpi2DiagDataUploadHeader_t, MPI2_POINTER pMpi2DiagDataUploadHeader_t;
 161
 162
 163/****************************************************************************
 164*  Toolbox ISTWI Read Write Tool
 165****************************************************************************/
 166
 167/* Toolbox ISTWI Read Write Tool request message */
 168typedef struct _MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST {
 169    U8                      Tool;                       /* 0x00 */
 170    U8                      Reserved1;                  /* 0x01 */
 171    U8                      ChainOffset;                /* 0x02 */
 172    U8                      Function;                   /* 0x03 */
 173    U16                     Reserved2;                  /* 0x04 */
 174    U8                      Reserved3;                  /* 0x06 */
 175    U8                      MsgFlags;                   /* 0x07 */
 176    U8                      VP_ID;                      /* 0x08 */
 177    U8                      VF_ID;                      /* 0x09 */
 178    U16                     Reserved4;                  /* 0x0A */
 179    U32                     Reserved5;                  /* 0x0C */
 180    U32                     Reserved6;                  /* 0x10 */
 181    U8                      DevIndex;                   /* 0x14 */
 182    U8                      Action;                     /* 0x15 */
 183    U8                      SGLFlags;                   /* 0x16 */
 184    U8                      Reserved7;                  /* 0x17 */
 185    U16                     TxDataLength;               /* 0x18 */
 186    U16                     RxDataLength;               /* 0x1A */
 187    U32                     Reserved8;                  /* 0x1C */
 188    U32                     Reserved9;                  /* 0x20 */
 189    U32                     Reserved10;                 /* 0x24 */
 190    U32                     Reserved11;                 /* 0x28 */
 191    U32                     Reserved12;                 /* 0x2C */
 192    MPI2_SGE_SIMPLE_UNION   SGL;                        /* 0x30 */
 193} MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST,
 194  MPI2_POINTER PTR_MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST,
 195  Mpi2ToolboxIstwiReadWriteRequest_t,
 196  MPI2_POINTER pMpi2ToolboxIstwiReadWriteRequest_t;
 197
 198/* values for the Action field */
 199#define MPI2_TOOL_ISTWI_ACTION_READ_DATA            (0x01)
 200#define MPI2_TOOL_ISTWI_ACTION_WRITE_DATA           (0x02)
 201#define MPI2_TOOL_ISTWI_ACTION_SEQUENCE             (0x03)
 202#define MPI2_TOOL_ISTWI_ACTION_RESERVE_BUS          (0x10)
 203#define MPI2_TOOL_ISTWI_ACTION_RELEASE_BUS          (0x11)
 204#define MPI2_TOOL_ISTWI_ACTION_RESET                (0x12)
 205
 206/* use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
 207
 208
 209/* Toolbox ISTWI Read Write Tool reply message */
 210typedef struct _MPI2_TOOLBOX_ISTWI_REPLY {
 211    U8                      Tool;                       /* 0x00 */
 212    U8                      Reserved1;                  /* 0x01 */
 213    U8                      MsgLength;                  /* 0x02 */
 214    U8                      Function;                   /* 0x03 */
 215    U16                     Reserved2;                  /* 0x04 */
 216    U8                      Reserved3;                  /* 0x06 */
 217    U8                      MsgFlags;                   /* 0x07 */
 218    U8                      VP_ID;                      /* 0x08 */
 219    U8                      VF_ID;                      /* 0x09 */
 220    U16                     Reserved4;                  /* 0x0A */
 221    U16                     Reserved5;                  /* 0x0C */
 222    U16                     IOCStatus;                  /* 0x0E */
 223    U32                     IOCLogInfo;                 /* 0x10 */
 224    U8                      DevIndex;                   /* 0x14 */
 225    U8                      Action;                     /* 0x15 */
 226    U8                      IstwiStatus;                /* 0x16 */
 227    U8                      Reserved6;                  /* 0x17 */
 228    U16                     TxDataCount;                /* 0x18 */
 229    U16                     RxDataCount;                /* 0x1A */
 230} MPI2_TOOLBOX_ISTWI_REPLY, MPI2_POINTER PTR_MPI2_TOOLBOX_ISTWI_REPLY,
 231  Mpi2ToolboxIstwiReply_t, MPI2_POINTER pMpi2ToolboxIstwiReply_t;
 232
 233
 234/****************************************************************************
 235*  Toolbox Beacon Tool request
 236****************************************************************************/
 237
 238typedef struct _MPI2_TOOLBOX_BEACON_REQUEST
 239{
 240    U8                      Tool;                       /* 0x00 */
 241    U8                      Reserved1;                  /* 0x01 */
 242    U8                      ChainOffset;                /* 0x02 */
 243    U8                      Function;                   /* 0x03 */
 244    U16                     Reserved2;                  /* 0x04 */
 245    U8                      Reserved3;                  /* 0x06 */
 246    U8                      MsgFlags;                   /* 0x07 */
 247    U8                      VP_ID;                      /* 0x08 */
 248    U8                      VF_ID;                      /* 0x09 */
 249    U16                     Reserved4;                  /* 0x0A */
 250    U8                      Reserved5;                  /* 0x0C */
 251    U8                      PhysicalPort;               /* 0x0D */
 252    U8                      Reserved6;                  /* 0x0E */
 253    U8                      Flags;                      /* 0x0F */
 254} MPI2_TOOLBOX_BEACON_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_BEACON_REQUEST,
 255  Mpi2ToolboxBeaconRequest_t, MPI2_POINTER pMpi2ToolboxBeaconRequest_t;
 256
 257/* values for the Flags field */
 258#define MPI2_TOOLBOX_FLAGS_BEACONMODE_OFF       (0x00)
 259#define MPI2_TOOLBOX_FLAGS_BEACONMODE_ON        (0x01)
 260
 261
 262/****************************************************************************
 263*  Toolbox Diagnostic CLI Tool
 264****************************************************************************/
 265
 266#define MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH    (0x5C)
 267
 268/* Toolbox Diagnostic CLI Tool request message */
 269typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST {
 270    U8                      Tool;                       /* 0x00 */
 271    U8                      Reserved1;                  /* 0x01 */
 272    U8                      ChainOffset;                /* 0x02 */
 273    U8                      Function;                   /* 0x03 */
 274    U16                     Reserved2;                  /* 0x04 */
 275    U8                      Reserved3;                  /* 0x06 */
 276    U8                      MsgFlags;                   /* 0x07 */
 277    U8                      VP_ID;                      /* 0x08 */
 278    U8                      VF_ID;                      /* 0x09 */
 279    U16                     Reserved4;                  /* 0x0A */
 280    U8                      SGLFlags;                   /* 0x0C */
 281    U8                      Reserved5;                  /* 0x0D */
 282    U16                     Reserved6;                  /* 0x0E */
 283    U32                     DataLength;                 /* 0x10 */
 284    U8                      DiagnosticCliCommand
 285                [MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH];     /* 0x14 */
 286    MPI2_SGE_SIMPLE_UNION   SGL;                        /* 0x70 */
 287} MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
 288  MPI2_POINTER PTR_MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
 289  Mpi2ToolboxDiagnosticCliRequest_t,
 290  MPI2_POINTER pMpi2ToolboxDiagnosticCliRequest_t;
 291
 292/* use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
 293
 294
 295/* Toolbox Diagnostic CLI Tool reply message */
 296typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY {
 297    U8                      Tool;                       /* 0x00 */
 298    U8                      Reserved1;                  /* 0x01 */
 299    U8                      MsgLength;                  /* 0x02 */
 300    U8                      Function;                   /* 0x03 */
 301    U16                     Reserved2;                  /* 0x04 */
 302    U8                      Reserved3;                  /* 0x06 */
 303    U8                      MsgFlags;                   /* 0x07 */
 304    U8                      VP_ID;                      /* 0x08 */
 305    U8                      VF_ID;                      /* 0x09 */
 306    U16                     Reserved4;                  /* 0x0A */
 307    U16                     Reserved5;                  /* 0x0C */
 308    U16                     IOCStatus;                  /* 0x0E */
 309    U32                     IOCLogInfo;                 /* 0x10 */
 310    U32                     ReturnedDataLength;         /* 0x14 */
 311} MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY,
 312  MPI2_POINTER PTR_MPI2_TOOLBOX_DIAG_CLI_REPLY,
 313  Mpi2ToolboxDiagnosticCliReply_t,
 314  MPI2_POINTER pMpi2ToolboxDiagnosticCliReply_t;
 315
 316
 317/*****************************************************************************
 318*
 319*       Diagnostic Buffer Messages
 320*
 321*****************************************************************************/
 322
 323
 324/****************************************************************************
 325*  Diagnostic Buffer Post request
 326****************************************************************************/
 327
 328typedef struct _MPI2_DIAG_BUFFER_POST_REQUEST
 329{
 330    U8                      ExtendedType;               /* 0x00 */
 331    U8                      BufferType;                 /* 0x01 */
 332    U8                      ChainOffset;                /* 0x02 */
 333    U8                      Function;                   /* 0x03 */
 334    U16                     Reserved2;                  /* 0x04 */
 335    U8                      Reserved3;                  /* 0x06 */
 336    U8                      MsgFlags;                   /* 0x07 */
 337    U8                      VP_ID;                      /* 0x08 */
 338    U8                      VF_ID;                      /* 0x09 */
 339    U16                     Reserved4;                  /* 0x0A */
 340    U64                     BufferAddress;              /* 0x0C */
 341    U32                     BufferLength;               /* 0x14 */
 342    U32                     Reserved5;                  /* 0x18 */
 343    U32                     Reserved6;                  /* 0x1C */
 344    U32                     Flags;                      /* 0x20 */
 345    U32                     ProductSpecific[23];        /* 0x24 */
 346} MPI2_DIAG_BUFFER_POST_REQUEST, MPI2_POINTER PTR_MPI2_DIAG_BUFFER_POST_REQUEST,
 347  Mpi2DiagBufferPostRequest_t, MPI2_POINTER pMpi2DiagBufferPostRequest_t;
 348
 349/* values for the ExtendedType field */
 350#define MPI2_DIAG_EXTENDED_TYPE_UTILIZATION         (0x02)
 351
 352/* values for the BufferType field */
 353#define MPI2_DIAG_BUF_TYPE_TRACE                    (0x00)
 354#define MPI2_DIAG_BUF_TYPE_SNAPSHOT                 (0x01)
 355#define MPI2_DIAG_BUF_TYPE_EXTENDED                 (0x02)
 356/* count of the number of buffer types */
 357#define MPI2_DIAG_BUF_TYPE_COUNT                    (0x03)
 358
 359/* values for the Flags field */
 360#define MPI2_DIAG_BUF_FLAG_RELEASE_ON_FULL          (0x00000002)
 361#define MPI2_DIAG_BUF_FLAG_IMMEDIATE_RELEASE        (0x00000001)
 362
 363
 364/****************************************************************************
 365*  Diagnostic Buffer Post reply
 366****************************************************************************/
 367
 368typedef struct _MPI2_DIAG_BUFFER_POST_REPLY
 369{
 370    U8                      ExtendedType;               /* 0x00 */
 371    U8                      BufferType;                 /* 0x01 */
 372    U8                      MsgLength;                  /* 0x02 */
 373    U8                      Function;                   /* 0x03 */
 374    U16                     Reserved2;                  /* 0x04 */
 375    U8                      Reserved3;                  /* 0x06 */
 376    U8                      MsgFlags;                   /* 0x07 */
 377    U8                      VP_ID;                      /* 0x08 */
 378    U8                      VF_ID;                      /* 0x09 */
 379    U16                     Reserved4;                  /* 0x0A */
 380    U16                     Reserved5;                  /* 0x0C */
 381    U16                     IOCStatus;                  /* 0x0E */
 382    U32                     IOCLogInfo;                 /* 0x10 */
 383    U32                     TransferLength;             /* 0x14 */
 384} MPI2_DIAG_BUFFER_POST_REPLY, MPI2_POINTER PTR_MPI2_DIAG_BUFFER_POST_REPLY,
 385  Mpi2DiagBufferPostReply_t, MPI2_POINTER pMpi2DiagBufferPostReply_t;
 386
 387
 388/****************************************************************************
 389*  Diagnostic Release request
 390****************************************************************************/
 391
 392typedef struct _MPI2_DIAG_RELEASE_REQUEST
 393{
 394    U8                      Reserved1;                  /* 0x00 */
 395    U8                      BufferType;                 /* 0x01 */
 396    U8                      ChainOffset;                /* 0x02 */
 397    U8                      Function;                   /* 0x03 */
 398    U16                     Reserved2;                  /* 0x04 */
 399    U8                      Reserved3;                  /* 0x06 */
 400    U8                      MsgFlags;                   /* 0x07 */
 401    U8                      VP_ID;                      /* 0x08 */
 402    U8                      VF_ID;                      /* 0x09 */
 403    U16                     Reserved4;                  /* 0x0A */
 404} MPI2_DIAG_RELEASE_REQUEST, MPI2_POINTER PTR_MPI2_DIAG_RELEASE_REQUEST,
 405  Mpi2DiagReleaseRequest_t, MPI2_POINTER pMpi2DiagReleaseRequest_t;
 406
 407
 408/****************************************************************************
 409*  Diagnostic Buffer Post reply
 410****************************************************************************/
 411
 412typedef struct _MPI2_DIAG_RELEASE_REPLY
 413{
 414    U8                      Reserved1;                  /* 0x00 */
 415    U8                      BufferType;                 /* 0x01 */
 416    U8                      MsgLength;                  /* 0x02 */
 417    U8                      Function;                   /* 0x03 */
 418    U16                     Reserved2;                  /* 0x04 */
 419    U8                      Reserved3;                  /* 0x06 */
 420    U8                      MsgFlags;                   /* 0x07 */
 421    U8                      VP_ID;                      /* 0x08 */
 422    U8                      VF_ID;                      /* 0x09 */
 423    U16                     Reserved4;                  /* 0x0A */
 424    U16                     Reserved5;                  /* 0x0C */
 425    U16                     IOCStatus;                  /* 0x0E */
 426    U32                     IOCLogInfo;                 /* 0x10 */
 427} MPI2_DIAG_RELEASE_REPLY, MPI2_POINTER PTR_MPI2_DIAG_RELEASE_REPLY,
 428  Mpi2DiagReleaseReply_t, MPI2_POINTER pMpi2DiagReleaseReply_t;
 429
 430
 431#endif
 432
 433