linux/drivers/scsi/mpt3sas/mpi/mpi2_tool.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright 2000-2020 Broadcom Inc. All rights reserved.
 *
 *
 *          Name:  mpi2_tool.h
 *         Title:  MPI diagnostic tool structures and definitions
 * Creation Date:  March 26, 2007
 *
 *   mpi2_tool.h Version:  02.00.16
 *
 * Version History
 * ---------------
 *
 * Date      Version   Description
 * --------  --------  ------------------------------------------------------
 * 04-30-07  02.00.00  Corresponds to Fusion-MPT MPI Specification Rev A.
 * 12-18-07  02.00.01  Added Diagnostic Buffer Post and Diagnostic Release
 *                     structures and defines.
 * 02-29-08  02.00.02  Modified various names to make them 32-character unique.
 * 05-06-09  02.00.03  Added ISTWI Read Write Tool and Diagnostic CLI Tool.
 * 07-30-09  02.00.04  Added ExtendedType field to DiagnosticBufferPost request
 *                     and reply messages.
 *                     Added MPI2_DIAG_BUF_TYPE_EXTENDED.
 *                     Incremented MPI2_DIAG_BUF_TYPE_COUNT.
 * 05-12-10  02.00.05  Added Diagnostic Data Upload tool.
 * 08-11-10  02.00.06  Added defines that were missing for Diagnostic Buffer
 *                     Post Request.
 * 05-25-11  02.00.07  Added Flags field and related defines to
 *                     MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST.
 * 11-18-11  02.00.08  Incorporating additions for MPI v2.5.
 * 07-10-12  02.00.09  Add MPI v2.5 Toolbox Diagnostic CLI Tool Request
 *                     message.
 * 07-26-12  02.00.10  Modified MPI2_TOOLBOX_DIAGNOSTIC_CLI_REQUEST so that
 *                     it uses MPI Chain SGE as well as MPI Simple SGE.
 * 08-19-13  02.00.11  Added MPI2_TOOLBOX_TEXT_DISPLAY_TOOL and related info.
 * 01-08-14  02.00.12  Added MPI2_TOOLBOX_CLEAN_BIT26_PRODUCT_SPECIFIC.
 * 11-18-14  02.00.13  Updated copyright information.
 * 08-25-16  02.00.14  Added new values for the Flags field of Toolbox Clean
 *                     Tool Request Message.
 * 07-22-18  02.00.15  Added defines for new TOOLBOX_PCIE_LANE_MARGINING tool.
 *                     Added option for DeviceInfo field in ISTWI tool.
 * 12-17-18  02.00.16  Shorten some defines to be compatible with DOS.
 * --------------------------------------------------------------------------
 */

#ifndef MPI2_TOOL_H
#define MPI2_TOOL_H

/*****************************************************************************
*
*              Toolbox Messages
*
*****************************************************************************/

/*defines for the Tools */
#define MPI2_TOOLBOX_CLEAN_TOOL
#define MPI2_TOOLBOX_MEMORY_MOVE_TOOL
#define MPI2_TOOLBOX_DIAG_DATA_UPLOAD_TOOL
#define MPI2_TOOLBOX_ISTWI_READ_WRITE_TOOL
#define MPI2_TOOLBOX_BEACON_TOOL
#define MPI2_TOOLBOX_DIAGNOSTIC_CLI_TOOL
#define MPI2_TOOLBOX_TEXT_DISPLAY_TOOL
#define MPI26_TOOLBOX_BACKEND_PCIE_LANE_MARGIN

/****************************************************************************
* Toolbox reply
****************************************************************************/

pMpi2ToolboxReply_t;

/****************************************************************************
* Toolbox Clean Tool request
****************************************************************************/

pMpi2ToolboxCleanRequest_t;

/*values for the Flags field */
#define MPI2_TOOLBOX_CLEAN_BOOT_SERVICES
#define MPI2_TOOLBOX_CLEAN_PERSIST_MANUFACT_PAGES
#define MPI2_TOOLBOX_CLEAN_OTHER_PERSIST_PAGES
#define MPI2_TOOLBOX_CLEAN_FW_CURRENT
#define MPI2_TOOLBOX_CLEAN_FW_BACKUP
#define MPI2_TOOLBOX_CLEAN_BIT26_PRODUCT_SPECIFIC
#define MPI2_TOOLBOX_CLEAN_MEGARAID
#define MPI2_TOOLBOX_CLEAN_INITIALIZATION
#define MPI2_TOOLBOX_CLEAN_SBR
#define MPI2_TOOLBOX_CLEAN_SBR_BACKUP
#define MPI2_TOOLBOX_CLEAN_HIIM
#define MPI2_TOOLBOX_CLEAN_HIIA
#define MPI2_TOOLBOX_CLEAN_CTLR
#define MPI2_TOOLBOX_CLEAN_IMR_FIRMWARE
#define MPI2_TOOLBOX_CLEAN_MR_NVDATA
#define MPI2_TOOLBOX_CLEAN_RESERVED_5_16
#define MPI2_TOOLBOX_CLEAN_ALL_BUT_MPB
#define MPI2_TOOLBOX_CLEAN_ENTIRE_FLASH
#define MPI2_TOOLBOX_CLEAN_FLASH
#define MPI2_TOOLBOX_CLEAN_SEEPROM
#define MPI2_TOOLBOX_CLEAN_NVSRAM

/****************************************************************************
* Toolbox Memory Move request
****************************************************************************/

