162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci *  Copyright (c) 2000-2008 LSI Corporation.
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci *
662306a36Sopenharmony_ci *           Name:  mpi_init.h
762306a36Sopenharmony_ci *          Title:  MPI initiator mode messages and structures
862306a36Sopenharmony_ci *  Creation Date:  June 8, 2000
962306a36Sopenharmony_ci *
1062306a36Sopenharmony_ci *    mpi_init.h Version:  01.05.09
1162306a36Sopenharmony_ci *
1262306a36Sopenharmony_ci *  Version History
1362306a36Sopenharmony_ci *  ---------------
1462306a36Sopenharmony_ci *
1562306a36Sopenharmony_ci *  Date      Version   Description
1662306a36Sopenharmony_ci *  --------  --------  ------------------------------------------------------
1762306a36Sopenharmony_ci *  05-08-00  00.10.01  Original release for 0.10 spec dated 4/26/2000.
1862306a36Sopenharmony_ci *  05-24-00  00.10.02  Added SenseBufferLength to _MSG_SCSI_IO_REPLY.
1962306a36Sopenharmony_ci *  06-06-00  01.00.01  Update version number for 1.0 release.
2062306a36Sopenharmony_ci *  06-08-00  01.00.02  Added MPI_SCSI_RSP_INFO_ definitions.
2162306a36Sopenharmony_ci *  11-02-00  01.01.01  Original release for post 1.0 work.
2262306a36Sopenharmony_ci *  12-04-00  01.01.02  Added MPI_SCSIIO_CONTROL_NO_DISCONNECT.
2362306a36Sopenharmony_ci *  02-20-01  01.01.03  Started using MPI_POINTER.
2462306a36Sopenharmony_ci *  03-27-01  01.01.04  Added structure offset comments.
2562306a36Sopenharmony_ci *  04-10-01  01.01.05  Added new MsgFlag for MSG_SCSI_TASK_MGMT.
2662306a36Sopenharmony_ci *  08-08-01  01.02.01  Original release for v1.2 work.
2762306a36Sopenharmony_ci *  08-29-01  01.02.02  Added MPI_SCSITASKMGMT_TASKTYPE_LOGICAL_UNIT_RESET.
2862306a36Sopenharmony_ci *                      Added MPI_SCSI_STATE_QUEUE_TAG_REJECTED for
2962306a36Sopenharmony_ci *                      MSG_SCSI_IO_REPLY.
3062306a36Sopenharmony_ci *  09-28-01  01.02.03  Added structures and defines for SCSI Enclosure
3162306a36Sopenharmony_ci *                      Processor messages.
3262306a36Sopenharmony_ci *  10-04-01  01.02.04  Added defines for SEP request Action field.
3362306a36Sopenharmony_ci *  05-31-02  01.02.05  Added MPI_SCSIIO_MSGFLGS_CMD_DETERMINES_DATA_DIR define
3462306a36Sopenharmony_ci *                      for SCSI IO requests.
3562306a36Sopenharmony_ci *  11-15-02  01.02.06  Added special extended SCSI Status defines for FCP.
3662306a36Sopenharmony_ci *  06-26-03  01.02.07  Added MPI_SCSI_STATUS_FCPEXT_UNASSIGNED define.
3762306a36Sopenharmony_ci *  05-11-04  01.03.01  Original release for MPI v1.3.
3862306a36Sopenharmony_ci *  08-19-04  01.05.01  Added MsgFlags defines for EEDP to SCSI IO request.
3962306a36Sopenharmony_ci *                      Added new word to MSG_SCSI_IO_REPLY to add TaskTag field
4062306a36Sopenharmony_ci *                      and a reserved U16.
4162306a36Sopenharmony_ci *                      Added new MSG_SCSI_IO32_REQUEST structure.
4262306a36Sopenharmony_ci *                      Added a TaskType of Clear Task Set to SCSI
4362306a36Sopenharmony_ci *                      Task Management request.
4462306a36Sopenharmony_ci *  12-07-04  01.05.02  Added support for Task Management Query Task.
4562306a36Sopenharmony_ci *  01-15-05  01.05.03  Modified SCSI Enclosure Processor Request to support
4662306a36Sopenharmony_ci *                      WWID addressing.
4762306a36Sopenharmony_ci *  03-11-05  01.05.04  Removed EEDP flags from SCSI IO Request.
4862306a36Sopenharmony_ci *                      Removed SCSI IO 32 Request.
4962306a36Sopenharmony_ci *                      Modified SCSI Enclosure Processor Request and Reply to
5062306a36Sopenharmony_ci *                      support Enclosure/Slot addressing rather than WWID
5162306a36Sopenharmony_ci *                      addressing.
5262306a36Sopenharmony_ci *  06-24-05  01.05.05  Added SCSI IO 32 structures and defines.
5362306a36Sopenharmony_ci *                      Added four new defines for SEP SlotStatus.
5462306a36Sopenharmony_ci *  08-03-05  01.05.06  Fixed some MPI_SCSIIO32_MSGFLGS_ defines to make them
5562306a36Sopenharmony_ci *                      unique in the first 32 characters.
5662306a36Sopenharmony_ci *  03-27-06  01.05.07  Added Task Management type of Clear ACA.
5762306a36Sopenharmony_ci *  10-11-06  01.05.08  Shortened define for Task Management type of Clear ACA.
5862306a36Sopenharmony_ci *  02-28-07  01.05.09  Defined two new MsgFlags bits for SCSI Task Management
5962306a36Sopenharmony_ci *                      Request: Do Not Send Task IU and Soft Reset Option.
6062306a36Sopenharmony_ci *  --------------------------------------------------------------------------
6162306a36Sopenharmony_ci */
6262306a36Sopenharmony_ci
6362306a36Sopenharmony_ci#ifndef MPI_INIT_H
6462306a36Sopenharmony_ci#define MPI_INIT_H
6562306a36Sopenharmony_ci
6662306a36Sopenharmony_ci
6762306a36Sopenharmony_ci/*****************************************************************************
6862306a36Sopenharmony_ci*
6962306a36Sopenharmony_ci*               S C S I    I n i t i a t o r    M e s s a g e s
7062306a36Sopenharmony_ci*
7162306a36Sopenharmony_ci*****************************************************************************/
7262306a36Sopenharmony_ci
7362306a36Sopenharmony_ci/****************************************************************************/
7462306a36Sopenharmony_ci/*  SCSI IO messages and associated structures                              */
7562306a36Sopenharmony_ci/****************************************************************************/
7662306a36Sopenharmony_ci
7762306a36Sopenharmony_citypedef struct _MSG_SCSI_IO_REQUEST
7862306a36Sopenharmony_ci{
7962306a36Sopenharmony_ci    U8                      TargetID;           /* 00h */
8062306a36Sopenharmony_ci    U8                      Bus;                /* 01h */
8162306a36Sopenharmony_ci    U8                      ChainOffset;        /* 02h */
8262306a36Sopenharmony_ci    U8                      Function;           /* 03h */
8362306a36Sopenharmony_ci    U8                      CDBLength;          /* 04h */
8462306a36Sopenharmony_ci    U8                      SenseBufferLength;  /* 05h */
8562306a36Sopenharmony_ci    U8                      Reserved;           /* 06h */
8662306a36Sopenharmony_ci    U8                      MsgFlags;           /* 07h */
8762306a36Sopenharmony_ci    U32                     MsgContext;         /* 08h */
8862306a36Sopenharmony_ci    U8                      LUN[8];             /* 0Ch */
8962306a36Sopenharmony_ci    U32                     Control;            /* 14h */
9062306a36Sopenharmony_ci    U8                      CDB[16];            /* 18h */
9162306a36Sopenharmony_ci    U32                     DataLength;         /* 28h */
9262306a36Sopenharmony_ci    U32                     SenseBufferLowAddr; /* 2Ch */
9362306a36Sopenharmony_ci    SGE_IO_UNION            SGL;                /* 30h */
9462306a36Sopenharmony_ci} MSG_SCSI_IO_REQUEST, MPI_POINTER PTR_MSG_SCSI_IO_REQUEST,
9562306a36Sopenharmony_ci  SCSIIORequest_t, MPI_POINTER pSCSIIORequest_t;
9662306a36Sopenharmony_ci
9762306a36Sopenharmony_ci
9862306a36Sopenharmony_ci/* SCSI IO MsgFlags bits */
9962306a36Sopenharmony_ci
10062306a36Sopenharmony_ci#define MPI_SCSIIO_MSGFLGS_SENSE_WIDTH              (0x01)
10162306a36Sopenharmony_ci#define MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_32           (0x00)
10262306a36Sopenharmony_ci#define MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_64           (0x01)
10362306a36Sopenharmony_ci
10462306a36Sopenharmony_ci#define MPI_SCSIIO_MSGFLGS_SENSE_LOCATION           (0x02)
10562306a36Sopenharmony_ci#define MPI_SCSIIO_MSGFLGS_SENSE_LOC_HOST           (0x00)
10662306a36Sopenharmony_ci#define MPI_SCSIIO_MSGFLGS_SENSE_LOC_IOC            (0x02)
10762306a36Sopenharmony_ci
10862306a36Sopenharmony_ci#define MPI_SCSIIO_MSGFLGS_CMD_DETERMINES_DATA_DIR  (0x04)
10962306a36Sopenharmony_ci
11062306a36Sopenharmony_ci/* SCSI IO LUN fields */
11162306a36Sopenharmony_ci
11262306a36Sopenharmony_ci#define MPI_SCSIIO_LUN_FIRST_LEVEL_ADDRESSING   (0x0000FFFF)
11362306a36Sopenharmony_ci#define MPI_SCSIIO_LUN_SECOND_LEVEL_ADDRESSING  (0xFFFF0000)
11462306a36Sopenharmony_ci#define MPI_SCSIIO_LUN_THIRD_LEVEL_ADDRESSING   (0x0000FFFF)
11562306a36Sopenharmony_ci#define MPI_SCSIIO_LUN_FOURTH_LEVEL_ADDRESSING  (0xFFFF0000)
11662306a36Sopenharmony_ci#define MPI_SCSIIO_LUN_LEVEL_1_WORD             (0xFF00)
11762306a36Sopenharmony_ci#define MPI_SCSIIO_LUN_LEVEL_1_DWORD            (0x0000FF00)
11862306a36Sopenharmony_ci
11962306a36Sopenharmony_ci/* SCSI IO Control bits */
12062306a36Sopenharmony_ci
12162306a36Sopenharmony_ci#define MPI_SCSIIO_CONTROL_DATADIRECTION_MASK   (0x03000000)
12262306a36Sopenharmony_ci#define MPI_SCSIIO_CONTROL_NODATATRANSFER       (0x00000000)
12362306a36Sopenharmony_ci#define MPI_SCSIIO_CONTROL_WRITE                (0x01000000)
12462306a36Sopenharmony_ci#define MPI_SCSIIO_CONTROL_READ                 (0x02000000)
12562306a36Sopenharmony_ci
12662306a36Sopenharmony_ci#define MPI_SCSIIO_CONTROL_ADDCDBLEN_MASK       (0x3C000000)
12762306a36Sopenharmony_ci#define MPI_SCSIIO_CONTROL_ADDCDBLEN_SHIFT      (26)
12862306a36Sopenharmony_ci
12962306a36Sopenharmony_ci#define MPI_SCSIIO_CONTROL_TASKATTRIBUTE_MASK   (0x00000700)
13062306a36Sopenharmony_ci#define MPI_SCSIIO_CONTROL_SIMPLEQ              (0x00000000)
13162306a36Sopenharmony_ci#define MPI_SCSIIO_CONTROL_HEADOFQ              (0x00000100)
13262306a36Sopenharmony_ci#define MPI_SCSIIO_CONTROL_ORDEREDQ             (0x00000200)
13362306a36Sopenharmony_ci#define MPI_SCSIIO_CONTROL_ACAQ                 (0x00000400)
13462306a36Sopenharmony_ci#define MPI_SCSIIO_CONTROL_UNTAGGED             (0x00000500)
13562306a36Sopenharmony_ci#define MPI_SCSIIO_CONTROL_NO_DISCONNECT        (0x00000700)
13662306a36Sopenharmony_ci
13762306a36Sopenharmony_ci#define MPI_SCSIIO_CONTROL_TASKMANAGE_MASK      (0x00FF0000)
13862306a36Sopenharmony_ci#define MPI_SCSIIO_CONTROL_OBSOLETE             (0x00800000)
13962306a36Sopenharmony_ci#define MPI_SCSIIO_CONTROL_CLEAR_ACA_RSV        (0x00400000)
14062306a36Sopenharmony_ci#define MPI_SCSIIO_CONTROL_TARGET_RESET         (0x00200000)
14162306a36Sopenharmony_ci#define MPI_SCSIIO_CONTROL_LUN_RESET_RSV        (0x00100000)
14262306a36Sopenharmony_ci#define MPI_SCSIIO_CONTROL_RESERVED             (0x00080000)
14362306a36Sopenharmony_ci#define MPI_SCSIIO_CONTROL_CLR_TASK_SET_RSV     (0x00040000)
14462306a36Sopenharmony_ci#define MPI_SCSIIO_CONTROL_ABORT_TASK_SET       (0x00020000)
14562306a36Sopenharmony_ci#define MPI_SCSIIO_CONTROL_RESERVED2            (0x00010000)
14662306a36Sopenharmony_ci
14762306a36Sopenharmony_ci
14862306a36Sopenharmony_ci/* SCSI IO reply structure */
14962306a36Sopenharmony_citypedef struct _MSG_SCSI_IO_REPLY
15062306a36Sopenharmony_ci{
15162306a36Sopenharmony_ci    U8                      TargetID;           /* 00h */
15262306a36Sopenharmony_ci    U8                      Bus;                /* 01h */
15362306a36Sopenharmony_ci    U8                      MsgLength;          /* 02h */
15462306a36Sopenharmony_ci    U8                      Function;           /* 03h */
15562306a36Sopenharmony_ci    U8                      CDBLength;          /* 04h */
15662306a36Sopenharmony_ci    U8                      SenseBufferLength;  /* 05h */
15762306a36Sopenharmony_ci    U8                      Reserved;           /* 06h */
15862306a36Sopenharmony_ci    U8                      MsgFlags;           /* 07h */
15962306a36Sopenharmony_ci    U32                     MsgContext;         /* 08h */
16062306a36Sopenharmony_ci    U8                      SCSIStatus;         /* 0Ch */
16162306a36Sopenharmony_ci    U8                      SCSIState;          /* 0Dh */
16262306a36Sopenharmony_ci    U16                     IOCStatus;          /* 0Eh */
16362306a36Sopenharmony_ci    U32                     IOCLogInfo;         /* 10h */
16462306a36Sopenharmony_ci    U32                     TransferCount;      /* 14h */
16562306a36Sopenharmony_ci    U32                     SenseCount;         /* 18h */
16662306a36Sopenharmony_ci    U32                     ResponseInfo;       /* 1Ch */
16762306a36Sopenharmony_ci    U16                     TaskTag;            /* 20h */
16862306a36Sopenharmony_ci    U16                     Reserved1;          /* 22h */
16962306a36Sopenharmony_ci} MSG_SCSI_IO_REPLY, MPI_POINTER PTR_MSG_SCSI_IO_REPLY,
17062306a36Sopenharmony_ci  SCSIIOReply_t, MPI_POINTER pSCSIIOReply_t;
17162306a36Sopenharmony_ci
17262306a36Sopenharmony_ci
17362306a36Sopenharmony_ci/* SCSI IO Reply SCSIStatus values (SAM-2 status codes) */
17462306a36Sopenharmony_ci
17562306a36Sopenharmony_ci#define MPI_SCSI_STATUS_SUCCESS                 (0x00)
17662306a36Sopenharmony_ci#define MPI_SCSI_STATUS_CHECK_CONDITION         (0x02)
17762306a36Sopenharmony_ci#define MPI_SCSI_STATUS_CONDITION_MET           (0x04)
17862306a36Sopenharmony_ci#define MPI_SCSI_STATUS_BUSY                    (0x08)
17962306a36Sopenharmony_ci#define MPI_SCSI_STATUS_INTERMEDIATE            (0x10)
18062306a36Sopenharmony_ci#define MPI_SCSI_STATUS_INTERMEDIATE_CONDMET    (0x14)
18162306a36Sopenharmony_ci#define MPI_SCSI_STATUS_RESERVATION_CONFLICT    (0x18)
18262306a36Sopenharmony_ci#define MPI_SCSI_STATUS_COMMAND_TERMINATED      (0x22)
18362306a36Sopenharmony_ci#define MPI_SCSI_STATUS_TASK_SET_FULL           (0x28)
18462306a36Sopenharmony_ci#define MPI_SCSI_STATUS_ACA_ACTIVE              (0x30)
18562306a36Sopenharmony_ci
18662306a36Sopenharmony_ci#define MPI_SCSI_STATUS_FCPEXT_DEVICE_LOGGED_OUT    (0x80)
18762306a36Sopenharmony_ci#define MPI_SCSI_STATUS_FCPEXT_NO_LINK              (0x81)
18862306a36Sopenharmony_ci#define MPI_SCSI_STATUS_FCPEXT_UNASSIGNED           (0x82)
18962306a36Sopenharmony_ci
19062306a36Sopenharmony_ci
19162306a36Sopenharmony_ci/* SCSI IO Reply SCSIState values */
19262306a36Sopenharmony_ci
19362306a36Sopenharmony_ci#define MPI_SCSI_STATE_AUTOSENSE_VALID          (0x01)
19462306a36Sopenharmony_ci#define MPI_SCSI_STATE_AUTOSENSE_FAILED         (0x02)
19562306a36Sopenharmony_ci#define MPI_SCSI_STATE_NO_SCSI_STATUS           (0x04)
19662306a36Sopenharmony_ci#define MPI_SCSI_STATE_TERMINATED               (0x08)
19762306a36Sopenharmony_ci#define MPI_SCSI_STATE_RESPONSE_INFO_VALID      (0x10)
19862306a36Sopenharmony_ci#define MPI_SCSI_STATE_QUEUE_TAG_REJECTED       (0x20)
19962306a36Sopenharmony_ci
20062306a36Sopenharmony_ci/* SCSI IO Reply ResponseInfo values */
20162306a36Sopenharmony_ci/* (FCP-1 RSP_CODE values and SPI-3 Packetized Failure codes) */
20262306a36Sopenharmony_ci
20362306a36Sopenharmony_ci#define MPI_SCSI_RSP_INFO_FUNCTION_COMPLETE     (0x00000000)
20462306a36Sopenharmony_ci#define MPI_SCSI_RSP_INFO_FCP_BURST_LEN_ERROR   (0x01000000)
20562306a36Sopenharmony_ci#define MPI_SCSI_RSP_INFO_CMND_FIELDS_INVALID   (0x02000000)
20662306a36Sopenharmony_ci#define MPI_SCSI_RSP_INFO_FCP_DATA_RO_ERROR     (0x03000000)
20762306a36Sopenharmony_ci#define MPI_SCSI_RSP_INFO_TASK_MGMT_UNSUPPORTED (0x04000000)
20862306a36Sopenharmony_ci#define MPI_SCSI_RSP_INFO_TASK_MGMT_FAILED      (0x05000000)
20962306a36Sopenharmony_ci#define MPI_SCSI_RSP_INFO_SPI_LQ_INVALID_TYPE   (0x06000000)
21062306a36Sopenharmony_ci
21162306a36Sopenharmony_ci#define MPI_SCSI_TASKTAG_UNKNOWN                (0xFFFF)
21262306a36Sopenharmony_ci
21362306a36Sopenharmony_ci
21462306a36Sopenharmony_ci/****************************************************************************/
21562306a36Sopenharmony_ci/*  SCSI IO 32 messages and associated structures                           */
21662306a36Sopenharmony_ci/****************************************************************************/
21762306a36Sopenharmony_ci
21862306a36Sopenharmony_citypedef struct
21962306a36Sopenharmony_ci{
22062306a36Sopenharmony_ci    U8                      CDB[20];                    /* 00h */
22162306a36Sopenharmony_ci    U32                     PrimaryReferenceTag;        /* 14h */
22262306a36Sopenharmony_ci    U16                     PrimaryApplicationTag;      /* 18h */
22362306a36Sopenharmony_ci    U16                     PrimaryApplicationTagMask;  /* 1Ah */
22462306a36Sopenharmony_ci    U32                     TransferLength;             /* 1Ch */
22562306a36Sopenharmony_ci} MPI_SCSI_IO32_CDB_EEDP32, MPI_POINTER PTR_MPI_SCSI_IO32_CDB_EEDP32,
22662306a36Sopenharmony_ci  MpiScsiIo32CdbEedp32_t, MPI_POINTER pMpiScsiIo32CdbEedp32_t;
22762306a36Sopenharmony_ci
22862306a36Sopenharmony_citypedef struct
22962306a36Sopenharmony_ci{
23062306a36Sopenharmony_ci    U8                      CDB[16];                    /* 00h */
23162306a36Sopenharmony_ci    U32                     DataLength;                 /* 10h */
23262306a36Sopenharmony_ci    U32                     PrimaryReferenceTag;        /* 14h */
23362306a36Sopenharmony_ci    U16                     PrimaryApplicationTag;      /* 18h */
23462306a36Sopenharmony_ci    U16                     PrimaryApplicationTagMask;  /* 1Ah */
23562306a36Sopenharmony_ci    U32                     TransferLength;             /* 1Ch */
23662306a36Sopenharmony_ci} MPI_SCSI_IO32_CDB_EEDP16, MPI_POINTER PTR_MPI_SCSI_IO32_CDB_EEDP16,
23762306a36Sopenharmony_ci  MpiScsiIo32CdbEedp16_t, MPI_POINTER pMpiScsiIo32CdbEedp16_t;
23862306a36Sopenharmony_ci
23962306a36Sopenharmony_citypedef union
24062306a36Sopenharmony_ci{
24162306a36Sopenharmony_ci    U8                       CDB32[32];
24262306a36Sopenharmony_ci    MPI_SCSI_IO32_CDB_EEDP32 EEDP32;
24362306a36Sopenharmony_ci    MPI_SCSI_IO32_CDB_EEDP16 EEDP16;
24462306a36Sopenharmony_ci    SGE_SIMPLE_UNION         SGE;
24562306a36Sopenharmony_ci} MPI_SCSI_IO32_CDB_UNION, MPI_POINTER PTR_MPI_SCSI_IO32_CDB_UNION,
24662306a36Sopenharmony_ci  MpiScsiIo32Cdb_t, MPI_POINTER pMpiScsiIo32Cdb_t;
24762306a36Sopenharmony_ci
24862306a36Sopenharmony_citypedef struct
24962306a36Sopenharmony_ci{
25062306a36Sopenharmony_ci    U8                      TargetID;           /* 00h */
25162306a36Sopenharmony_ci    U8                      Bus;                /* 01h */
25262306a36Sopenharmony_ci    U16                     Reserved1;          /* 02h */
25362306a36Sopenharmony_ci    U32                     Reserved2;          /* 04h */
25462306a36Sopenharmony_ci} MPI_SCSI_IO32_BUS_TARGET_ID_FORM, MPI_POINTER PTR_MPI_SCSI_IO32_BUS_TARGET_ID_FORM,
25562306a36Sopenharmony_ci  MpiScsiIo32BusTargetIdForm_t, MPI_POINTER pMpiScsiIo32BusTargetIdForm_t;
25662306a36Sopenharmony_ci
25762306a36Sopenharmony_citypedef union
25862306a36Sopenharmony_ci{
25962306a36Sopenharmony_ci    MPI_SCSI_IO32_BUS_TARGET_ID_FORM    SCSIID;
26062306a36Sopenharmony_ci    U64                                 WWID;
26162306a36Sopenharmony_ci} MPI_SCSI_IO32_ADDRESS, MPI_POINTER PTR_MPI_SCSI_IO32_ADDRESS,
26262306a36Sopenharmony_ci  MpiScsiIo32Address_t, MPI_POINTER pMpiScsiIo32Address_t;
26362306a36Sopenharmony_ci
26462306a36Sopenharmony_citypedef struct _MSG_SCSI_IO32_REQUEST
26562306a36Sopenharmony_ci{
26662306a36Sopenharmony_ci    U8                          Port;                           /* 00h */
26762306a36Sopenharmony_ci    U8                          Reserved1;                      /* 01h */
26862306a36Sopenharmony_ci    U8                          ChainOffset;                    /* 02h */
26962306a36Sopenharmony_ci    U8                          Function;                       /* 03h */
27062306a36Sopenharmony_ci    U8                          CDBLength;                      /* 04h */
27162306a36Sopenharmony_ci    U8                          SenseBufferLength;              /* 05h */
27262306a36Sopenharmony_ci    U8                          Flags;                          /* 06h */
27362306a36Sopenharmony_ci    U8                          MsgFlags;                       /* 07h */
27462306a36Sopenharmony_ci    U32                         MsgContext;                     /* 08h */
27562306a36Sopenharmony_ci    U8                          LUN[8];                         /* 0Ch */
27662306a36Sopenharmony_ci    U32                         Control;                        /* 14h */
27762306a36Sopenharmony_ci    MPI_SCSI_IO32_CDB_UNION     CDB;                            /* 18h */
27862306a36Sopenharmony_ci    U32                         DataLength;                     /* 38h */
27962306a36Sopenharmony_ci    U32                         BidirectionalDataLength;        /* 3Ch */
28062306a36Sopenharmony_ci    U32                         SecondaryReferenceTag;          /* 40h */
28162306a36Sopenharmony_ci    U16                         SecondaryApplicationTag;        /* 44h */
28262306a36Sopenharmony_ci    U16                         Reserved2;                      /* 46h */
28362306a36Sopenharmony_ci    U16                         EEDPFlags;                      /* 48h */
28462306a36Sopenharmony_ci    U16                         ApplicationTagTranslationMask;  /* 4Ah */
28562306a36Sopenharmony_ci    U32                         EEDPBlockSize;                  /* 4Ch */
28662306a36Sopenharmony_ci    MPI_SCSI_IO32_ADDRESS       DeviceAddress;                  /* 50h */
28762306a36Sopenharmony_ci    U8                          SGLOffset0;                     /* 58h */
28862306a36Sopenharmony_ci    U8                          SGLOffset1;                     /* 59h */
28962306a36Sopenharmony_ci    U8                          SGLOffset2;                     /* 5Ah */
29062306a36Sopenharmony_ci    U8                          SGLOffset3;                     /* 5Bh */
29162306a36Sopenharmony_ci    U32                         Reserved3;                      /* 5Ch */
29262306a36Sopenharmony_ci    U32                         Reserved4;                      /* 60h */
29362306a36Sopenharmony_ci    U32                         SenseBufferLowAddr;             /* 64h */
29462306a36Sopenharmony_ci    SGE_IO_UNION                SGL;                            /* 68h */
29562306a36Sopenharmony_ci} MSG_SCSI_IO32_REQUEST, MPI_POINTER PTR_MSG_SCSI_IO32_REQUEST,
29662306a36Sopenharmony_ci  SCSIIO32Request_t, MPI_POINTER pSCSIIO32Request_t;
29762306a36Sopenharmony_ci
29862306a36Sopenharmony_ci/* SCSI IO 32 MsgFlags bits */
29962306a36Sopenharmony_ci#define MPI_SCSIIO32_MSGFLGS_SENSE_WIDTH                (0x01)
30062306a36Sopenharmony_ci#define MPI_SCSIIO32_MSGFLGS_32_SENSE_WIDTH             (0x00)
30162306a36Sopenharmony_ci#define MPI_SCSIIO32_MSGFLGS_64_SENSE_WIDTH             (0x01)
30262306a36Sopenharmony_ci
30362306a36Sopenharmony_ci#define MPI_SCSIIO32_MSGFLGS_SENSE_LOCATION             (0x02)
30462306a36Sopenharmony_ci#define MPI_SCSIIO32_MSGFLGS_SENSE_LOC_HOST             (0x00)
30562306a36Sopenharmony_ci#define MPI_SCSIIO32_MSGFLGS_SENSE_LOC_IOC              (0x02)
30662306a36Sopenharmony_ci
30762306a36Sopenharmony_ci#define MPI_SCSIIO32_MSGFLGS_CMD_DETERMINES_DATA_DIR    (0x04)
30862306a36Sopenharmony_ci#define MPI_SCSIIO32_MSGFLGS_SGL_OFFSETS_CHAINS         (0x08)
30962306a36Sopenharmony_ci#define MPI_SCSIIO32_MSGFLGS_MULTICAST                  (0x10)
31062306a36Sopenharmony_ci#define MPI_SCSIIO32_MSGFLGS_BIDIRECTIONAL              (0x20)
31162306a36Sopenharmony_ci#define MPI_SCSIIO32_MSGFLGS_LARGE_CDB                  (0x40)
31262306a36Sopenharmony_ci
31362306a36Sopenharmony_ci/* SCSI IO 32 Flags bits */
31462306a36Sopenharmony_ci#define MPI_SCSIIO32_FLAGS_FORM_MASK                    (0x03)
31562306a36Sopenharmony_ci#define MPI_SCSIIO32_FLAGS_FORM_SCSIID                  (0x00)
31662306a36Sopenharmony_ci#define MPI_SCSIIO32_FLAGS_FORM_WWID                    (0x01)
31762306a36Sopenharmony_ci
31862306a36Sopenharmony_ci/* SCSI IO 32 LUN fields */
31962306a36Sopenharmony_ci#define MPI_SCSIIO32_LUN_FIRST_LEVEL_ADDRESSING     (0x0000FFFF)
32062306a36Sopenharmony_ci#define MPI_SCSIIO32_LUN_SECOND_LEVEL_ADDRESSING    (0xFFFF0000)
32162306a36Sopenharmony_ci#define MPI_SCSIIO32_LUN_THIRD_LEVEL_ADDRESSING     (0x0000FFFF)
32262306a36Sopenharmony_ci#define MPI_SCSIIO32_LUN_FOURTH_LEVEL_ADDRESSING    (0xFFFF0000)
32362306a36Sopenharmony_ci#define MPI_SCSIIO32_LUN_LEVEL_1_WORD               (0xFF00)
32462306a36Sopenharmony_ci#define MPI_SCSIIO32_LUN_LEVEL_1_DWORD              (0x0000FF00)
32562306a36Sopenharmony_ci
32662306a36Sopenharmony_ci/* SCSI IO 32 Control bits */
32762306a36Sopenharmony_ci#define MPI_SCSIIO32_CONTROL_DATADIRECTION_MASK     (0x03000000)
32862306a36Sopenharmony_ci#define MPI_SCSIIO32_CONTROL_NODATATRANSFER         (0x00000000)
32962306a36Sopenharmony_ci#define MPI_SCSIIO32_CONTROL_WRITE                  (0x01000000)
33062306a36Sopenharmony_ci#define MPI_SCSIIO32_CONTROL_READ                   (0x02000000)
33162306a36Sopenharmony_ci#define MPI_SCSIIO32_CONTROL_BIDIRECTIONAL          (0x03000000)
33262306a36Sopenharmony_ci
33362306a36Sopenharmony_ci#define MPI_SCSIIO32_CONTROL_ADDCDBLEN_MASK         (0xFC000000)
33462306a36Sopenharmony_ci#define MPI_SCSIIO32_CONTROL_ADDCDBLEN_SHIFT        (26)
33562306a36Sopenharmony_ci
33662306a36Sopenharmony_ci#define MPI_SCSIIO32_CONTROL_TASKATTRIBUTE_MASK     (0x00000700)
33762306a36Sopenharmony_ci#define MPI_SCSIIO32_CONTROL_SIMPLEQ                (0x00000000)
33862306a36Sopenharmony_ci#define MPI_SCSIIO32_CONTROL_HEADOFQ                (0x00000100)
33962306a36Sopenharmony_ci#define MPI_SCSIIO32_CONTROL_ORDEREDQ               (0x00000200)
34062306a36Sopenharmony_ci#define MPI_SCSIIO32_CONTROL_ACAQ                   (0x00000400)
34162306a36Sopenharmony_ci#define MPI_SCSIIO32_CONTROL_UNTAGGED               (0x00000500)
34262306a36Sopenharmony_ci#define MPI_SCSIIO32_CONTROL_NO_DISCONNECT          (0x00000700)
34362306a36Sopenharmony_ci
34462306a36Sopenharmony_ci#define MPI_SCSIIO32_CONTROL_TASKMANAGE_MASK        (0x00FF0000)
34562306a36Sopenharmony_ci#define MPI_SCSIIO32_CONTROL_OBSOLETE               (0x00800000)
34662306a36Sopenharmony_ci#define MPI_SCSIIO32_CONTROL_CLEAR_ACA_RSV          (0x00400000)
34762306a36Sopenharmony_ci#define MPI_SCSIIO32_CONTROL_TARGET_RESET           (0x00200000)
34862306a36Sopenharmony_ci#define MPI_SCSIIO32_CONTROL_LUN_RESET_RSV          (0x00100000)
34962306a36Sopenharmony_ci#define MPI_SCSIIO32_CONTROL_RESERVED               (0x00080000)
35062306a36Sopenharmony_ci#define MPI_SCSIIO32_CONTROL_CLR_TASK_SET_RSV       (0x00040000)
35162306a36Sopenharmony_ci#define MPI_SCSIIO32_CONTROL_ABORT_TASK_SET         (0x00020000)
35262306a36Sopenharmony_ci#define MPI_SCSIIO32_CONTROL_RESERVED2              (0x00010000)
35362306a36Sopenharmony_ci
35462306a36Sopenharmony_ci/* SCSI IO 32 EEDPFlags */
35562306a36Sopenharmony_ci#define MPI_SCSIIO32_EEDPFLAGS_MASK_OP              (0x0007)
35662306a36Sopenharmony_ci#define MPI_SCSIIO32_EEDPFLAGS_NOOP_OP              (0x0000)
35762306a36Sopenharmony_ci#define MPI_SCSIIO32_EEDPFLAGS_CHK_OP               (0x0001)
35862306a36Sopenharmony_ci#define MPI_SCSIIO32_EEDPFLAGS_STRIP_OP             (0x0002)
35962306a36Sopenharmony_ci#define MPI_SCSIIO32_EEDPFLAGS_CHKRM_OP             (0x0003)
36062306a36Sopenharmony_ci#define MPI_SCSIIO32_EEDPFLAGS_INSERT_OP            (0x0004)
36162306a36Sopenharmony_ci#define MPI_SCSIIO32_EEDPFLAGS_REPLACE_OP           (0x0006)
36262306a36Sopenharmony_ci#define MPI_SCSIIO32_EEDPFLAGS_CHKREGEN_OP          (0x0007)
36362306a36Sopenharmony_ci
36462306a36Sopenharmony_ci#define MPI_SCSIIO32_EEDPFLAGS_PASS_REF_TAG         (0x0008)
36562306a36Sopenharmony_ci#define MPI_SCSIIO32_EEDPFLAGS_8_9THS_MODE          (0x0010)
36662306a36Sopenharmony_ci
36762306a36Sopenharmony_ci#define MPI_SCSIIO32_EEDPFLAGS_T10_CHK_MASK         (0x0700)
36862306a36Sopenharmony_ci#define MPI_SCSIIO32_EEDPFLAGS_T10_CHK_GUARD        (0x0100)
36962306a36Sopenharmony_ci#define MPI_SCSIIO32_EEDPFLAGS_T10_CHK_REFTAG       (0x0200)
37062306a36Sopenharmony_ci#define MPI_SCSIIO32_EEDPFLAGS_T10_CHK_LBATAG       (0x0400)
37162306a36Sopenharmony_ci#define MPI_SCSIIO32_EEDPFLAGS_T10_CHK_SHIFT        (8)
37262306a36Sopenharmony_ci
37362306a36Sopenharmony_ci#define MPI_SCSIIO32_EEDPFLAGS_INC_SEC_APPTAG       (0x1000)
37462306a36Sopenharmony_ci#define MPI_SCSIIO32_EEDPFLAGS_INC_PRI_APPTAG       (0x2000)
37562306a36Sopenharmony_ci#define MPI_SCSIIO32_EEDPFLAGS_INC_SEC_REFTAG       (0x4000)
37662306a36Sopenharmony_ci#define MPI_SCSIIO32_EEDPFLAGS_INC_PRI_REFTAG       (0x8000)
37762306a36Sopenharmony_ci
37862306a36Sopenharmony_ci
37962306a36Sopenharmony_ci/* SCSIIO32 IO reply structure */
38062306a36Sopenharmony_citypedef struct _MSG_SCSIIO32_IO_REPLY
38162306a36Sopenharmony_ci{
38262306a36Sopenharmony_ci    U8                      Port;                       /* 00h */
38362306a36Sopenharmony_ci    U8                      Reserved1;                  /* 01h */
38462306a36Sopenharmony_ci    U8                      MsgLength;                  /* 02h */
38562306a36Sopenharmony_ci    U8                      Function;                   /* 03h */
38662306a36Sopenharmony_ci    U8                      CDBLength;                  /* 04h */
38762306a36Sopenharmony_ci    U8                      SenseBufferLength;          /* 05h */
38862306a36Sopenharmony_ci    U8                      Flags;                      /* 06h */
38962306a36Sopenharmony_ci    U8                      MsgFlags;                   /* 07h */
39062306a36Sopenharmony_ci    U32                     MsgContext;                 /* 08h */
39162306a36Sopenharmony_ci    U8                      SCSIStatus;                 /* 0Ch */
39262306a36Sopenharmony_ci    U8                      SCSIState;                  /* 0Dh */
39362306a36Sopenharmony_ci    U16                     IOCStatus;                  /* 0Eh */
39462306a36Sopenharmony_ci    U32                     IOCLogInfo;                 /* 10h */
39562306a36Sopenharmony_ci    U32                     TransferCount;              /* 14h */
39662306a36Sopenharmony_ci    U32                     SenseCount;                 /* 18h */
39762306a36Sopenharmony_ci    U32                     ResponseInfo;               /* 1Ch */
39862306a36Sopenharmony_ci    U16                     TaskTag;                    /* 20h */
39962306a36Sopenharmony_ci    U16                     Reserved2;                  /* 22h */
40062306a36Sopenharmony_ci    U32                     BidirectionalTransferCount; /* 24h */
40162306a36Sopenharmony_ci} MSG_SCSIIO32_IO_REPLY, MPI_POINTER PTR_MSG_SCSIIO32_IO_REPLY,
40262306a36Sopenharmony_ci  SCSIIO32Reply_t, MPI_POINTER pSCSIIO32Reply_t;
40362306a36Sopenharmony_ci
40462306a36Sopenharmony_ci
40562306a36Sopenharmony_ci/****************************************************************************/
40662306a36Sopenharmony_ci/*  SCSI Task Management messages                                           */
40762306a36Sopenharmony_ci/****************************************************************************/
40862306a36Sopenharmony_ci
40962306a36Sopenharmony_citypedef struct _MSG_SCSI_TASK_MGMT
41062306a36Sopenharmony_ci{
41162306a36Sopenharmony_ci    U8                      TargetID;           /* 00h */
41262306a36Sopenharmony_ci    U8                      Bus;                /* 01h */
41362306a36Sopenharmony_ci    U8                      ChainOffset;        /* 02h */
41462306a36Sopenharmony_ci    U8                      Function;           /* 03h */
41562306a36Sopenharmony_ci    U8                      Reserved;           /* 04h */
41662306a36Sopenharmony_ci    U8                      TaskType;           /* 05h */
41762306a36Sopenharmony_ci    U8                      Reserved1;          /* 06h */
41862306a36Sopenharmony_ci    U8                      MsgFlags;           /* 07h */
41962306a36Sopenharmony_ci    U32                     MsgContext;         /* 08h */
42062306a36Sopenharmony_ci    U8                      LUN[8];             /* 0Ch */
42162306a36Sopenharmony_ci    U32                     Reserved2[7];       /* 14h */
42262306a36Sopenharmony_ci    U32                     TaskMsgContext;     /* 30h */
42362306a36Sopenharmony_ci} MSG_SCSI_TASK_MGMT, MPI_POINTER PTR_SCSI_TASK_MGMT,
42462306a36Sopenharmony_ci  SCSITaskMgmt_t, MPI_POINTER pSCSITaskMgmt_t;
42562306a36Sopenharmony_ci
42662306a36Sopenharmony_ci/* TaskType values */
42762306a36Sopenharmony_ci
42862306a36Sopenharmony_ci#define MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK            (0x01)
42962306a36Sopenharmony_ci#define MPI_SCSITASKMGMT_TASKTYPE_ABRT_TASK_SET         (0x02)
43062306a36Sopenharmony_ci#define MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET          (0x03)
43162306a36Sopenharmony_ci#define MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS             (0x04)
43262306a36Sopenharmony_ci#define MPI_SCSITASKMGMT_TASKTYPE_LOGICAL_UNIT_RESET    (0x05)
43362306a36Sopenharmony_ci#define MPI_SCSITASKMGMT_TASKTYPE_CLEAR_TASK_SET        (0x06)
43462306a36Sopenharmony_ci#define MPI_SCSITASKMGMT_TASKTYPE_QUERY_TASK            (0x07)
43562306a36Sopenharmony_ci#define MPI_SCSITASKMGMT_TASKTYPE_CLR_ACA               (0x08)
43662306a36Sopenharmony_ci
43762306a36Sopenharmony_ci/* MsgFlags bits */
43862306a36Sopenharmony_ci#define MPI_SCSITASKMGMT_MSGFLAGS_DO_NOT_SEND_TASK_IU   (0x01)
43962306a36Sopenharmony_ci
44062306a36Sopenharmony_ci#define MPI_SCSITASKMGMT_MSGFLAGS_TARGET_RESET_OPTION   (0x00)
44162306a36Sopenharmony_ci#define MPI_SCSITASKMGMT_MSGFLAGS_LIP_RESET_OPTION      (0x02)
44262306a36Sopenharmony_ci#define MPI_SCSITASKMGMT_MSGFLAGS_LIPRESET_RESET_OPTION (0x04)
44362306a36Sopenharmony_ci
44462306a36Sopenharmony_ci#define MPI_SCSITASKMGMT_MSGFLAGS_SOFT_RESET_OPTION     (0x08)
44562306a36Sopenharmony_ci
44662306a36Sopenharmony_ci/* SCSI Task Management Reply */
44762306a36Sopenharmony_citypedef struct _MSG_SCSI_TASK_MGMT_REPLY
44862306a36Sopenharmony_ci{
44962306a36Sopenharmony_ci    U8                      TargetID;           /* 00h */
45062306a36Sopenharmony_ci    U8                      Bus;                /* 01h */
45162306a36Sopenharmony_ci    U8                      MsgLength;          /* 02h */
45262306a36Sopenharmony_ci    U8                      Function;           /* 03h */
45362306a36Sopenharmony_ci    U8                      ResponseCode;       /* 04h */
45462306a36Sopenharmony_ci    U8                      TaskType;           /* 05h */
45562306a36Sopenharmony_ci    U8                      Reserved1;          /* 06h */
45662306a36Sopenharmony_ci    U8                      MsgFlags;           /* 07h */
45762306a36Sopenharmony_ci    U32                     MsgContext;         /* 08h */
45862306a36Sopenharmony_ci    U8                      Reserved2[2];       /* 0Ch */
45962306a36Sopenharmony_ci    U16                     IOCStatus;          /* 0Eh */
46062306a36Sopenharmony_ci    U32                     IOCLogInfo;         /* 10h */
46162306a36Sopenharmony_ci    U32                     TerminationCount;   /* 14h */
46262306a36Sopenharmony_ci} MSG_SCSI_TASK_MGMT_REPLY, MPI_POINTER PTR_MSG_SCSI_TASK_MGMT_REPLY,
46362306a36Sopenharmony_ci  SCSITaskMgmtReply_t, MPI_POINTER pSCSITaskMgmtReply_t;
46462306a36Sopenharmony_ci
46562306a36Sopenharmony_ci/* ResponseCode values */
46662306a36Sopenharmony_ci#define MPI_SCSITASKMGMT_RSP_TM_COMPLETE                (0x00)
46762306a36Sopenharmony_ci#define MPI_SCSITASKMGMT_RSP_INVALID_FRAME              (0x02)
46862306a36Sopenharmony_ci#define MPI_SCSITASKMGMT_RSP_TM_NOT_SUPPORTED           (0x04)
46962306a36Sopenharmony_ci#define MPI_SCSITASKMGMT_RSP_TM_FAILED                  (0x05)
47062306a36Sopenharmony_ci#define MPI_SCSITASKMGMT_RSP_TM_SUCCEEDED               (0x08)
47162306a36Sopenharmony_ci#define MPI_SCSITASKMGMT_RSP_TM_INVALID_LUN             (0x09)
47262306a36Sopenharmony_ci#define MPI_SCSITASKMGMT_RSP_IO_QUEUED_ON_IOC           (0x80)
47362306a36Sopenharmony_ci
47462306a36Sopenharmony_ci
47562306a36Sopenharmony_ci/****************************************************************************/
47662306a36Sopenharmony_ci/*  SCSI Enclosure Processor messages                                       */
47762306a36Sopenharmony_ci/****************************************************************************/
47862306a36Sopenharmony_ci
47962306a36Sopenharmony_citypedef struct _MSG_SEP_REQUEST
48062306a36Sopenharmony_ci{
48162306a36Sopenharmony_ci    U8                      TargetID;           /* 00h */
48262306a36Sopenharmony_ci    U8                      Bus;                /* 01h */
48362306a36Sopenharmony_ci    U8                      ChainOffset;        /* 02h */
48462306a36Sopenharmony_ci    U8                      Function;           /* 03h */
48562306a36Sopenharmony_ci    U8                      Action;             /* 04h */
48662306a36Sopenharmony_ci    U8                      Flags;              /* 05h */
48762306a36Sopenharmony_ci    U8                      Reserved1;          /* 06h */
48862306a36Sopenharmony_ci    U8                      MsgFlags;           /* 07h */
48962306a36Sopenharmony_ci    U32                     MsgContext;         /* 08h */
49062306a36Sopenharmony_ci    U32                     SlotStatus;         /* 0Ch */
49162306a36Sopenharmony_ci    U32                     Reserved2;          /* 10h */
49262306a36Sopenharmony_ci    U32                     Reserved3;          /* 14h */
49362306a36Sopenharmony_ci    U32                     Reserved4;          /* 18h */
49462306a36Sopenharmony_ci    U16                     Slot;               /* 1Ch */
49562306a36Sopenharmony_ci    U16                     EnclosureHandle;    /* 1Eh */
49662306a36Sopenharmony_ci} MSG_SEP_REQUEST, MPI_POINTER PTR_MSG_SEP_REQUEST,
49762306a36Sopenharmony_ci  SEPRequest_t, MPI_POINTER pSEPRequest_t;
49862306a36Sopenharmony_ci
49962306a36Sopenharmony_ci/* Action defines */
50062306a36Sopenharmony_ci#define MPI_SEP_REQ_ACTION_WRITE_STATUS                 (0x00)
50162306a36Sopenharmony_ci#define MPI_SEP_REQ_ACTION_READ_STATUS                  (0x01)
50262306a36Sopenharmony_ci
50362306a36Sopenharmony_ci/* Flags defines */
50462306a36Sopenharmony_ci#define MPI_SEP_REQ_FLAGS_ENCLOSURE_SLOT_ADDRESS        (0x01)
50562306a36Sopenharmony_ci#define MPI_SEP_REQ_FLAGS_BUS_TARGETID_ADDRESS          (0x00)
50662306a36Sopenharmony_ci
50762306a36Sopenharmony_ci/* SlotStatus bits for MSG_SEP_REQUEST */
50862306a36Sopenharmony_ci#define MPI_SEP_REQ_SLOTSTATUS_NO_ERROR                 (0x00000001)
50962306a36Sopenharmony_ci#define MPI_SEP_REQ_SLOTSTATUS_DEV_FAULTY               (0x00000002)
51062306a36Sopenharmony_ci#define MPI_SEP_REQ_SLOTSTATUS_DEV_REBUILDING           (0x00000004)
51162306a36Sopenharmony_ci#define MPI_SEP_REQ_SLOTSTATUS_IN_FAILED_ARRAY          (0x00000008)
51262306a36Sopenharmony_ci#define MPI_SEP_REQ_SLOTSTATUS_IN_CRITICAL_ARRAY        (0x00000010)
51362306a36Sopenharmony_ci#define MPI_SEP_REQ_SLOTSTATUS_PARITY_CHECK             (0x00000020)
51462306a36Sopenharmony_ci#define MPI_SEP_REQ_SLOTSTATUS_PREDICTED_FAULT          (0x00000040)
51562306a36Sopenharmony_ci#define MPI_SEP_REQ_SLOTSTATUS_UNCONFIGURED             (0x00000080)
51662306a36Sopenharmony_ci#define MPI_SEP_REQ_SLOTSTATUS_HOT_SPARE                (0x00000100)
51762306a36Sopenharmony_ci#define MPI_SEP_REQ_SLOTSTATUS_REBUILD_STOPPED          (0x00000200)
51862306a36Sopenharmony_ci#define MPI_SEP_REQ_SLOTSTATUS_REQ_CONSISTENCY_CHECK    (0x00001000)
51962306a36Sopenharmony_ci#define MPI_SEP_REQ_SLOTSTATUS_DISABLE                  (0x00002000)
52062306a36Sopenharmony_ci#define MPI_SEP_REQ_SLOTSTATUS_REQ_RESERVED_DEVICE      (0x00004000)
52162306a36Sopenharmony_ci#define MPI_SEP_REQ_SLOTSTATUS_IDENTIFY_REQUEST         (0x00020000)
52262306a36Sopenharmony_ci#define MPI_SEP_REQ_SLOTSTATUS_REQUEST_REMOVE           (0x00040000)
52362306a36Sopenharmony_ci#define MPI_SEP_REQ_SLOTSTATUS_REQUEST_INSERT           (0x00080000)
52462306a36Sopenharmony_ci#define MPI_SEP_REQ_SLOTSTATUS_DO_NOT_MOVE              (0x00400000)
52562306a36Sopenharmony_ci#define MPI_SEP_REQ_SLOTSTATUS_ACTIVE                   (0x00800000)
52662306a36Sopenharmony_ci#define MPI_SEP_REQ_SLOTSTATUS_B_ENABLE_BYPASS          (0x04000000)
52762306a36Sopenharmony_ci#define MPI_SEP_REQ_SLOTSTATUS_A_ENABLE_BYPASS          (0x08000000)
52862306a36Sopenharmony_ci#define MPI_SEP_REQ_SLOTSTATUS_DEV_OFF                  (0x10000000)
52962306a36Sopenharmony_ci#define MPI_SEP_REQ_SLOTSTATUS_SWAP_RESET               (0x80000000)
53062306a36Sopenharmony_ci
53162306a36Sopenharmony_ci
53262306a36Sopenharmony_citypedef struct _MSG_SEP_REPLY
53362306a36Sopenharmony_ci{
53462306a36Sopenharmony_ci    U8                      TargetID;           /* 00h */
53562306a36Sopenharmony_ci    U8                      Bus;                /* 01h */
53662306a36Sopenharmony_ci    U8                      MsgLength;          /* 02h */
53762306a36Sopenharmony_ci    U8                      Function;           /* 03h */
53862306a36Sopenharmony_ci    U8                      Action;             /* 04h */
53962306a36Sopenharmony_ci    U8                      Reserved1;          /* 05h */
54062306a36Sopenharmony_ci    U8                      Reserved2;          /* 06h */
54162306a36Sopenharmony_ci    U8                      MsgFlags;           /* 07h */
54262306a36Sopenharmony_ci    U32                     MsgContext;         /* 08h */
54362306a36Sopenharmony_ci    U16                     Reserved3;          /* 0Ch */
54462306a36Sopenharmony_ci    U16                     IOCStatus;          /* 0Eh */
54562306a36Sopenharmony_ci    U32                     IOCLogInfo;         /* 10h */
54662306a36Sopenharmony_ci    U32                     SlotStatus;         /* 14h */
54762306a36Sopenharmony_ci    U32                     Reserved4;          /* 18h */
54862306a36Sopenharmony_ci    U16                     Slot;               /* 1Ch */
54962306a36Sopenharmony_ci    U16                     EnclosureHandle;    /* 1Eh */
55062306a36Sopenharmony_ci} MSG_SEP_REPLY, MPI_POINTER PTR_MSG_SEP_REPLY,
55162306a36Sopenharmony_ci  SEPReply_t, MPI_POINTER pSEPReply_t;
55262306a36Sopenharmony_ci
55362306a36Sopenharmony_ci/* SlotStatus bits for MSG_SEP_REPLY */
55462306a36Sopenharmony_ci#define MPI_SEP_REPLY_SLOTSTATUS_NO_ERROR               (0x00000001)
55562306a36Sopenharmony_ci#define MPI_SEP_REPLY_SLOTSTATUS_DEV_FAULTY             (0x00000002)
55662306a36Sopenharmony_ci#define MPI_SEP_REPLY_SLOTSTATUS_DEV_REBUILDING         (0x00000004)
55762306a36Sopenharmony_ci#define MPI_SEP_REPLY_SLOTSTATUS_IN_FAILED_ARRAY        (0x00000008)
55862306a36Sopenharmony_ci#define MPI_SEP_REPLY_SLOTSTATUS_IN_CRITICAL_ARRAY      (0x00000010)
55962306a36Sopenharmony_ci#define MPI_SEP_REPLY_SLOTSTATUS_PARITY_CHECK           (0x00000020)
56062306a36Sopenharmony_ci#define MPI_SEP_REPLY_SLOTSTATUS_PREDICTED_FAULT        (0x00000040)
56162306a36Sopenharmony_ci#define MPI_SEP_REPLY_SLOTSTATUS_UNCONFIGURED           (0x00000080)
56262306a36Sopenharmony_ci#define MPI_SEP_REPLY_SLOTSTATUS_HOT_SPARE              (0x00000100)
56362306a36Sopenharmony_ci#define MPI_SEP_REPLY_SLOTSTATUS_REBUILD_STOPPED        (0x00000200)
56462306a36Sopenharmony_ci#define MPI_SEP_REPLY_SLOTSTATUS_CONSISTENCY_CHECK      (0x00001000)
56562306a36Sopenharmony_ci#define MPI_SEP_REPLY_SLOTSTATUS_DISABLE                (0x00002000)
56662306a36Sopenharmony_ci#define MPI_SEP_REPLY_SLOTSTATUS_RESERVED_DEVICE        (0x00004000)
56762306a36Sopenharmony_ci#define MPI_SEP_REPLY_SLOTSTATUS_REPORT                 (0x00010000)
56862306a36Sopenharmony_ci#define MPI_SEP_REPLY_SLOTSTATUS_IDENTIFY_REQUEST       (0x00020000)
56962306a36Sopenharmony_ci#define MPI_SEP_REPLY_SLOTSTATUS_REMOVE_READY           (0x00040000)
57062306a36Sopenharmony_ci#define MPI_SEP_REPLY_SLOTSTATUS_INSERT_READY           (0x00080000)
57162306a36Sopenharmony_ci#define MPI_SEP_REPLY_SLOTSTATUS_DO_NOT_REMOVE          (0x00400000)
57262306a36Sopenharmony_ci#define MPI_SEP_REPLY_SLOTSTATUS_ACTIVE                 (0x00800000)
57362306a36Sopenharmony_ci#define MPI_SEP_REPLY_SLOTSTATUS_B_BYPASS_ENABLED       (0x01000000)
57462306a36Sopenharmony_ci#define MPI_SEP_REPLY_SLOTSTATUS_A_BYPASS_ENABLED       (0x02000000)
57562306a36Sopenharmony_ci#define MPI_SEP_REPLY_SLOTSTATUS_B_ENABLE_BYPASS        (0x04000000)
57662306a36Sopenharmony_ci#define MPI_SEP_REPLY_SLOTSTATUS_A_ENABLE_BYPASS        (0x08000000)
57762306a36Sopenharmony_ci#define MPI_SEP_REPLY_SLOTSTATUS_DEV_OFF                (0x10000000)
57862306a36Sopenharmony_ci#define MPI_SEP_REPLY_SLOTSTATUS_FAULT_SENSED           (0x40000000)
57962306a36Sopenharmony_ci#define MPI_SEP_REPLY_SLOTSTATUS_SWAPPED                (0x80000000)
58062306a36Sopenharmony_ci
58162306a36Sopenharmony_ci#endif
582