linux/drivers/scsi/mpt2sas/mpi/mpi2_tool.h
<<
>>
Prefs
   1/*
   2 *  Copyright (c) 2000-2009 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.03
  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 *  --------------------------------------------------------------------------
  22 */
  23
  24#ifndef MPI2_TOOL_H
  25#define MPI2_TOOL_H
  26
  27/*****************************************************************************
  28*
  29*               Toolbox Messages
  30*
  31*****************************************************************************/
  32
  33/* defines for the Tools */
  34#define MPI2_TOOLBOX_CLEAN_TOOL                     (0x00)
  35#define MPI2_TOOLBOX_MEMORY_MOVE_TOOL               (0x01)
  36#define MPI2_TOOLBOX_ISTWI_READ_WRITE_TOOL          (0x03)
  37#define MPI2_TOOLBOX_BEACON_TOOL                    (0x05)
  38#define MPI2_TOOLBOX_DIAGNOSTIC_CLI_TOOL            (0x06)
  39
  40
  41/****************************************************************************
  42*  Toolbox reply
  43****************************************************************************/
  44
  45typedef struct _MPI2_TOOLBOX_REPLY
  46{
  47    U8                      Tool;                       /* 0x00 */
  48    U8                      Reserved1;                  /* 0x01 */
  49    U8                      MsgLength;                  /* 0x02 */
  50    U8                      Function;                   /* 0x03 */
  51    U16                     Reserved2;                  /* 0x04 */
  52    U8                      Reserved3;                  /* 0x06 */
  53    U8                      MsgFlags;                   /* 0x07 */
  54    U8                      VP_ID;                      /* 0x08 */
  55    U8                      VF_ID;                      /* 0x09 */
  56    U16                     Reserved4;                  /* 0x0A */
  57    U16                     Reserved5;                  /* 0x0C */
  58    U16                     IOCStatus;                  /* 0x0E */
  59    U32                     IOCLogInfo;                 /* 0x10 */
  60} MPI2_TOOLBOX_REPLY, MPI2_POINTER PTR_MPI2_TOOLBOX_REPLY,
  61  Mpi2ToolboxReply_t, MPI2_POINTER pMpi2ToolboxReply_t;
  62
  63
  64/****************************************************************************
  65*  Toolbox Clean Tool request
  66****************************************************************************/
  67
  68typedef struct _MPI2_TOOLBOX_CLEAN_REQUEST
  69{
  70    U8                      Tool;                       /* 0x00 */
  71    U8                      Reserved1;                  /* 0x01 */
  72    U8                      ChainOffset;                /* 0x02 */
  73    U8                      Function;                   /* 0x03 */
  74    U16                     Reserved2;                  /* 0x04 */
  75    U8                      Reserved3;                  /* 0x06 */
  76    U8                      MsgFlags;                   /* 0x07 */
  77    U8                      VP_ID;                      /* 0x08 */
  78    U8                      VF_ID;                      /* 0x09 */
  79    U16                     Reserved4;                  /* 0x0A */
  80    U32                     Flags;                      /* 0x0C */
  81   } MPI2_TOOLBOX_CLEAN_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_CLEAN_REQUEST,
  82  Mpi2ToolboxCleanRequest_t, MPI2_POINTER pMpi2ToolboxCleanRequest_t;
  83
  84/* values for the Flags field */
  85#define MPI2_TOOLBOX_CLEAN_BOOT_SERVICES            (0x80000000)
  86#define MPI2_TOOLBOX_CLEAN_PERSIST_MANUFACT_PAGES   (0x40000000)
  87#define MPI2_TOOLBOX_CLEAN_OTHER_PERSIST_PAGES      (0x20000000)
  88#define MPI2_TOOLBOX_CLEAN_FW_CURRENT               (0x10000000)
  89#define MPI2_TOOLBOX_CLEAN_FW_BACKUP                (0x08000000)
  90#define MPI2_TOOLBOX_CLEAN_MEGARAID                 (0x02000000)
  91#define MPI2_TOOLBOX_CLEAN_INITIALIZATION           (0x01000000)
  92#define MPI2_TOOLBOX_CLEAN_FLASH                    (0x00000004)
  93#define MPI2_TOOLBOX_CLEAN_SEEPROM                  (0x00000002)
  94#define MPI2_TOOLBOX_CLEAN_NVSRAM                   (0x00000001)
  95
  96
  97/****************************************************************************
  98*  Toolbox Memory Move request
  99****************************************************************************/
 100
 101typedef struct _MPI2_TOOLBOX_MEM_MOVE_REQUEST
 102{
 103    U8                      Tool;                       /* 0x00 */
 104    U8                      Reserved1;                  /* 0x01 */
 105    U8                      ChainOffset;                /* 0x02 */
 106    U8                      Function;                   /* 0x03 */
 107    U16                     Reserved2;                  /* 0x04 */
 108    U8                      Reserved3;                  /* 0x06 */
 109    U8                      MsgFlags;                   /* 0x07 */
 110    U8                      VP_ID;                      /* 0x08 */
 111    U8                      VF_ID;                      /* 0x09 */
 112    U16                     Reserved4;                  /* 0x0A */
 113    MPI2_SGE_SIMPLE_UNION   SGL;                        /* 0x0C */
 114} MPI2_TOOLBOX_MEM_MOVE_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_MEM_MOVE_REQUEST,
 115  Mpi2ToolboxMemMoveRequest_t, MPI2_POINTER pMpi2ToolboxMemMoveRequest_t;
 116
 117
 118/****************************************************************************
 119*  Toolbox ISTWI Read Write Tool
 120****************************************************************************/
 121
 122/* Toolbox ISTWI Read Write Tool request message */
 123typedef struct _MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST {
 124    U8                      Tool;                       /* 0x00 */
 125    U8                      Reserved1;                  /* 0x01 */
 126    U8                      ChainOffset;                /* 0x02 */
 127    U8                      Function;                   /* 0x03 */
 128    U16                     Reserved2;                  /* 0x04 */
 129    U8                      Reserved3;                  /* 0x06 */
 130    U8                      MsgFlags;                   /* 0x07 */
 131    U8                      VP_ID;                      /* 0x08 */
 132    U8                      VF_ID;                      /* 0x09 */
 133    U16                     Reserved4;                  /* 0x0A */
 134    U32                     Reserved5;                  /* 0x0C */
 135    U32                     Reserved6;                  /* 0x10 */
 136    U8                      DevIndex;                   /* 0x14 */
 137    U8                      Action;                     /* 0x15 */
 138    U8                      SGLFlags;                   /* 0x16 */
 139    U8                      Reserved7;                  /* 0x17 */
 140    U16                     TxDataLength;               /* 0x18 */
 141    U16                     RxDataLength;               /* 0x1A */
 142    U32                     Reserved8;                  /* 0x1C */
 143    U32                     Reserved9;                  /* 0x20 */
 144    U32                     Reserved10;                 /* 0x24 */
 145    U32                     Reserved11;                 /* 0x28 */
 146    U32                     Reserved12;                 /* 0x2C */
 147    MPI2_SGE_SIMPLE_UNION   SGL;                        /* 0x30 */
 148} MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST,
 149  MPI2_POINTER PTR_MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST,
 150  Mpi2ToolboxIstwiReadWriteRequest_t,
 151  MPI2_POINTER pMpi2ToolboxIstwiReadWriteRequest_t;
 152
 153/* values for the Action field */
 154#define MPI2_TOOL_ISTWI_ACTION_READ_DATA            (0x01)
 155#define MPI2_TOOL_ISTWI_ACTION_WRITE_DATA           (0x02)
 156#define MPI2_TOOL_ISTWI_ACTION_SEQUENCE             (0x03)
 157#define MPI2_TOOL_ISTWI_ACTION_RESERVE_BUS          (0x10)
 158#define MPI2_TOOL_ISTWI_ACTION_RELEASE_BUS          (0x11)
 159#define MPI2_TOOL_ISTWI_ACTION_RESET                (0x12)
 160
 161/* values for SGLFlags field are in the SGL section of mpi2.h */
 162
 163
 164/* Toolbox ISTWI Read Write Tool reply message */
 165typedef struct _MPI2_TOOLBOX_ISTWI_REPLY {
 166    U8                      Tool;                       /* 0x00 */
 167    U8                      Reserved1;                  /* 0x01 */
 168    U8                      MsgLength;                  /* 0x02 */
 169    U8                      Function;                   /* 0x03 */
 170    U16                     Reserved2;                  /* 0x04 */
 171    U8                      Reserved3;                  /* 0x06 */
 172    U8                      MsgFlags;                   /* 0x07 */
 173    U8                      VP_ID;                      /* 0x08 */
 174    U8                      VF_ID;                      /* 0x09 */
 175    U16                     Reserved4;                  /* 0x0A */
 176    U16                     Reserved5;                  /* 0x0C */
 177    U16                     IOCStatus;                  /* 0x0E */
 178    U32                     IOCLogInfo;                 /* 0x10 */
 179    U8                      DevIndex;                   /* 0x14 */
 180    U8                      Action;                     /* 0x15 */
 181    U8                      IstwiStatus;                /* 0x16 */
 182    U8                      Reserved6;                  /* 0x17 */
 183    U16                     TxDataCount;                /* 0x18 */
 184    U16                     RxDataCount;                /* 0x1A */
 185} MPI2_TOOLBOX_ISTWI_REPLY, MPI2_POINTER PTR_MPI2_TOOLBOX_ISTWI_REPLY,
 186  Mpi2ToolboxIstwiReply_t, MPI2_POINTER pMpi2ToolboxIstwiReply_t;
 187
 188
 189/****************************************************************************
 190*  Toolbox Beacon Tool request
 191****************************************************************************/
 192
 193typedef struct _MPI2_TOOLBOX_BEACON_REQUEST
 194{
 195    U8                      Tool;                       /* 0x00 */
 196    U8                      Reserved1;                  /* 0x01 */
 197    U8                      ChainOffset;                /* 0x02 */
 198    U8                      Function;                   /* 0x03 */
 199    U16                     Reserved2;                  /* 0x04 */
 200    U8                      Reserved3;                  /* 0x06 */
 201    U8                      MsgFlags;                   /* 0x07 */
 202    U8                      VP_ID;                      /* 0x08 */
 203    U8                      VF_ID;                      /* 0x09 */
 204    U16                     Reserved4;                  /* 0x0A */
 205    U8                      Reserved5;                  /* 0x0C */
 206    U8                      PhysicalPort;               /* 0x0D */
 207    U8                      Reserved6;                  /* 0x0E */
 208    U8                      Flags;                      /* 0x0F */
 209} MPI2_TOOLBOX_BEACON_REQUEST, MPI2_POINTER PTR_MPI2_TOOLBOX_BEACON_REQUEST,
 210  Mpi2ToolboxBeaconRequest_t, MPI2_POINTER pMpi2ToolboxBeaconRequest_t;
 211
 212/* values for the Flags field */
 213#define MPI2_TOOLBOX_FLAGS_BEACONMODE_OFF       (0x00)
 214#define MPI2_TOOLBOX_FLAGS_BEACONMODE_ON        (0x01)
 215
 216
 217/****************************************************************************
 218*  Toolbox Diagnostic CLI Tool
 219****************************************************************************/
 220
 221#define MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH    (0x5C)
 222
 223/* Toolbox Diagnostic CLI Tool request message */
 224typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST {
 225    U8                      Tool;                       /* 0x00 */
 226    U8                      Reserved1;                  /* 0x01 */
 227    U8                      ChainOffset;                /* 0x02 */
 228    U8                      Function;                   /* 0x03 */
 229    U16                     Reserved2;                  /* 0x04 */
 230    U8                      Reserved3;                  /* 0x06 */
 231    U8                      MsgFlags;                   /* 0x07 */
 232    U8                      VP_ID;                      /* 0x08 */
 233    U8                      VF_ID;                      /* 0x09 */
 234    U16                     Reserved4;                  /* 0x0A */
 235    U8                      SGLFlags;                   /* 0x0C */
 236    U8                      Reserved5;                  /* 0x0D */
 237    U16                     Reserved6;                  /* 0x0E */
 238    U32                     DataLength;                 /* 0x10 */
 239    U8                      DiagnosticCliCommand
 240                [MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH];     /* 0x14 */
 241    MPI2_SGE_SIMPLE_UNION   SGL;                        /* 0x70 */
 242} MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
 243  MPI2_POINTER PTR_MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
 244  Mpi2ToolboxDiagnosticCliRequest_t,
 245  MPI2_POINTER pMpi2ToolboxDiagnosticCliRequest_t;
 246
 247/* values for SGLFlags field are in the SGL section of mpi2.h */
 248
 249
 250/* Toolbox Diagnostic CLI Tool reply message */
 251typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY {
 252    U8                      Tool;                       /* 0x00 */
 253    U8                      Reserved1;                  /* 0x01 */
 254    U8                      MsgLength;                  /* 0x02 */
 255    U8                      Function;                   /* 0x03 */
 256    U16                     Reserved2;                  /* 0x04 */
 257    U8                      Reserved3;                  /* 0x06 */
 258    U8                      MsgFlags;                   /* 0x07 */
 259    U8                      VP_ID;                      /* 0x08 */
 260    U8                      VF_ID;                      /* 0x09 */
 261    U16                     Reserved4;                  /* 0x0A */
 262    U16                     Reserved5;                  /* 0x0C */
 263    U16                     IOCStatus;                  /* 0x0E */
 264    U32                     IOCLogInfo;                 /* 0x10 */
 265    U32                     ReturnedDataLength;         /* 0x14 */
 266} MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY,
 267  MPI2_POINTER PTR_MPI2_TOOLBOX_DIAG_CLI_REPLY,
 268  Mpi2ToolboxDiagnosticCliReply_t,
 269  MPI2_POINTER pMpi2ToolboxDiagnosticCliReply_t;
 270
 271
 272/*****************************************************************************
 273*
 274*       Diagnostic Buffer Messages
 275*
 276*****************************************************************************/
 277
 278
 279/****************************************************************************
 280*  Diagnostic Buffer Post request
 281****************************************************************************/
 282
 283typedef struct _MPI2_DIAG_BUFFER_POST_REQUEST
 284{
 285    U8                      Reserved1;                  /* 0x00 */
 286    U8                      BufferType;                 /* 0x01 */
 287    U8                      ChainOffset;                /* 0x02 */
 288    U8                      Function;                   /* 0x03 */
 289    U16                     Reserved2;                  /* 0x04 */
 290    U8                      Reserved3;                  /* 0x06 */
 291    U8                      MsgFlags;                   /* 0x07 */
 292    U8                      VP_ID;                      /* 0x08 */
 293    U8                      VF_ID;                      /* 0x09 */
 294    U16                     Reserved4;                  /* 0x0A */
 295    U64                     BufferAddress;              /* 0x0C */
 296    U32                     BufferLength;               /* 0x14 */
 297    U32                     Reserved5;                  /* 0x18 */
 298    U32                     Reserved6;                  /* 0x1C */
 299    U32                     Flags;                      /* 0x20 */
 300    U32                     ProductSpecific[23];        /* 0x24 */
 301} MPI2_DIAG_BUFFER_POST_REQUEST, MPI2_POINTER PTR_MPI2_DIAG_BUFFER_POST_REQUEST,
 302  Mpi2DiagBufferPostRequest_t, MPI2_POINTER pMpi2DiagBufferPostRequest_t;
 303
 304/* values for the BufferType field */
 305#define MPI2_DIAG_BUF_TYPE_TRACE                    (0x00)
 306#define MPI2_DIAG_BUF_TYPE_SNAPSHOT                 (0x01)
 307/* count of the number of buffer types */
 308#define MPI2_DIAG_BUF_TYPE_COUNT                    (0x02)
 309
 310
 311/****************************************************************************
 312*  Diagnostic Buffer Post reply
 313****************************************************************************/
 314
 315typedef struct _MPI2_DIAG_BUFFER_POST_REPLY
 316{
 317    U8                      Reserved1;                  /* 0x00 */
 318    U8                      BufferType;                 /* 0x01 */
 319    U8                      MsgLength;                  /* 0x02 */
 320    U8                      Function;                   /* 0x03 */
 321    U16                     Reserved2;                  /* 0x04 */
 322    U8                      Reserved3;                  /* 0x06 */
 323    U8                      MsgFlags;                   /* 0x07 */
 324    U8                      VP_ID;                      /* 0x08 */
 325    U8                      VF_ID;                      /* 0x09 */
 326    U16                     Reserved4;                  /* 0x0A */
 327    U16                     Reserved5;                  /* 0x0C */
 328    U16                     IOCStatus;                  /* 0x0E */
 329    U32                     IOCLogInfo;                 /* 0x10 */
 330    U32                     TransferLength;             /* 0x14 */
 331} MPI2_DIAG_BUFFER_POST_REPLY, MPI2_POINTER PTR_MPI2_DIAG_BUFFER_POST_REPLY,
 332  Mpi2DiagBufferPostReply_t, MPI2_POINTER pMpi2DiagBufferPostReply_t;
 333
 334
 335/****************************************************************************
 336*  Diagnostic Release request
 337****************************************************************************/
 338
 339typedef struct _MPI2_DIAG_RELEASE_REQUEST
 340{
 341    U8                      Reserved1;                  /* 0x00 */
 342    U8                      BufferType;                 /* 0x01 */
 343    U8                      ChainOffset;                /* 0x02 */
 344    U8                      Function;                   /* 0x03 */
 345    U16                     Reserved2;                  /* 0x04 */
 346    U8                      Reserved3;                  /* 0x06 */
 347    U8                      MsgFlags;                   /* 0x07 */
 348    U8                      VP_ID;                      /* 0x08 */
 349    U8                      VF_ID;                      /* 0x09 */
 350    U16                     Reserved4;                  /* 0x0A */
 351} MPI2_DIAG_RELEASE_REQUEST, MPI2_POINTER PTR_MPI2_DIAG_RELEASE_REQUEST,
 352  Mpi2DiagReleaseRequest_t, MPI2_POINTER pMpi2DiagReleaseRequest_t;
 353
 354
 355/****************************************************************************
 356*  Diagnostic Buffer Post reply
 357****************************************************************************/
 358
 359typedef struct _MPI2_DIAG_RELEASE_REPLY
 360{
 361    U8                      Reserved1;                  /* 0x00 */
 362    U8                      BufferType;                 /* 0x01 */
 363    U8                      MsgLength;                  /* 0x02 */
 364    U8                      Function;                   /* 0x03 */
 365    U16                     Reserved2;                  /* 0x04 */
 366    U8                      Reserved3;                  /* 0x06 */
 367    U8                      MsgFlags;                   /* 0x07 */
 368    U8                      VP_ID;                      /* 0x08 */
 369    U8                      VF_ID;                      /* 0x09 */
 370    U16                     Reserved4;                  /* 0x0A */
 371    U16                     Reserved5;                  /* 0x0C */
 372    U16                     IOCStatus;                  /* 0x0E */
 373    U32                     IOCLogInfo;                 /* 0x10 */
 374} MPI2_DIAG_RELEASE_REPLY, MPI2_POINTER PTR_MPI2_DIAG_RELEASE_REPLY,
 375  Mpi2DiagReleaseReply_t, MPI2_POINTER pMpi2DiagReleaseReply_t;
 376
 377
 378#endif
 379
 380