pMpi2ToolboxMemMoveRequest_t;

/****************************************************************************
* Toolbox Diagnostic Data Upload request
****************************************************************************/

pMpi2ToolboxDiagDataUploadRequest_t;

/*use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */

pMpi2DiagDataUploadHeader_t;

/****************************************************************************
* Toolbox ISTWI Read Write Tool
****************************************************************************/

/*Toolbox ISTWI Read Write Tool request message */
pMpi2ToolboxIstwiReadWriteRequest_t;

/*values for the Action field */
#define MPI2_TOOL_ISTWI_ACTION_READ_DATA
#define MPI2_TOOL_ISTWI_ACTION_WRITE_DATA
#define MPI2_TOOL_ISTWI_ACTION_SEQUENCE
#define MPI2_TOOL_ISTWI_ACTION_RESERVE_BUS
#define MPI2_TOOL_ISTWI_ACTION_RELEASE_BUS
#define MPI2_TOOL_ISTWI_ACTION_RESET

/*use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */

/*values for the Flags field */
#define MPI2_TOOL_ISTWI_FLAG_AUTO_RESERVE_RELEASE
#define MPI2_TOOL_ISTWI_FLAG_PAGE_ADDR_MASK

/*MPI26 TOOLBOX Request MsgFlags defines */
#define MPI26_TOOL_ISTWI_MSGFLG_ADDR_MASK
/*Request uses Man Page 43 device index addressing */
#define MPI26_TOOL_ISTWI_MSGFLG_ADDR_INDEX
/*Request uses Man Page 43 device info struct addressing */
#define MPI26_TOOL_ISTWI_MSGFLG_ADDR_INFO

/*Toolbox ISTWI Read Write Tool reply message */
pMpi2ToolboxIstwiReply_t;

/****************************************************************************
* Toolbox Beacon Tool request
****************************************************************************/

pMpi2ToolboxBeaconRequest_t;

/*values for the Flags field */
#define MPI2_TOOLBOX_FLAGS_BEACONMODE_OFF
#define MPI2_TOOLBOX_FLAGS_BEACONMODE_ON

/****************************************************************************
* Toolbox Diagnostic CLI Tool
****************************************************************************/

#define MPI2_TOOLBOX_DIAG_CLI_CMD_LENGTH

/*MPI v2.0 Toolbox Diagnostic CLI Tool request message */
pMpi2ToolboxDiagnosticCliRequest_t;

/*use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */

/*MPI v2.5 Toolbox Diagnostic CLI Tool request message */
pMpi25ToolboxDiagnosticCliRequest_t;

/*Toolbox Diagnostic CLI Tool reply message */
pMpi2ToolboxDiagnosticCliReply_t;


/****************************************************************************
*  Toolbox Console Text Display Tool
****************************************************************************/

/* Toolbox Console Text Display Tool request message */
pMpi2ToolboxTextDisplayRequest_t;

/* defines for the Console field */
#define MPI2_TOOLBOX_CONSOLE_TYPE_MASK
#define MPI2_TOOLBOX_CONSOLE_TYPE_DEFAULT
#define MPI2_TOOLBOX_CONSOLE_TYPE_UART
#define MPI2_TOOLBOX_CONSOLE_TYPE_ETHERNET

#define MPI2_TOOLBOX_CONSOLE_NUMBER_MASK

/* defines for the Flags field */
#define MPI2_TOOLBOX_CONSOLE_FLAG_TIMESTAMP


/***************************************************************************
 *  Toolbox Backend Lane Margining Tool
 ***************************************************************************
 */

/*Toolbox Backend Lane Margining Tool request message */
pMpi2ToolboxLaneMarginingRequest_t;

/* defines for the Command field */
#define MPI26_TOOL_MARGIN_COMMAND_ENTER_MARGIN_MODE
#define MPI26_TOOL_MARGIN_COMMAND_READ_REGISTER_DATA
#define MPI26_TOOL_MARGIN_COMMAND_WRITE_REGISTER_DATA
#define MPI26_TOOL_MARGIN_COMMAND_EXIT_MARGIN_MODE


/*Toolbox Backend Lane Margining Tool reply message */
pMpi26ToolboxLaneMarginingReply_t;


/*****************************************************************************
*
*      Diagnostic Buffer Messages
*
*****************************************************************************/

/****************************************************************************
* Diagnostic Buffer Post request
****************************************************************************/

pMpi2DiagBufferPostRequest_t;

/*values for the ExtendedType field */
#define MPI2_DIAG_EXTENDED_TYPE_UTILIZATION

/*values for the BufferType field */
#define MPI2_DIAG_BUF_TYPE_TRACE
#define MPI2_DIAG_BUF_TYPE_SNAPSHOT
#define MPI2_DIAG_BUF_TYPE_EXTENDED
/*count of the number of buffer types */
#define MPI2_DIAG_BUF_TYPE_COUNT

/*values for the Flags field */
#define MPI2_DIAG_BUF_FLAG_RELEASE_ON_FULL
#define MPI2_DIAG_BUF_FLAG_IMMEDIATE_RELEASE

/****************************************************************************
* Diagnostic Buffer Post reply
****************************************************************************/

pMpi2DiagBufferPostReply_t;

/****************************************************************************
* Diagnostic Release request
****************************************************************************/

pMpi2DiagReleaseRequest_t;

/****************************************************************************
* Diagnostic Buffer Post reply
****************************************************************************/

pMpi2DiagReleaseReply_t;

#endif