drivers/scsi/mpt3sas/mpi/mpi2_tool.h

Source file repositories/reference/linux-study-clean/drivers/scsi/mpt3sas/mpi/mpi2_tool.h

File Facts

System
Linux kernel
Corpus path
drivers/scsi/mpt3sas/mpi/mpi2_tool.h
Extension
.h
Size
20155 bytes
Lines
566
Domain
Driver Families
Bucket
drivers/scsi
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef MPI2_TOOL_H
#define MPI2_TOOL_H

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

/*defines for the Tools */
#define MPI2_TOOLBOX_CLEAN_TOOL                     (0x00)
#define MPI2_TOOLBOX_MEMORY_MOVE_TOOL               (0x01)
#define MPI2_TOOLBOX_DIAG_DATA_UPLOAD_TOOL          (0x02)
#define MPI2_TOOLBOX_ISTWI_READ_WRITE_TOOL          (0x03)
#define MPI2_TOOLBOX_BEACON_TOOL                    (0x05)
#define MPI2_TOOLBOX_DIAGNOSTIC_CLI_TOOL            (0x06)
#define MPI2_TOOLBOX_TEXT_DISPLAY_TOOL              (0x07)
#define MPI26_TOOLBOX_BACKEND_PCIE_LANE_MARGIN      (0x08)

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

typedef struct _MPI2_TOOLBOX_REPLY {
	U8 Tool;		/*0x00 */
	U8 Reserved1;		/*0x01 */
	U8 MsgLength;		/*0x02 */
	U8 Function;		/*0x03 */
	U16 Reserved2;		/*0x04 */
	U8 Reserved3;		/*0x06 */
	U8 MsgFlags;		/*0x07 */
	U8 VP_ID;		/*0x08 */
	U8 VF_ID;		/*0x09 */
	U16 Reserved4;		/*0x0A */
	U16 Reserved5;		/*0x0C */
	U16 IOCStatus;		/*0x0E */
	U32 IOCLogInfo;		/*0x10 */
} MPI2_TOOLBOX_REPLY, *PTR_MPI2_TOOLBOX_REPLY,
	Mpi2ToolboxReply_t, *pMpi2ToolboxReply_t;

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

typedef struct _MPI2_TOOLBOX_CLEAN_REQUEST {
	U8 Tool;		/*0x00 */
	U8 Reserved1;		/*0x01 */
	U8 ChainOffset;		/*0x02 */
	U8 Function;		/*0x03 */
	U16 Reserved2;		/*0x04 */
	U8 Reserved3;		/*0x06 */
	U8 MsgFlags;		/*0x07 */
	U8 VP_ID;		/*0x08 */
	U8 VF_ID;		/*0x09 */
	U16 Reserved4;		/*0x0A */
	U32 Flags;		/*0x0C */
} MPI2_TOOLBOX_CLEAN_REQUEST, *PTR_MPI2_TOOLBOX_CLEAN_REQUEST,
	Mpi2ToolboxCleanRequest_t, *pMpi2ToolboxCleanRequest_t;

/*values for the Flags field */
#define MPI2_TOOLBOX_CLEAN_BOOT_SERVICES            (0x80000000)
#define MPI2_TOOLBOX_CLEAN_PERSIST_MANUFACT_PAGES   (0x40000000)
#define MPI2_TOOLBOX_CLEAN_OTHER_PERSIST_PAGES      (0x20000000)
#define MPI2_TOOLBOX_CLEAN_FW_CURRENT               (0x10000000)
#define MPI2_TOOLBOX_CLEAN_FW_BACKUP                (0x08000000)
#define MPI2_TOOLBOX_CLEAN_BIT26_PRODUCT_SPECIFIC   (0x04000000)
#define MPI2_TOOLBOX_CLEAN_MEGARAID                 (0x02000000)
#define MPI2_TOOLBOX_CLEAN_INITIALIZATION           (0x01000000)
#define MPI2_TOOLBOX_CLEAN_SBR                      (0x00800000)
#define MPI2_TOOLBOX_CLEAN_SBR_BACKUP               (0x00400000)
#define MPI2_TOOLBOX_CLEAN_HIIM                     (0x00200000)
#define MPI2_TOOLBOX_CLEAN_HIIA                     (0x00100000)
#define MPI2_TOOLBOX_CLEAN_CTLR                     (0x00080000)
#define MPI2_TOOLBOX_CLEAN_IMR_FIRMWARE             (0x00040000)
#define MPI2_TOOLBOX_CLEAN_MR_NVDATA                (0x00020000)
#define MPI2_TOOLBOX_CLEAN_RESERVED_5_16            (0x0001FFE0)
#define MPI2_TOOLBOX_CLEAN_ALL_BUT_MPB              (0x00000010)
#define MPI2_TOOLBOX_CLEAN_ENTIRE_FLASH             (0x00000008)
#define MPI2_TOOLBOX_CLEAN_FLASH                    (0x00000004)
#define MPI2_TOOLBOX_CLEAN_SEEPROM                  (0x00000002)
#define MPI2_TOOLBOX_CLEAN_NVSRAM                   (0x00000001)

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

typedef struct _MPI2_TOOLBOX_MEM_MOVE_REQUEST {
	U8 Tool;		/*0x00 */
	U8 Reserved1;		/*0x01 */
	U8 ChainOffset;		/*0x02 */

Annotation

Implementation Notes