xref: /freebsd/sys/dev/mpt/mpilib/mpi_init.h (revision 098ca2bda93c701c5331d4e6aace072495b4caaa)
19b631363SMatt Jacob /* $FreeBSD$ */
2098ca2bdSWarner Losh /*-
3d3ecac66SMatt Jacob  * Copyright (c) 2000, 2001 by LSI Logic Corporation
4d3ecac66SMatt Jacob  *
5d3ecac66SMatt Jacob  * Redistribution and use in source and binary forms, with or without
6d3ecac66SMatt Jacob  * modification, are permitted provided that the following conditions
7d3ecac66SMatt Jacob  * are met:
8d3ecac66SMatt Jacob  * 1. Redistributions of source code must retain the above copyright
9d3ecac66SMatt Jacob  *    notice immediately at the beginning of the file, without modification,
10d3ecac66SMatt Jacob  *    this list of conditions, and the following disclaimer.
11d3ecac66SMatt Jacob  * 2. The name of the author may not be used to endorse or promote products
12d3ecac66SMatt Jacob  *    derived from this software without specific prior written permission.
13d3ecac66SMatt Jacob  *
14d3ecac66SMatt Jacob  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15d3ecac66SMatt Jacob  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16d3ecac66SMatt Jacob  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17d3ecac66SMatt Jacob  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
18d3ecac66SMatt Jacob  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19d3ecac66SMatt Jacob  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20d3ecac66SMatt Jacob  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21d3ecac66SMatt Jacob  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22d3ecac66SMatt Jacob  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23d3ecac66SMatt Jacob  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24d3ecac66SMatt Jacob  * SUCH DAMAGE.
259b631363SMatt Jacob  *
269b631363SMatt Jacob  *
279b631363SMatt Jacob  *           Name:  MPI_INIT.H
289b631363SMatt Jacob  *          Title:  MPI initiator mode messages and structures
299b631363SMatt Jacob  *  Creation Date:  June 8, 2000
309b631363SMatt Jacob  *
317fed69eeSMatt Jacob  *    MPI_INIT.H Version:  01.02.06
329b631363SMatt Jacob  *
339b631363SMatt Jacob  *  Version History
349b631363SMatt Jacob  *  ---------------
359b631363SMatt Jacob  *
369b631363SMatt Jacob  *  Date      Version   Description
379b631363SMatt Jacob  *  --------  --------  ------------------------------------------------------
389b631363SMatt Jacob  *  05-08-00  00.10.01  Original release for 0.10 spec dated 4/26/2000.
399b631363SMatt Jacob  *  05-24-00  00.10.02  Added SenseBufferLength to _MSG_SCSI_IO_REPLY.
409b631363SMatt Jacob  *  06-06-00  01.00.01  Update version number for 1.0 release.
419b631363SMatt Jacob  *  06-08-00  01.00.02  Added MPI_SCSI_RSP_INFO_ definitions.
429b631363SMatt Jacob  *  11-02-00  01.01.01  Original release for post 1.0 work.
439b631363SMatt Jacob  *  12-04-00  01.01.02  Added MPI_SCSIIO_CONTROL_NO_DISCONNECT.
449b631363SMatt Jacob  *  02-20-01  01.01.03  Started using MPI_POINTER.
459b631363SMatt Jacob  *  03-27-01  01.01.04  Added structure offset comments.
469b631363SMatt Jacob  *  04-10-01  01.01.05  Added new MsgFlag for MSG_SCSI_TASK_MGMT.
479b631363SMatt Jacob  *  08-08-01  01.02.01  Original release for v1.2 work.
489b631363SMatt Jacob  *  08-29-01  01.02.02  Added MPI_SCSITASKMGMT_TASKTYPE_LOGICAL_UNIT_RESET.
499b631363SMatt Jacob  *                      Added MPI_SCSI_STATE_QUEUE_TAG_REJECTED for
509b631363SMatt Jacob  *                      MSG_SCSI_IO_REPLY.
519b631363SMatt Jacob  *  09-28-01  01.02.03  Added structures and defines for SCSI Enclosure
529b631363SMatt Jacob  *                      Processor messages.
539b631363SMatt Jacob  *  10-04-01  01.02.04  Added defines for SEP request Action field.
547fed69eeSMatt Jacob  *  05-31-02  01.02.05  Added MPI_SCSIIO_MSGFLGS_CMD_DETERMINES_DATA_DIR define
557fed69eeSMatt Jacob  *                      for SCSI IO requests.
567fed69eeSMatt Jacob  *  11-15-02  01.02.06  Added special extended SCSI Status defines for FCP.
579b631363SMatt Jacob  *  --------------------------------------------------------------------------
589b631363SMatt Jacob  */
599b631363SMatt Jacob 
609b631363SMatt Jacob #ifndef MPI_INIT_H
619b631363SMatt Jacob #define MPI_INIT_H
629b631363SMatt Jacob 
639b631363SMatt Jacob 
649b631363SMatt Jacob /*****************************************************************************
659b631363SMatt Jacob *
669b631363SMatt Jacob *               S C S I    I n i t i a t o r    M e s s a g e s
679b631363SMatt Jacob *
689b631363SMatt Jacob *****************************************************************************/
699b631363SMatt Jacob 
709b631363SMatt Jacob /****************************************************************************/
719b631363SMatt Jacob /*  SCSI IO messages and assocaited structures                              */
729b631363SMatt Jacob /****************************************************************************/
739b631363SMatt Jacob 
749b631363SMatt Jacob typedef struct _MSG_SCSI_IO_REQUEST
759b631363SMatt Jacob {
769b631363SMatt Jacob     U8                      TargetID;           /* 00h */
779b631363SMatt Jacob     U8                      Bus;                /* 01h */
789b631363SMatt Jacob     U8                      ChainOffset;        /* 02h */
799b631363SMatt Jacob     U8                      Function;           /* 03h */
809b631363SMatt Jacob     U8                      CDBLength;          /* 04h */
819b631363SMatt Jacob     U8                      SenseBufferLength;  /* 05h */
829b631363SMatt Jacob     U8                      Reserved;           /* 06h */
839b631363SMatt Jacob     U8                      MsgFlags;           /* 07h */
849b631363SMatt Jacob     U32                     MsgContext;         /* 08h */
859b631363SMatt Jacob     U8                      LUN[8];             /* 0Ch */
869b631363SMatt Jacob     U32                     Control;            /* 14h */
879b631363SMatt Jacob     U8                      CDB[16];            /* 18h */
889b631363SMatt Jacob     U32                     DataLength;         /* 28h */
899b631363SMatt Jacob     U32                     SenseBufferLowAddr; /* 2Ch */
909b631363SMatt Jacob     SGE_IO_UNION            SGL;                /* 30h */
919b631363SMatt Jacob } MSG_SCSI_IO_REQUEST, MPI_POINTER PTR_MSG_SCSI_IO_REQUEST,
929b631363SMatt Jacob   SCSIIORequest_t, MPI_POINTER pSCSIIORequest_t;
939b631363SMatt Jacob 
949b631363SMatt Jacob 
957fed69eeSMatt Jacob /* SCSI IO MsgFlags bits */
969b631363SMatt Jacob 
979b631363SMatt Jacob #define MPI_SCSIIO_MSGFLGS_SENSE_WIDTH              (0x01)
989b631363SMatt Jacob #define MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_32           (0x00)
999b631363SMatt Jacob #define MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_64           (0x01)
1009b631363SMatt Jacob #define MPI_SCSIIO_MSGFLGS_SENSE_LOCATION           (0x02)
1019b631363SMatt Jacob #define MPI_SCSIIO_MSGFLGS_SENSE_LOC_HOST           (0x00)
1029b631363SMatt Jacob #define MPI_SCSIIO_MSGFLGS_SENSE_LOC_IOC            (0x02)
1037fed69eeSMatt Jacob #define MPI_SCSIIO_MSGFLGS_CMD_DETERMINES_DATA_DIR  (0x04)
1049b631363SMatt Jacob 
1059b631363SMatt Jacob /* SCSI IO LUN fields */
1069b631363SMatt Jacob 
1079b631363SMatt Jacob #define MPI_SCSIIO_LUN_FIRST_LEVEL_ADDRESSING   (0x0000FFFF)
1089b631363SMatt Jacob #define MPI_SCSIIO_LUN_SECOND_LEVEL_ADDRESSING  (0xFFFF0000)
1099b631363SMatt Jacob #define MPI_SCSIIO_LUN_THIRD_LEVEL_ADDRESSING   (0x0000FFFF)
1109b631363SMatt Jacob #define MPI_SCSIIO_LUN_FOURTH_LEVEL_ADDRESSING  (0xFFFF0000)
1119b631363SMatt Jacob #define MPI_SCSIIO_LUN_LEVEL_1_WORD             (0xFF00)
1129b631363SMatt Jacob #define MPI_SCSIIO_LUN_LEVEL_1_DWORD            (0x0000FF00)
1139b631363SMatt Jacob 
1147fed69eeSMatt Jacob /* SCSI IO Control bits */
1159b631363SMatt Jacob 
1169b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_DATADIRECTION_MASK   (0x03000000)
1179b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_NODATATRANSFER       (0x00000000)
1189b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_WRITE                (0x01000000)
1199b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_READ                 (0x02000000)
1209b631363SMatt Jacob 
1219b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_ADDCDBLEN_MASK       (0x3C000000)
1229b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_ADDCDBLEN_SHIFT      (26)
1239b631363SMatt Jacob 
1249b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_TASKATTRIBUTE_MASK   (0x00000700)
1259b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_SIMPLEQ              (0x00000000)
1269b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_HEADOFQ              (0x00000100)
1279b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_ORDEREDQ             (0x00000200)
1289b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_ACAQ                 (0x00000400)
1299b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_UNTAGGED             (0x00000500)
1309b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_NO_DISCONNECT        (0x00000700)
1319b631363SMatt Jacob 
1329b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_TASKMANAGE_MASK      (0x00FF0000)
1339b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_OBSOLETE             (0x00800000)
1349b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_CLEAR_ACA_RSV        (0x00400000)
1359b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_TARGET_RESET         (0x00200000)
1369b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_LUN_RESET_RSV        (0x00100000)
1379b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_RESERVED             (0x00080000)
1389b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_CLR_TASK_SET_RSV     (0x00040000)
1399b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_ABORT_TASK_SET       (0x00020000)
1409b631363SMatt Jacob #define MPI_SCSIIO_CONTROL_RESERVED2            (0x00010000)
1419b631363SMatt Jacob 
1429b631363SMatt Jacob 
1439b631363SMatt Jacob /* SCSI IO reply structure */
1449b631363SMatt Jacob typedef struct _MSG_SCSI_IO_REPLY
1459b631363SMatt Jacob {
1469b631363SMatt Jacob     U8                      TargetID;           /* 00h */
1479b631363SMatt Jacob     U8                      Bus;                /* 01h */
1489b631363SMatt Jacob     U8                      MsgLength;          /* 02h */
1499b631363SMatt Jacob     U8                      Function;           /* 03h */
1509b631363SMatt Jacob     U8                      CDBLength;          /* 04h */
1519b631363SMatt Jacob     U8                      SenseBufferLength;  /* 05h */
1529b631363SMatt Jacob     U8                      Reserved;           /* 06h */
1539b631363SMatt Jacob     U8                      MsgFlags;           /* 07h */
1549b631363SMatt Jacob     U32                     MsgContext;         /* 08h */
1559b631363SMatt Jacob     U8                      SCSIStatus;         /* 0Ch */
1569b631363SMatt Jacob     U8                      SCSIState;          /* 0Dh */
1579b631363SMatt Jacob     U16                     IOCStatus;          /* 0Eh */
1589b631363SMatt Jacob     U32                     IOCLogInfo;         /* 10h */
1599b631363SMatt Jacob     U32                     TransferCount;      /* 14h */
1609b631363SMatt Jacob     U32                     SenseCount;         /* 18h */
1619b631363SMatt Jacob     U32                     ResponseInfo;       /* 1Ch */
1629b631363SMatt Jacob } MSG_SCSI_IO_REPLY, MPI_POINTER PTR_MSG_SCSI_IO_REPLY,
1639b631363SMatt Jacob   SCSIIOReply_t, MPI_POINTER pSCSIIOReply_t;
1649b631363SMatt Jacob 
1659b631363SMatt Jacob 
1669b631363SMatt Jacob /* SCSI IO Reply SCSIStatus values (SAM-2 status codes) */
1679b631363SMatt Jacob 
1689b631363SMatt Jacob #define MPI_SCSI_STATUS_SUCCESS                 (0x00)
1699b631363SMatt Jacob #define MPI_SCSI_STATUS_CHECK_CONDITION         (0x02)
1709b631363SMatt Jacob #define MPI_SCSI_STATUS_CONDITION_MET           (0x04)
1719b631363SMatt Jacob #define MPI_SCSI_STATUS_BUSY                    (0x08)
1729b631363SMatt Jacob #define MPI_SCSI_STATUS_INTERMEDIATE            (0x10)
1739b631363SMatt Jacob #define MPI_SCSI_STATUS_INTERMEDIATE_CONDMET    (0x14)
1749b631363SMatt Jacob #define MPI_SCSI_STATUS_RESERVATION_CONFLICT    (0x18)
1759b631363SMatt Jacob #define MPI_SCSI_STATUS_COMMAND_TERMINATED      (0x22)
1769b631363SMatt Jacob #define MPI_SCSI_STATUS_TASK_SET_FULL           (0x28)
1779b631363SMatt Jacob #define MPI_SCSI_STATUS_ACA_ACTIVE              (0x30)
1789b631363SMatt Jacob 
1797fed69eeSMatt Jacob #define MPI_SCSI_STATUS_FCPEXT_DEVICE_LOGGED_OUT    (0x80)
1807fed69eeSMatt Jacob #define MPI_SCSI_STATUS_FCPEXT_NO_LINK              (0x81)
1817fed69eeSMatt Jacob 
1829b631363SMatt Jacob 
1839b631363SMatt Jacob /* SCSI IO Reply SCSIState values */
1849b631363SMatt Jacob 
1859b631363SMatt Jacob #define MPI_SCSI_STATE_AUTOSENSE_VALID          (0x01)
1869b631363SMatt Jacob #define MPI_SCSI_STATE_AUTOSENSE_FAILED         (0x02)
1879b631363SMatt Jacob #define MPI_SCSI_STATE_NO_SCSI_STATUS           (0x04)
1889b631363SMatt Jacob #define MPI_SCSI_STATE_TERMINATED               (0x08)
1899b631363SMatt Jacob #define MPI_SCSI_STATE_RESPONSE_INFO_VALID      (0x10)
1909b631363SMatt Jacob #define MPI_SCSI_STATE_QUEUE_TAG_REJECTED       (0x20)
1919b631363SMatt Jacob 
1929b631363SMatt Jacob /* SCSI IO Reply ResponseInfo values */
1939b631363SMatt Jacob /* (FCP-1 RSP_CODE values and SPI-3 Packetized Failure codes) */
1949b631363SMatt Jacob 
1959b631363SMatt Jacob #define MPI_SCSI_RSP_INFO_FUNCTION_COMPLETE     (0x00000000)
1969b631363SMatt Jacob #define MPI_SCSI_RSP_INFO_FCP_BURST_LEN_ERROR   (0x01000000)
1979b631363SMatt Jacob #define MPI_SCSI_RSP_INFO_CMND_FIELDS_INVALID   (0x02000000)
1989b631363SMatt Jacob #define MPI_SCSI_RSP_INFO_FCP_DATA_RO_ERROR     (0x03000000)
1999b631363SMatt Jacob #define MPI_SCSI_RSP_INFO_TASK_MGMT_UNSUPPORTED (0x04000000)
2009b631363SMatt Jacob #define MPI_SCSI_RSP_INFO_TASK_MGMT_FAILED      (0x05000000)
2019b631363SMatt Jacob #define MPI_SCSI_RSP_INFO_SPI_LQ_INVALID_TYPE   (0x06000000)
2029b631363SMatt Jacob 
2039b631363SMatt Jacob 
2049b631363SMatt Jacob /****************************************************************************/
2059b631363SMatt Jacob /*  SCSI Task Management messages                                           */
2069b631363SMatt Jacob /****************************************************************************/
2079b631363SMatt Jacob 
2089b631363SMatt Jacob typedef struct _MSG_SCSI_TASK_MGMT
2099b631363SMatt Jacob {
2109b631363SMatt Jacob     U8                      TargetID;           /* 00h */
2119b631363SMatt Jacob     U8                      Bus;                /* 01h */
2129b631363SMatt Jacob     U8                      ChainOffset;        /* 02h */
2139b631363SMatt Jacob     U8                      Function;           /* 03h */
2149b631363SMatt Jacob     U8                      Reserved;           /* 04h */
2159b631363SMatt Jacob     U8                      TaskType;           /* 05h */
2169b631363SMatt Jacob     U8                      Reserved1;          /* 06h */
2179b631363SMatt Jacob     U8                      MsgFlags;           /* 07h */
2189b631363SMatt Jacob     U32                     MsgContext;         /* 08h */
2199b631363SMatt Jacob     U8                      LUN[8];             /* 0Ch */
2209b631363SMatt Jacob     U32                     Reserved2[7];       /* 14h */
2219b631363SMatt Jacob     U32                     TaskMsgContext;     /* 30h */
2229b631363SMatt Jacob } MSG_SCSI_TASK_MGMT, MPI_POINTER PTR_SCSI_TASK_MGMT,
2239b631363SMatt Jacob   SCSITaskMgmt_t, MPI_POINTER pSCSITaskMgmt_t;
2249b631363SMatt Jacob 
2259b631363SMatt Jacob /* TaskType values */
2269b631363SMatt Jacob 
2279b631363SMatt Jacob #define MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK            (0x01)
2289b631363SMatt Jacob #define MPI_SCSITASKMGMT_TASKTYPE_ABRT_TASK_SET         (0x02)
2299b631363SMatt Jacob #define MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET          (0x03)
2309b631363SMatt Jacob #define MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS             (0x04)
2319b631363SMatt Jacob #define MPI_SCSITASKMGMT_TASKTYPE_LOGICAL_UNIT_RESET    (0x05)
2329b631363SMatt Jacob 
2339b631363SMatt Jacob /* MsgFlags bits */
2349b631363SMatt Jacob #define MPI_SCSITASKMGMT_MSGFLAGS_TARGET_RESET_OPTION   (0x00)
2359b631363SMatt Jacob #define MPI_SCSITASKMGMT_MSGFLAGS_LIP_RESET_OPTION      (0x02)
2369b631363SMatt Jacob #define MPI_SCSITASKMGMT_MSGFLAGS_LIPRESET_RESET_OPTION (0x04)
2379b631363SMatt Jacob 
2389b631363SMatt Jacob /* SCSI Task Management Reply */
2399b631363SMatt Jacob typedef struct _MSG_SCSI_TASK_MGMT_REPLY
2409b631363SMatt Jacob {
2419b631363SMatt Jacob     U8                      TargetID;           /* 00h */
2429b631363SMatt Jacob     U8                      Bus;                /* 01h */
2439b631363SMatt Jacob     U8                      MsgLength;          /* 02h */
2449b631363SMatt Jacob     U8                      Function;           /* 03h */
2459b631363SMatt Jacob     U8                      Reserved;           /* 04h */
2469b631363SMatt Jacob     U8                      TaskType;           /* 05h */
2479b631363SMatt Jacob     U8                      Reserved1;          /* 06h */
2489b631363SMatt Jacob     U8                      MsgFlags;           /* 07h */
2499b631363SMatt Jacob     U32                     MsgContext;         /* 08h */
2509b631363SMatt Jacob     U8                      Reserved2[2];       /* 0Ch */
2519b631363SMatt Jacob     U16                     IOCStatus;          /* 0Eh */
2529b631363SMatt Jacob     U32                     IOCLogInfo;         /* 10h */
2539b631363SMatt Jacob     U32                     TerminationCount;   /* 14h */
2549b631363SMatt Jacob } MSG_SCSI_TASK_MGMT_REPLY, MPI_POINTER PTR_MSG_SCSI_TASK_MGMT_REPLY,
2559b631363SMatt Jacob   SCSITaskMgmtReply_t, MPI_POINTER pSCSITaskMgmtReply_t;
2569b631363SMatt Jacob 
2579b631363SMatt Jacob 
2589b631363SMatt Jacob /****************************************************************************/
2599b631363SMatt Jacob /*  SCSI Enclosure Processor messages                                       */
2609b631363SMatt Jacob /****************************************************************************/
2619b631363SMatt Jacob 
2629b631363SMatt Jacob typedef struct _MSG_SEP_REQUEST
2639b631363SMatt Jacob {
2649b631363SMatt Jacob     U8                      TargetID;           /* 00h */
2659b631363SMatt Jacob     U8                      Bus;                /* 01h */
2669b631363SMatt Jacob     U8                      ChainOffset;        /* 02h */
2679b631363SMatt Jacob     U8                      Function;           /* 03h */
2689b631363SMatt Jacob     U8                      Action;             /* 04h */
2699b631363SMatt Jacob     U8                      Reserved1;          /* 05h */
2709b631363SMatt Jacob     U8                      Reserved2;          /* 06h */
2719b631363SMatt Jacob     U8                      MsgFlags;           /* 07h */
2729b631363SMatt Jacob     U32                     MsgContext;         /* 08h */
2739b631363SMatt Jacob     U32                     SlotStatus;         /* 0Ch */
2749b631363SMatt Jacob } MSG_SEP_REQUEST, MPI_POINTER PTR_MSG_SEP_REQUEST,
2759b631363SMatt Jacob   SEPRequest_t, MPI_POINTER pSEPRequest_t;
2769b631363SMatt Jacob 
2779b631363SMatt Jacob /* Action defines */
2789b631363SMatt Jacob #define MPI_SEP_REQ_ACTION_WRITE_STATUS                 (0x00)
2799b631363SMatt Jacob #define MPI_SEP_REQ_ACTION_READ_STATUS                  (0x01)
2809b631363SMatt Jacob 
2819b631363SMatt Jacob /* SlotStatus bits for MSG_SEP_REQUEST */
2829b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_NO_ERROR                 (0x00000001)
2839b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_DEV_FAULTY               (0x00000002)
2849b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_DEV_REBUILDING           (0x00000004)
2859b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_IN_FAILED_ARRAY          (0x00000008)
2869b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_IN_CRITICAL_ARRAY        (0x00000010)
2879b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_PARITY_CHECK             (0x00000020)
2889b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_PREDICTED_FAULT          (0x00000040)
2899b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_UNCONFIGURED             (0x00000080)
2909b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_HOT_SPARE                (0x00000100)
2919b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_REBUILD_STOPPED          (0x00000200)
2929b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_IDENTIFY_REQUEST         (0x00020000)
2939b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_REQUEST_REMOVE           (0x00040000)
2949b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_REQUEST_INSERT           (0x00080000)
2959b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_DO_NOT_MOVE              (0x00400000)
2969b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_B_ENABLE_BYPASS          (0x04000000)
2979b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_A_ENABLE_BYPASS          (0x08000000)
2989b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_DEV_OFF                  (0x10000000)
2999b631363SMatt Jacob #define MPI_SEP_REQ_SLOTSTATUS_SWAP_RESET               (0x80000000)
3009b631363SMatt Jacob 
3019b631363SMatt Jacob 
3029b631363SMatt Jacob typedef struct _MSG_SEP_REPLY
3039b631363SMatt Jacob {
3049b631363SMatt Jacob     U8                      TargetID;           /* 00h */
3059b631363SMatt Jacob     U8                      Bus;                /* 01h */
3069b631363SMatt Jacob     U8                      MsgLength;          /* 02h */
3079b631363SMatt Jacob     U8                      Function;           /* 03h */
3089b631363SMatt Jacob     U8                      Action;             /* 04h */
3099b631363SMatt Jacob     U8                      Reserved1;          /* 05h */
3109b631363SMatt Jacob     U8                      Reserved2;          /* 06h */
3119b631363SMatt Jacob     U8                      MsgFlags;           /* 07h */
3129b631363SMatt Jacob     U32                     MsgContext;         /* 08h */
3139b631363SMatt Jacob     U16                     Reserved3;          /* 0Ch */
3149b631363SMatt Jacob     U16                     IOCStatus;          /* 0Eh */
3159b631363SMatt Jacob     U32                     IOCLogInfo;         /* 10h */
3169b631363SMatt Jacob     U32                     SlotStatus;         /* 14h */
3179b631363SMatt Jacob } MSG_SEP_REPLY, MPI_POINTER PTR_MSG_SEP_REPLY,
3189b631363SMatt Jacob   SEPReply_t, MPI_POINTER pSEPReply_t;
3199b631363SMatt Jacob 
3209b631363SMatt Jacob /* SlotStatus bits for MSG_SEP_REPLY */
3219b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_NO_ERROR               (0x00000001)
3229b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_DEV_FAULTY             (0x00000002)
3239b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_DEV_REBUILDING         (0x00000004)
3249b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_IN_FAILED_ARRAY        (0x00000008)
3259b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_IN_CRITICAL_ARRAY      (0x00000010)
3269b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_PARITY_CHECK           (0x00000020)
3279b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_PREDICTED_FAULT        (0x00000040)
3289b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_UNCONFIGURED           (0x00000080)
3299b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_HOT_SPARE              (0x00000100)
3309b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_REBUILD_STOPPED        (0x00000200)
3319b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_REPORT                 (0x00010000)
3329b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_IDENTIFY_REQUEST       (0x00020000)
3339b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_REMOVE_READY           (0x00040000)
3349b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_INSERT_READY           (0x00080000)
3359b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_DO_NOT_REMOVE          (0x00400000)
3369b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_B_BYPASS_ENABLED       (0x01000000)
3379b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_A_BYPASS_ENABLED       (0x02000000)
3389b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_B_ENABLE_BYPASS        (0x04000000)
3399b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_A_ENABLE_BYPASS        (0x08000000)
3409b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_DEV_OFF                (0x10000000)
3419b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_FAULT_SENSED           (0x40000000)
3429b631363SMatt Jacob #define MPI_SEP_REPLY_SLOTSTATUS_SWAPPED                (0x80000000)
3439b631363SMatt Jacob 
3449b631363SMatt Jacob #endif
345