linux/drivers/scsi/mpt3sas/mpi/mpi2_tool.h
<<
>>
Prefs
   1/* SPDX-License-Identifier: GPL-2.0 */
   2/*
   3 * Copyright 2000-2020 Broadcom Inc. All rights reserved.
   4 *
   5 *
   6 *          Name:  mpi2_tool.h
   7 *         Title:  MPI diagnostic tool structures and definitions
   8 * Creation Date:  March 26, 2007
   9 *
  10 *   mpi2_tool.h Version:  02.00.16
  11 *
  12 * Version History
  13 * ---------------
  14 *
  15 * Date      Version   Description
  16 * --------  --------  ------------------------------------------------------
  17 * 04-30-07  02.00.00  Corresponds to Fusion-MPT MPI Specification Rev A.
  18 * 12-18-07  02.00.01  Added Diagnostic Buffer Post and Diagnostic Release
  19 *                     structures and defines.
  20 * 02-29-08  02.00.02  Modified various names to make them 32-character unique.
  21 * 05-06-09  02.00.03  Added ISTWI Read Write Tool and Diagnostic CLI Tool.
  22 * 07-30-09  02.00.04  Added ExtendedType field to DiagnosticBufferPost request
  23 *                     and reply messages.
  24 *                     Added MPI2_DIAG_BUF_TYPE_EXTENDED.
  25 *                     Incremented MPI2_DIAG_BUF_TYPE_COUNT.
  26 * 05-12-10  02.00.05  Added Diagnostic Data Upload tool.
  27 * 08-11-10  02.00.06  Added defines that were missing for Diagnostic Buffer
  28 *                     Post Request.
  29 * 05-25-11  02.00.07  Added Flags field and related defines to
  30 *                     MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST.
  31 * 11-18-11  02.00.08  Incorporating additions for MPI v2.5.
  32 * 07-10-12  02.00.09  Add MPI v2.5 Toolbox Diagnostic CLI Tool Request
  33 *                     message.
  34 * 07-26-12  02.00.10  Modified MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST so that
  35 *                     it uses MPI Chain SGE as well as MPI Simple SGE.
  36 * 08-19-13  02.00.11  Added MPI2_TOOLBOX_TEXT_DISPLAY_TOOL and related info.
  37 * 01-08-14  02.00.12  Added MPI2_TOOLBOX_CLEAN_BIT26_PRODUCT_SPECIFIC.
  38 * 11-18-14  02.00.13  Updated copyright information.
  39 * 08-25-16  02.00.14  Added new values for the Flags field of Toolbox Clean
  40 *                     Tool Request Message.
  41 * 07-22-18  02.00.15  Added defines for new TOOLBOX_PCIE_LANE_MARGINING tool.
  42 *                     Added option for DeviceInfo field in ISTWI tool.
  43 * 12-17-18  02.00.16  Shorten some defines to be compatible with DOS.
  44 * --------------------------------------------------------------------------
  45 */
  46
  47#ifndef MPI2_TOOL_H
  48#define MPI2_TOOL_H
  49
  50/*****************************************************************************
  51*
  52*              Toolbox Messages
  53*
  54*****************************************************************************/
  55
  56/*defines for the Tools */
  57#define MPI2_TOOLBOX_CLEAN_TOOL                     (0x00)
  58#define MPI2_TOOLBOX_MEMORY_MOVE_TOOL               (0x01)
  59#define MPI2_TOOLBOX_DIAG_DATA_UPLOAD_TOOL          (0x02)
  60#define MPI2_TOOLBOX_ISTWI_READ_WRITE_TOOL          (0x03)
  61#define MPI2_TOOLBOX_BEACON_TOOL                    (0x05)
  62#define MPI2_TOOLBOX_DIAGNOSTIC_CLI_TOOL            (0x06)
  63#define MPI2_TOOLBOX_TEXT_DISPLAY_TOOL              (0x07)
  64#define MPI26_TOOLBOX_BACKEND_PCIE_LANE_MARGIN      (0x08)
  65
  66/****************************************************************************
  67* Toolbox reply
  68****************************************************************************/
  69
  70typedef struct _MPI2_TOOLBOX_REPLY {
  71        U8 Tool;                /*0x00 */
  72        U8 Reserved1;           /*0x01 */
  73        U8 MsgLength;           /*0x02 */
  74        U8 Function;            /*0x03 */
  75        U16 Reserved2;          /*0x04 */
  76        U8 Reserved3;           /*0x06 */
  77        U8 MsgFlags;            /*0x07 */
  78        U8 VP_ID;               /*0x08 */
  79        U8 VF_ID;               /*0x09 */
  80        U16 Reserved4;          /*0x0A */
  81        U16 Reserved5;          /*0x0C */
  82        U16 IOCStatus;          /*0x0E */
  83        U32 IOCLogInfo;         /*0x10 */
  84} MPI2_TOOLBOX_REPLY, *PTR_MPI2_TOOLBOX_REPLY,
  85        Mpi2ToolboxReply_t, *pMpi2ToolboxReply_t;
  86
  87/****************************************************************************
  88* Toolbox Clean Tool request
  89****************************************************************************/
  90
  91typedef struct _MPI2_TOOLBOX_CLEAN_REQUEST {
  92        U8 Tool;                /*0x00 */
  93        U8 Reserved1;           /*0x01 */
  94        U8 ChainOffset;         /*0x02 */
  95        U8 Function;            /*0x03 */
  96        U16 Reserved2;          /*0x04 */
  97        U8 Reserved3;           /*0x06 */
  98        U8 MsgFlags;            /*0x07 */
  99        U8 VP_ID;               /*0x08 */
 100        U8 VF_ID;               /*0x09 */
 101        U16 Reserved4;          /*0x0A */
 102        U32 Flags;              /*0x0C */
 103} MPI2_TOOLBOX_CLEAN_REQUEST, *PTR_MPI2_TOOLBOX_CLEAN_REQUEST,
 104        Mpi2ToolboxCleanRequest_t, *pMpi2ToolboxCleanRequest_t;
 105
 106/*values for the Flags field */
 107#define MPI2_TOOLBOX_CLEAN_BOOT_SERVICES            (0x80000000)
 108#define MPI2_TOOLBOX_CLEAN_PERSIST_MANUFACT_PAGES   (0x40000000)
 109#define MPI2_TOOLBOX_CLEAN_OTHER_PERSIST_PAGES      (0x20000000)
 110#define MPI2_TOOLBOX_CLEAN_FW_CURRENT               (0x10000000)
 111#define MPI2_TOOLBOX_CLEAN_FW_BACKUP                (0x08000000)
 112#define MPI2_TOOLBOX_CLEAN_BIT26_PRODUCT_SPECIFIC   (0x04000000)
 113#define MPI2_TOOLBOX_CLEAN_MEGARAID                 (0x02000000)
 114#define MPI2_TOOLBOX_CLEAN_INITIALIZATION           (0x01000000)
 115#define MPI2_TOOLBOX_CLEAN_SBR                      (0x00800000)
 116#define MPI2_TOOLBOX_CLEAN_SBR_BACKUP               (0x00400000)
 117#define MPI2_TOOLBOX_CLEAN_HIIM                     (0x00200000)
 118#define MPI2_TOOLBOX_CLEAN_HIIA                     (0x00100000)
 119#define MPI2_TOOLBOX_CLEAN_CTLR                     (0x00080000)
 120#define MPI2_TOOLBOX_CLEAN_IMR_FIRMWARE             (0x00040000)
 121#define MPI2_TOOLBOX_CLEAN_MR_NVDATA                (0x00020000)
 122#define MPI2_TOOLBOX_CLEAN_RESERVED_5_16            (0x0001FFE0)
 123#define MPI2_TOOLBOX_CLEAN_ALL_BUT_MPB              (0x00000010)
 124#define MPI2_TOOLBOX_CLEAN_ENTIRE_FLASH             (0x00000008)
 125#define MPI2_TOOLBOX_CLEAN_FLASH                    (0x00000004)
 126#define MPI2_TOOLBOX_CLEAN_SEEPROM                  (0x00000002)
 127#define MPI2_TOOLBOX_CLEAN_NVSRAM                   (0x00000001)
 128
 129/****************************************************************************
 130* Toolbox Memory Move request
 131****************************************************************************/
 132
 133typedef struct _MPI2_TOOLBOX_MEM_MOVE_REQUEST {
 134        U8 Tool;                /*0x00 */
 135        U8 Reserved1;           /*0x01 */
 136        U8 ChainOffset;         /*0x02 */
 137        U8 Function;            /*0x03 */
 138        U16 Reserved2;          /*0x04 */
 139        U8 Reserved3;           /*0x06 */
 140        U8 MsgFlags;            /*0x07 */
 141        U8 VP_ID;               /*0x08 */
 142        U8 VF_ID;               /*0x09 */
 143        U16 Reserved4;          /*0x0A */
 144        MPI2_SGE_SIMPLE_UNION SGL;      /*0x0C */
 145} MPI2_TOOLBOX_MEM_MOVE_REQUEST, *PTR_MPI2_TOOLBOX_MEM_MOVE_REQUEST,
 146        Mpi2ToolboxMemMoveRequest_t, *pMpi2ToolboxMemMoveRequest_t;
 147
 148/****************************************************************************
 149* Toolbox Diagnostic Data Upload request
 150****************************************************************************/
 151
 152typedef struct _MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST {
 153        U8 Tool;                /*0x00 */
 154        U8 Reserved1;           /*0x01 */
 155        U8 ChainOffset;         /*0x02 */
 156        U8 Function;            /*0x03 */
 157        U16 Reserved2;          /*0x04 */
 158        U8 Reserved3;           /*0x06 */
 159        U8 MsgFlags;            /*0x07 */
 160        U8 VP_ID;               /*0x08 */
 161        U8 VF_ID;               /*0x09 */
 162        U16 Reserved4;          /*0x0A */
 163        U8 SGLFlags;            /*0x0C */
 164        U8 Reserved5;           /*0x0D */
 165        U16 Reserved6;          /*0x0E */
 166        U32 Flags;              /*0x10 */
 167        U32 DataLength;         /*0x14 */
 168        MPI2_SGE_SIMPLE_UNION SGL;      /*0x18 */
 169} MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST,
 170        *PTR_MPI2_TOOLBOX_DIAG_DATA_UPLOAD_REQUEST,
 171        Mpi2ToolboxDiagDataUploadRequest_t,
 172        *pMpi2ToolboxDiagDataUploadRequest_t;
 173
 174/*use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
 175
 176typedef struct _MPI2_DIAG_DATA_UPLOAD_HEADER {
 177        U32 DiagDataLength;     /*00h */
 178        U8 FormatCode;          /*04h */
 179        U8 Reserved1;           /*05h */
 180        U16 Reserved2;          /*06h */
 181} MPI2_DIAG_DATA_UPLOAD_HEADER, *PTR_MPI2_DIAG_DATA_UPLOAD_HEADER,
 182        Mpi2DiagDataUploadHeader_t, *pMpi2DiagDataUploadHeader_t;
 183
 184/****************************************************************************
 185* Toolbox ISTWI Read Write Tool
 186****************************************************************************/
 187
 188/*Toolbox ISTWI Read Write Tool request message */
 189typedef struct _MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST {
 190        U8 Tool;                /*0x00 */
 191        U8 Reserved1;           /*0x01 */
 192        U8 ChainOffset;         /*0x02 */
 193        U8 Function;            /*0x03 */
 194        U16 Reserved2;          /*0x04 */
 195        U8 Reserved3;           /*0x06 */
 196        U8 MsgFlags;            /*0x07 */
 197        U8 VP_ID;               /*0x08 */
 198        U8 VF_ID;               /*0x09 */
 199        U16 Reserved4;          /*0x0A */
 200        U32 Reserved5;          /*0x0C */
 201        U32 Reserved6;          /*0x10 */
 202        U8 DevIndex;            /*0x14 */
 203        U8 Action;              /*0x15 */
 204        U8 SGLFlags;            /*0x16 */
 205        U8 Flags;               /*0x17 */
 206        U16 TxDataLength;       /*0x18 */
 207        U16 RxDataLength;       /*0x1A */
 208        U32 Reserved8;          /*0x1C */
 209        U32 Reserved9;          /*0x20 */
 210        U32 Reserved10;         /*0x24 */
 211        U32 Reserved11;         /*0x28 */
 212        U32 Reserved12;         /*0x2C */
 213        MPI2_SGE_SIMPLE_UNION SGL;      /*0x30 */
 214} MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST,
 215        *PTR_MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST,
 216        Mpi2ToolboxIstwiReadWriteRequest_t,
 217        *pMpi2ToolboxIstwiReadWriteRequest_t;
 218
 219/*values for the Action field */
 220#define MPI2_TOOL_ISTWI_ACTION_READ_DATA            (0x01)
 221#define MPI2_TOOL_ISTWI_ACTION_WRITE_DATA           (0x02)
 222#define MPI2_TOOL_ISTWI_ACTION_SEQUENCE             (0x03)
 223#define MPI2_TOOL_ISTWI_ACTION_RESERVE_BUS          (0x10)
 224#define MPI2_TOOL_ISTWI_ACTION_RELEASE_BUS          (0x11)
 225#define MPI2_TOOL_ISTWI_ACTION_RESET                (0x12)
 226
 227/*use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
 228
 229/*values for the Flags field */
 230#define MPI2_TOOL_ISTWI_FLAG_AUTO_RESERVE_RELEASE   (0x80)
 231#define MPI2_TOOL_ISTWI_FLAG_PAGE_ADDR_MASK         (0x07)
 232
 233/*MPI26 TOOLBOX Request MsgFlags defines */
 234#define MPI26_TOOL_ISTWI_MSGFLG_ADDR_MASK           (0x01)
 235/*Request uses Man Page 43 device index addressing */
 236#define MPI26_TOOL_ISTWI_MSGFLG_ADDR_INDEX          (0x00)
 237/*Request uses Man Page 43 device info struct addressing */
 238#define MPI26_TOOL_ISTWI_MSGFLG_ADDR_INFO           (0x01)
 239
 240/*Toolbox ISTWI Read Write Tool reply message */
 241typedef struct _MPI2_TOOLBOX_ISTWI_REPLY {
 242        U8 Tool;                /*0x00 */
 243        U8 Reserved1;           /*0x01 */
 244        U8 MsgLength;           /*0x02 */
 245        U8 Function;            /*0x03 */
 246        U16 Reserved2;          /*0x04 */
 247        U8 Reserved3;           /*0x06 */
 248        U8 MsgFlags;            /*0x07 */
 249        U8 VP_ID;               /*0x08 */
 250        U8 VF_ID;               /*0x09 */
 251        U16 Reserved4;          /*0x0A */
 252        U16 Reserved5;          /*0x0C */
 253        U16 IOCStatus;          /*0x0E */
 254        U32 IOCLogInfo;         /*0x10 */
 255        U8 DevIndex;            /*0x14 */
 256        U8 Action;              /*0x15 */
 257        U8 IstwiStatus;         /*0x16 */
 258        U8 Reserved6;           /*0x17 */
 259        U16 TxDataCount;        /*0x18 */
 260        U16 RxDataCount;        /*0x1A */
 261} MPI2_TOOLBOX_ISTWI_REPLY, *PTR_MPI2_TOOLBOX_ISTWI_REPLY,
 262        Mpi2ToolboxIstwiReply_t, *pMpi2ToolboxIstwiReply_t;
 263
 264/****************************************************************************
 265* Toolbox Beacon Tool request
 266****************************************************************************/
 267
 268typedef struct _MPI2_TOOLBOX_BEACON_REQUEST {
 269        U8 Tool;                /*0x00 */
 270        U8 Reserved1;           /*0x01 */
 271        U8 ChainOffset;         /*0x02 */
 272        U8 Function;            /*0x03 */
 273        U16 Reserved2;          /*0x04 */
 274        U8 Reserved3;           /*0x06 */
 275        U8 MsgFlags;            /*0x07 */
 276        U8 VP_ID;               /*0x08 */
 277        U8 VF_ID;               /*0x09 */
 278        U16 Reserved4;          /*0x0A */
 279        U8 Reserved5;           /*0x0C */
 280        U8 PhysicalPort;        /*0x0D */
 281        U8 Reserved6;           /*0x0E */
 282        U8 Flags;               /*0x0F */
 283} MPI2_TOOLBOX_BEACON_REQUEST, *PTR_MPI2_TOOLBOX_BEACON_REQUEST,
 284        Mpi2ToolboxBeaconRequest_t, *pMpi2ToolboxBeaconRequest_t;
 285
 286/*values for the Flags field */
 287#define MPI2_TOOLBOX_FLAGS_BEACONMODE_OFF       (0x00)
 288#define MPI2_TOOLBOX_FLAGS_BEACONMODE_ON        (0x01)
 289
 290/****************************************************************************
 291* Toolbox Diagnostic CLI Tool
 292****************************************************************************/
 293
 294#define MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH    (0x5C)
 295
 296/*MPI v2.0 Toolbox Diagnostic CLI Tool request message */
 297typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST {
 298        U8 Tool;                /*0x00 */
 299        U8 Reserved1;           /*0x01 */
 300        U8 ChainOffset;         /*0x02 */
 301        U8 Function;            /*0x03 */
 302        U16 Reserved2;          /*0x04 */
 303        U8 Reserved3;           /*0x06 */
 304        U8 MsgFlags;            /*0x07 */
 305        U8 VP_ID;               /*0x08 */
 306        U8 VF_ID;               /*0x09 */
 307        U16 Reserved4;          /*0x0A */
 308        U8 SGLFlags;            /*0x0C */
 309        U8 Reserved5;           /*0x0D */
 310        U16 Reserved6;          /*0x0E */
 311        U32 DataLength;         /*0x10 */
 312        U8 DiagnosticCliCommand[MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH];/*0x14 */
 313        MPI2_MPI_SGE_IO_UNION SGL;      /*0x70 */
 314} MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
 315        *PTR_MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
 316        Mpi2ToolboxDiagnosticCliRequest_t,
 317        *pMpi2ToolboxDiagnosticCliRequest_t;
 318
 319/*use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
 320
 321/*MPI v2.5 Toolbox Diagnostic CLI Tool request message */
 322typedef struct _MPI25_TOOLBOX_DIAGNOSTIC_CLI_REQUEST {
 323        U8 Tool;                /*0x00 */
 324        U8 Reserved1;           /*0x01 */
 325        U8 ChainOffset;         /*0x02 */
 326        U8 Function;            /*0x03 */
 327        U16 Reserved2;          /*0x04 */
 328        U8 Reserved3;           /*0x06 */
 329        U8 MsgFlags;            /*0x07 */
 330        U8 VP_ID;               /*0x08 */
 331        U8 VF_ID;               /*0x09 */
 332        U16 Reserved4;          /*0x0A */
 333        U32 Reserved5;          /*0x0C */
 334        U32 DataLength;         /*0x10 */
 335        U8 DiagnosticCliCommand[MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH];/*0x14 */
 336        MPI25_SGE_IO_UNION      SGL;                        /* 0x70 */
 337} MPI25_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
 338        *PTR_MPI25_TOOLBOX_DIAGNOSTIC_CLI_REQUEST,
 339        Mpi25ToolboxDiagnosticCliRequest_t,
 340        *pMpi25ToolboxDiagnosticCliRequest_t;
 341
 342/*Toolbox Diagnostic CLI Tool reply message */
 343typedef struct _MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY {
 344        U8 Tool;                /*0x00 */
 345        U8 Reserved1;           /*0x01 */
 346        U8 MsgLength;           /*0x02 */
 347        U8 Function;            /*0x03 */
 348        U16 Reserved2;          /*0x04 */
 349        U8 Reserved3;           /*0x06 */
 350        U8 MsgFlags;            /*0x07 */
 351        U8 VP_ID;               /*0x08 */
 352        U8 VF_ID;               /*0x09 */
 353        U16 Reserved4;          /*0x0A */
 354        U16 Reserved5;          /*0x0C */
 355        U16 IOCStatus;          /*0x0E */
 356        U32 IOCLogInfo;         /*0x10 */
 357        U32 ReturnedDataLength; /*0x14 */
 358} MPI2_TOOLBOX_DIAGNOSTIC_CLI_REPLY,
 359        *PTR_MPI2_TOOLBOX_DIAG_CLI_REPLY,
 360        Mpi2ToolboxDiagnosticCliReply_t,
 361        *pMpi2ToolboxDiagnosticCliReply_t;
 362
 363
 364/****************************************************************************
 365*  Toolbox Console Text Display Tool
 366****************************************************************************/
 367
 368/* Toolbox Console Text Display Tool request message */
 369typedef struct _MPI2_TOOLBOX_TEXT_DISPLAY_REQUEST {
 370        U8                      Tool;                   /* 0x00 */
 371        U8                      Reserved1;              /* 0x01 */
 372        U8                      ChainOffset;            /* 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        U8                      Console;                /* 0x0C */
 381        U8                      Flags;                  /* 0x0D */
 382        U16                     Reserved6;              /* 0x0E */
 383        U8                      TextToDisplay[4];       /* 0x10 */
 384} MPI2_TOOLBOX_TEXT_DISPLAY_REQUEST,
 385*PTR_MPI2_TOOLBOX_TEXT_DISPLAY_REQUEST,
 386Mpi2ToolboxTextDisplayRequest_t,
 387*pMpi2ToolboxTextDisplayRequest_t;
 388
 389/* defines for the Console field */
 390#define MPI2_TOOLBOX_CONSOLE_TYPE_MASK          (0xF0)
 391#define MPI2_TOOLBOX_CONSOLE_TYPE_DEFAULT       (0x00)
 392#define MPI2_TOOLBOX_CONSOLE_TYPE_UART          (0x10)
 393#define MPI2_TOOLBOX_CONSOLE_TYPE_ETHERNET      (0x20)
 394
 395#define MPI2_TOOLBOX_CONSOLE_NUMBER_MASK        (0x0F)
 396
 397/* defines for the Flags field */
 398#define MPI2_TOOLBOX_CONSOLE_FLAG_TIMESTAMP     (0x01)
 399
 400
 401/***************************************************************************
 402 *  Toolbox Backend Lane Margining Tool
 403 ***************************************************************************
 404 */
 405
 406/*Toolbox Backend Lane Margining Tool request message */
 407typedef struct _MPI26_TOOLBOX_LANE_MARGIN_REQUEST {
 408        U8 Tool;                        /*0x00 */
 409        U8 Reserved1;                   /*0x01 */
 410        U8 ChainOffset;                 /*0x02 */
 411        U8 Function;                    /*0x03 */
 412        U16 Reserved2;                  /*0x04 */
 413        U8 Reserved3;                   /*0x06 */
 414        U8 MsgFlags;                    /*0x07 */
 415        U8 VP_ID;                       /*0x08 */
 416        U8 VF_ID;                       /*0x09 */
 417        U16 Reserved4;                  /*0x0A */
 418        U8 Command;                     /*0x0C */
 419        U8 SwitchPort;                  /*0x0D */
 420        U16 DevHandle;                  /*0x0E */
 421        U8 RegisterOffset;              /*0x10 */
 422        U8 Reserved5;                   /*0x11 */
 423        U16 DataLength;                 /*0x12 */
 424        MPI25_SGE_IO_UNION SGL;         /*0x14 */
 425} MPI26_TOOLBOX_LANE_MARGINING_REQUEST,
 426        *PTR_MPI2_TOOLBOX_LANE_MARGINING_REQUEST,
 427        Mpi26ToolboxLaneMarginingRequest_t,
 428        *pMpi2ToolboxLaneMarginingRequest_t;
 429
 430/* defines for the Command field */
 431#define MPI26_TOOL_MARGIN_COMMAND_ENTER_MARGIN_MODE        (0x01)
 432#define MPI26_TOOL_MARGIN_COMMAND_READ_REGISTER_DATA       (0x02)
 433#define MPI26_TOOL_MARGIN_COMMAND_WRITE_REGISTER_DATA      (0x03)
 434#define MPI26_TOOL_MARGIN_COMMAND_EXIT_MARGIN_MODE         (0x04)
 435
 436
 437/*Toolbox Backend Lane Margining Tool reply message */
 438typedef struct _MPI26_TOOLBOX_LANE_MARGIN_REPLY {
 439        U8 Tool;                        /*0x00 */
 440        U8 Reserved1;                   /*0x01 */
 441        U8 MsgLength;                   /*0x02 */
 442        U8 Function;                    /*0x03 */
 443        U16 Reserved2;                  /*0x04 */
 444        U8 Reserved3;                   /*0x06 */
 445        U8 MsgFlags;                    /*0x07 */
 446        U8 VP_ID;                       /*0x08 */
 447        U8 VF_ID;                       /*0x09 */
 448        U16 Reserved4;                  /*0x0A */
 449        U16 Reserved5;                  /*0x0C */
 450        U16 IOCStatus;                  /*0x0E */
 451        U32 IOCLogInfo;                 /*0x10 */
 452        U16 ReturnedDataLength;         /*0x14 */
 453        U16 Reserved6;                  /*0x16 */
 454} MPI26_TOOLBOX_LANE_MARGINING_REPLY,
 455        *PTR_MPI26_TOOLBOX_LANE_MARGINING_REPLY,
 456        Mpi26ToolboxLaneMarginingReply_t,
 457        *pMpi26ToolboxLaneMarginingReply_t;
 458
 459
 460/*****************************************************************************
 461*
 462*      Diagnostic Buffer Messages
 463*
 464*****************************************************************************/
 465
 466/****************************************************************************
 467* Diagnostic Buffer Post request
 468****************************************************************************/
 469
 470typedef struct _MPI2_DIAG_BUFFER_POST_REQUEST {
 471        U8 ExtendedType;        /*0x00 */
 472        U8 BufferType;          /*0x01 */
 473        U8 ChainOffset;         /*0x02 */
 474        U8 Function;            /*0x03 */
 475        U16 Reserved2;          /*0x04 */
 476        U8 Reserved3;           /*0x06 */
 477        U8 MsgFlags;            /*0x07 */
 478        U8 VP_ID;               /*0x08 */
 479        U8 VF_ID;               /*0x09 */
 480        U16 Reserved4;          /*0x0A */
 481        U64 BufferAddress;      /*0x0C */
 482        U32 BufferLength;       /*0x14 */
 483        U32 Reserved5;          /*0x18 */
 484        U32 Reserved6;          /*0x1C */
 485        U32 Flags;              /*0x20 */
 486        U32 ProductSpecific[23];        /*0x24 */
 487} MPI2_DIAG_BUFFER_POST_REQUEST, *PTR_MPI2_DIAG_BUFFER_POST_REQUEST,
 488        Mpi2DiagBufferPostRequest_t, *pMpi2DiagBufferPostRequest_t;
 489
 490/*values for the ExtendedType field */
 491#define MPI2_DIAG_EXTENDED_TYPE_UTILIZATION         (0x02)
 492
 493/*values for the BufferType field */
 494#define MPI2_DIAG_BUF_TYPE_TRACE                    (0x00)
 495#define MPI2_DIAG_BUF_TYPE_SNAPSHOT                 (0x01)
 496#define MPI2_DIAG_BUF_TYPE_EXTENDED                 (0x02)
 497/*count of the number of buffer types */
 498#define MPI2_DIAG_BUF_TYPE_COUNT                    (0x03)
 499
 500/*values for the Flags field */
 501#define MPI2_DIAG_BUF_FLAG_RELEASE_ON_FULL          (0x00000002)
 502#define MPI2_DIAG_BUF_FLAG_IMMEDIATE_RELEASE        (0x00000001)
 503
 504/****************************************************************************
 505* Diagnostic Buffer Post reply
 506****************************************************************************/
 507
 508typedef struct _MPI2_DIAG_BUFFER_POST_REPLY {
 509        U8 ExtendedType;        /*0x00 */
 510        U8 BufferType;          /*0x01 */
 511        U8 MsgLength;           /*0x02 */
 512        U8 Function;            /*0x03 */
 513        U16 Reserved2;          /*0x04 */
 514        U8 Reserved3;           /*0x06 */
 515        U8 MsgFlags;            /*0x07 */
 516        U8 VP_ID;               /*0x08 */
 517        U8 VF_ID;               /*0x09 */
 518        U16 Reserved4;          /*0x0A */
 519        U16 Reserved5;          /*0x0C */
 520        U16 IOCStatus;          /*0x0E */
 521        U32 IOCLogInfo;         /*0x10 */
 522        U32 TransferLength;     /*0x14 */
 523} MPI2_DIAG_BUFFER_POST_REPLY, *PTR_MPI2_DIAG_BUFFER_POST_REPLY,
 524        Mpi2DiagBufferPostReply_t, *pMpi2DiagBufferPostReply_t;
 525
 526/****************************************************************************
 527* Diagnostic Release request
 528****************************************************************************/
 529
 530typedef struct _MPI2_DIAG_RELEASE_REQUEST {
 531        U8 Reserved1;           /*0x00 */
 532        U8 BufferType;          /*0x01 */
 533        U8 ChainOffset;         /*0x02 */
 534        U8 Function;            /*0x03 */
 535        U16 Reserved2;          /*0x04 */
 536        U8 Reserved3;           /*0x06 */
 537        U8 MsgFlags;            /*0x07 */
 538        U8 VP_ID;               /*0x08 */
 539        U8 VF_ID;               /*0x09 */
 540        U16 Reserved4;          /*0x0A */
 541} MPI2_DIAG_RELEASE_REQUEST, *PTR_MPI2_DIAG_RELEASE_REQUEST,
 542        Mpi2DiagReleaseRequest_t, *pMpi2DiagReleaseRequest_t;
 543
 544/****************************************************************************
 545* Diagnostic Buffer Post reply
 546****************************************************************************/
 547
 548typedef struct _MPI2_DIAG_RELEASE_REPLY {
 549        U8 Reserved1;           /*0x00 */
 550        U8 BufferType;          /*0x01 */
 551        U8 MsgLength;           /*0x02 */
 552        U8 Function;            /*0x03 */
 553        U16 Reserved2;          /*0x04 */
 554        U8 Reserved3;           /*0x06 */
 555        U8 MsgFlags;            /*0x07 */
 556        U8 VP_ID;               /*0x08 */
 557        U8 VF_ID;               /*0x09 */
 558        U16 Reserved4;          /*0x0A */
 559        U16 Reserved5;          /*0x0C */
 560        U16 IOCStatus;          /*0x0E */
 561        U32 IOCLogInfo;         /*0x10 */
 562} MPI2_DIAG_RELEASE_REPLY, *PTR_MPI2_DIAG_RELEASE_REPLY,
 563        Mpi2DiagReleaseReply_t, *pMpi2DiagReleaseReply_t;
 564
 565#endif
 566