aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mpt3sas/mpi/mpi2_tool.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/mpt3sas/mpi/mpi2_tool.h')
-rw-r--r--drivers/scsi/mpt3sas/mpi/mpi2_tool.h72
1 files changed, 70 insertions, 2 deletions
diff --git a/drivers/scsi/mpt3sas/mpi/mpi2_tool.h b/drivers/scsi/mpt3sas/mpi/mpi2_tool.h
index 629296ee9236..3f966b6796b3 100644
--- a/drivers/scsi/mpt3sas/mpi/mpi2_tool.h
+++ b/drivers/scsi/mpt3sas/mpi/mpi2_tool.h
@@ -1,13 +1,13 @@
1/* SPDX-License-Identifier: GPL-2.0 */ 1/* SPDX-License-Identifier: GPL-2.0 */
2/* 2/*
3 * Copyright 2000-2014 Avago Technologies. All rights reserved. 3 * Copyright 2000-2020 Broadcom Inc. All rights reserved.
4 * 4 *
5 * 5 *
6 * Name: mpi2_tool.h 6 * Name: mpi2_tool.h
7 * Title: MPI diagnostic tool structures and definitions 7 * Title: MPI diagnostic tool structures and definitions
8 * Creation Date: March 26, 2007 8 * Creation Date: March 26, 2007
9 * 9 *
10 * mpi2_tool.h Version: 02.00.14 10 * mpi2_tool.h Version: 02.00.15
11 * 11 *
12 * Version History 12 * Version History
13 * --------------- 13 * ---------------
@@ -38,6 +38,8 @@
38 * 11-18-14 02.00.13 Updated copyright information. 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 39 * 08-25-16 02.00.14 Added new values for the Flags field of Toolbox Clean
40 * Tool Request Message. 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.
41 * -------------------------------------------------------------------------- 43 * --------------------------------------------------------------------------
42 */ 44 */
43 45
@@ -58,6 +60,7 @@
58#define MPI2_TOOLBOX_BEACON_TOOL (0x05) 60#define MPI2_TOOLBOX_BEACON_TOOL (0x05)
59#define MPI2_TOOLBOX_DIAGNOSTIC_CLI_TOOL (0x06) 61#define MPI2_TOOLBOX_DIAGNOSTIC_CLI_TOOL (0x06)
60#define MPI2_TOOLBOX_TEXT_DISPLAY_TOOL (0x07) 62#define MPI2_TOOLBOX_TEXT_DISPLAY_TOOL (0x07)
63#define MPI26_TOOLBOX_BACKEND_PCIE_LANE_MARGIN (0x08)
61 64
62/**************************************************************************** 65/****************************************************************************
63* Toolbox reply 66* Toolbox reply
@@ -226,6 +229,13 @@ typedef struct _MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST {
226#define MPI2_TOOL_ISTWI_FLAG_AUTO_RESERVE_RELEASE (0x80) 229#define MPI2_TOOL_ISTWI_FLAG_AUTO_RESERVE_RELEASE (0x80)
227#define MPI2_TOOL_ISTWI_FLAG_PAGE_ADDR_MASK (0x07) 230#define MPI2_TOOL_ISTWI_FLAG_PAGE_ADDR_MASK (0x07)
228 231
232/*MPI26 TOOLBOX Request MsgFlags defines */
233#define MPI26_TOOLBOX_REQ_MSGFLAGS_ADDRESSING_MASK (0x01)
234/*Request uses Man Page 43 device index addressing */
235#define MPI26_TOOLBOX_REQ_MSGFLAGS_ADDRESSING_DEVINDEX (0x00)
236/*Request uses Man Page 43 device info struct addressing */
237#define MPI26_TOOLBOX_REQ_MSGFLAGS_ADDRESSING_DEVINFO (0x01)
238
229/*Toolbox ISTWI Read Write Tool reply message */ 239/*Toolbox ISTWI Read Write Tool reply message */
230typedef struct _MPI2_TOOLBOX_ISTWI_REPLY { 240typedef struct _MPI2_TOOLBOX_ISTWI_REPLY {
231 U8 Tool; /*0x00 */ 241 U8 Tool; /*0x00 */
@@ -387,6 +397,64 @@ Mpi2ToolboxTextDisplayRequest_t,
387#define MPI2_TOOLBOX_CONSOLE_FLAG_TIMESTAMP (0x01) 397#define MPI2_TOOLBOX_CONSOLE_FLAG_TIMESTAMP (0x01)
388 398
389 399
400/***************************************************************************
401 * Toolbox Backend Lane Margining Tool
402 ***************************************************************************
403 */
404
405/*Toolbox Backend Lane Margining Tool request message */
406typedef struct _MPI26_TOOLBOX_LANE_MARGINING_REQUEST {
407 U8 Tool; /*0x00 */
408 U8 Reserved1; /*0x01 */
409 U8 ChainOffset; /*0x02 */
410 U8 Function; /*0x03 */
411 U16 Reserved2; /*0x04 */
412 U8 Reserved3; /*0x06 */
413 U8 MsgFlags; /*0x07 */
414 U8 VP_ID; /*0x08 */
415 U8 VF_ID; /*0x09 */
416 U16 Reserved4; /*0x0A */
417 U8 Command; /*0x0C */
418 U8 SwitchPort; /*0x0D */
419 U16 DevHandle; /*0x0E */
420 U8 RegisterOffset; /*0x10 */
421 U8 Reserved5; /*0x11 */
422 U16 DataLength; /*0x12 */
423 MPI25_SGE_IO_UNION SGL; /*0x14 */
424} MPI26_TOOLBOX_LANE_MARGINING_REQUEST,
425 *PTR_MPI2_TOOLBOX_LANE_MARGINING_REQUEST,
426 Mpi26ToolboxLaneMarginingRequest_t,
427 *pMpi2ToolboxLaneMarginingRequest_t;
428
429/* defines for the Command field */
430#define MPI26_TOOL_MARGIN_COMMAND_ENTER_MARGIN_MODE (0x01)
431#define MPI26_TOOL_MARGIN_COMMAND_READ_REGISTER_DATA (0x02)
432#define MPI26_TOOL_MARGIN_COMMAND_WRITE_REGISTER_DATA (0x03)
433#define MPI26_TOOL_MARGIN_COMMAND_EXIT_MARGIN_MODE (0x04)
434
435
436/*Toolbox Backend Lane Margining Tool reply message */
437typedef struct _MPI26_TOOLBOX_LANE_MARGINING_REPLY {
438 U8 Tool; /*0x00 */
439 U8 Reserved1; /*0x01 */
440 U8 MsgLength; /*0x02 */
441 U8 Function; /*0x03 */
442 U16 Reserved2; /*0x04 */
443 U8 Reserved3; /*0x06 */
444 U8 MsgFlags; /*0x07 */
445 U8 VP_ID; /*0x08 */
446 U8 VF_ID; /*0x09 */
447 U16 Reserved4; /*0x0A */
448 U16 Reserved5; /*0x0C */
449 U16 IOCStatus; /*0x0E */
450 U32 IOCLogInfo; /*0x10 */
451 U16 ReturnedDataLength; /*0x14 */
452 U16 Reserved6; /*0x16 */
453} MPI26_TOOLBOX_LANE_MARGINING_REPLY,
454 *PTR_MPI26_TOOLBOX_LANE_MARGINING_REPLY,
455 Mpi26ToolboxLaneMarginingReply_t,
456 *pMpi26ToolboxLaneMarginingReply_t;
457
390 458
391/***************************************************************************** 459/*****************************************************************************
392* 460*