1f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy/*
2a4ffce0d63e0683060fee6bc269f7b0b12c9700aSreekanth Reddy * Copyright (c) 2000-2014 LSI Corporation.
3f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy *
4f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy *
5f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy *          Name:  mpi2_sas.h
6f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy *         Title:  MPI Serial Attached SCSI structures and definitions
7f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy * Creation Date:  February 9, 2007
8f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy *
94c8bab4d891fac7b44a8e26ec043c42bc910b391Sreekanth Reddy * mpi2_sas.h Version:  02.00.08
10f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy *
11f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy * NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25
12f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy *       prefix are for use only on MPI v2.5 products, and must not be used
13f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy *       with MPI v2.0 products. Unless otherwise noted, names beginning with
14f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy *       MPI2 or Mpi2 are for use with both MPI v2.0 and MPI v2.5 products.
15f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy *
16f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy * Version History
17f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy * ---------------
18f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy *
19f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy * Date      Version   Description
20f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy * --------  --------  ------------------------------------------------------
21f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy * 04-30-07  02.00.00  Corresponds to Fusion-MPT MPI Specification Rev A.
22f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy * 06-26-07  02.00.01  Added Clear All Persistent Operation to SAS IO Unit
23f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy *                     Control Request.
24f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy * 10-02-08  02.00.02  Added Set IOC Parameter Operation to SAS IO Unit Control
25f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy *                     Request.
26f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy * 10-28-09  02.00.03  Changed the type of SGL in MPI2_SATA_PASSTHROUGH_REQUEST
27f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy *                     to MPI2_SGE_IO_UNION since it supports chained SGLs.
28f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy * 05-12-10  02.00.04  Modified some comments.
29f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy * 08-11-10  02.00.05  Added NCQ operations to SAS IO Unit Control.
30f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy * 11-18-11  02.00.06  Incorporating additions for MPI v2.5.
31f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy * 07-10-12  02.00.07  Added MPI2_SATA_PT_SGE_UNION for use in the SATA
32f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy *                     Passthrough Request message.
334c8bab4d891fac7b44a8e26ec043c42bc910b391Sreekanth Reddy * 08-19-13  02.00.08  Made MPI2_SAS_OP_TRANSMIT_PORT_SELECT_SIGNAL obsolete
344c8bab4d891fac7b44a8e26ec043c42bc910b391Sreekanth Reddy *			for anything newer than MPI v2.0.
35f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy * --------------------------------------------------------------------------
36f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy */
37f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy
38f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#ifndef MPI2_SAS_H
39f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_H
40f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy
41f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy/*
42f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy *Values for SASStatus.
43f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy */
44f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SASSTATUS_SUCCESS                          (0x00)
45f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SASSTATUS_UNKNOWN_ERROR                    (0x01)
46f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SASSTATUS_INVALID_FRAME                    (0x02)
47f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SASSTATUS_UTC_BAD_DEST                     (0x03)
48f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SASSTATUS_UTC_BREAK_RECEIVED               (0x04)
49f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SASSTATUS_UTC_CONNECT_RATE_NOT_SUPPORTED   (0x05)
50f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SASSTATUS_UTC_PORT_LAYER_REQUEST           (0x06)
51f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SASSTATUS_UTC_PROTOCOL_NOT_SUPPORTED       (0x07)
52f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SASSTATUS_UTC_STP_RESOURCES_BUSY           (0x08)
53f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SASSTATUS_UTC_WRONG_DESTINATION            (0x09)
54f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SASSTATUS_SHORT_INFORMATION_UNIT           (0x0A)
55f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SASSTATUS_LONG_INFORMATION_UNIT            (0x0B)
56f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SASSTATUS_XFER_RDY_INCORRECT_WRITE_DATA    (0x0C)
57f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SASSTATUS_XFER_RDY_REQUEST_OFFSET_ERROR    (0x0D)
58f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SASSTATUS_XFER_RDY_NOT_EXPECTED            (0x0E)
59f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SASSTATUS_DATA_INCORRECT_DATA_LENGTH       (0x0F)
60f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SASSTATUS_DATA_TOO_MUCH_READ_DATA          (0x10)
61f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SASSTATUS_DATA_OFFSET_ERROR                (0x11)
62f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SASSTATUS_SDSF_NAK_RECEIVED                (0x12)
63f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SASSTATUS_SDSF_CONNECTION_FAILED           (0x13)
64f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SASSTATUS_INITIATOR_RESPONSE_TIMEOUT       (0x14)
65f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy
66f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy/*
67f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy *Values for the SAS DeviceInfo field used in SAS Device Status Change Event
68f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy *data and SAS Configuration pages.
69f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy */
70f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_DEVICE_INFO_SEP                (0x00004000)
71f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_DEVICE_INFO_ATAPI_DEVICE       (0x00002000)
72f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_DEVICE_INFO_LSI_DEVICE         (0x00001000)
73f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_DEVICE_INFO_DIRECT_ATTACH      (0x00000800)
74f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_DEVICE_INFO_SSP_TARGET         (0x00000400)
75f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_DEVICE_INFO_STP_TARGET         (0x00000200)
76f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_DEVICE_INFO_SMP_TARGET         (0x00000100)
77f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_DEVICE_INFO_SATA_DEVICE        (0x00000080)
78f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_DEVICE_INFO_SSP_INITIATOR      (0x00000040)
79f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_DEVICE_INFO_STP_INITIATOR      (0x00000020)
80f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_DEVICE_INFO_SMP_INITIATOR      (0x00000010)
81f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_DEVICE_INFO_SATA_HOST          (0x00000008)
82f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy
83f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_DEVICE_INFO_MASK_DEVICE_TYPE   (0x00000007)
84f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_DEVICE_INFO_NO_DEVICE          (0x00000000)
85f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_DEVICE_INFO_END_DEVICE         (0x00000001)
86f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_DEVICE_INFO_EDGE_EXPANDER      (0x00000002)
87f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_DEVICE_INFO_FANOUT_EXPANDER    (0x00000003)
88f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy
89f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy/*****************************************************************************
90f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy*
91f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy*       SAS Messages
92f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy*
93f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy*****************************************************************************/
94f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy
95f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy/****************************************************************************
96f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy* SMP Passthrough messages
97f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy****************************************************************************/
98f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy
99f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy/*SMP Passthrough Request Message */
100f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddytypedef struct _MPI2_SMP_PASSTHROUGH_REQUEST {
101f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 PassthroughFlags;	/*0x00 */
102f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 PhysicalPort;	/*0x01 */
103f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 ChainOffset;		/*0x02 */
104f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 Function;		/*0x03 */
105f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U16 RequestDataLength;	/*0x04 */
106f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 SGLFlags;		/*0x06*//*MPI v2.0 only. Reserved on MPI v2.5*/
107f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 MsgFlags;		/*0x07 */
108f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 VP_ID;		/*0x08 */
109f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 VF_ID;		/*0x09 */
110f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U16 Reserved1;		/*0x0A */
111f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U32 Reserved2;		/*0x0C */
112f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U64 SASAddress;		/*0x10 */
113f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U32 Reserved3;		/*0x18 */
114f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U32 Reserved4;		/*0x1C */
115f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	MPI2_SIMPLE_SGE_UNION SGL;/*0x20 */
116f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy} MPI2_SMP_PASSTHROUGH_REQUEST, *PTR_MPI2_SMP_PASSTHROUGH_REQUEST,
117f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	Mpi2SmpPassthroughRequest_t, *pMpi2SmpPassthroughRequest_t;
118f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy
119f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy/*values for PassthroughFlags field */
120f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SMP_PT_REQ_PT_FLAGS_IMMEDIATE      (0x80)
121f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy
122f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy/*MPI v2.0: use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
123f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy
124f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy/*SMP Passthrough Reply Message */
125f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddytypedef struct _MPI2_SMP_PASSTHROUGH_REPLY {
126f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 PassthroughFlags;	/*0x00 */
127f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 PhysicalPort;	/*0x01 */
128f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 MsgLength;		/*0x02 */
129f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 Function;		/*0x03 */
130f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U16 ResponseDataLength;	/*0x04 */
131f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 SGLFlags;		/*0x06 */
132f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 MsgFlags;		/*0x07 */
133f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 VP_ID;		/*0x08 */
134f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 VF_ID;		/*0x09 */
135f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U16 Reserved1;		/*0x0A */
136f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 Reserved2;		/*0x0C */
137f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 SASStatus;		/*0x0D */
138f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U16 IOCStatus;		/*0x0E */
139f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U32 IOCLogInfo;		/*0x10 */
140f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U32 Reserved3;		/*0x14 */
141f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 ResponseData[4];	/*0x18 */
142f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy} MPI2_SMP_PASSTHROUGH_REPLY, *PTR_MPI2_SMP_PASSTHROUGH_REPLY,
143f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	Mpi2SmpPassthroughReply_t, *pMpi2SmpPassthroughReply_t;
144f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy
145f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy/*values for PassthroughFlags field */
146f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SMP_PT_REPLY_PT_FLAGS_IMMEDIATE    (0x80)
147f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy
148f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy/*values for SASStatus field are at the top of this file */
149f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy
150f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy/****************************************************************************
151f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy* SATA Passthrough messages
152f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy****************************************************************************/
153f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy
154f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddytypedef union _MPI2_SATA_PT_SGE_UNION {
155f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	MPI2_SGE_SIMPLE_UNION MpiSimple;	/*MPI v2.0 only */
156f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	MPI2_SGE_CHAIN_UNION MpiChain;	/*MPI v2.0 only */
157f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	MPI2_IEEE_SGE_SIMPLE_UNION IeeeSimple;
158f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	MPI2_IEEE_SGE_CHAIN_UNION IeeeChain;	/*MPI v2.0 only */
159f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	MPI25_IEEE_SGE_CHAIN64 IeeeChain64;	/*MPI v2.5 only */
160f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy} MPI2_SATA_PT_SGE_UNION, *PTR_MPI2_SATA_PT_SGE_UNION,
161f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	Mpi2SataPTSGEUnion_t, *pMpi2SataPTSGEUnion_t;
162f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy
163f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy/*SATA Passthrough Request Message */
164f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddytypedef struct _MPI2_SATA_PASSTHROUGH_REQUEST {
165f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U16 DevHandle;		/*0x00 */
166f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 ChainOffset;		/*0x02 */
167f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 Function;		/*0x03 */
168f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U16 PassthroughFlags;	/*0x04 */
169f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 SGLFlags;		/*0x06*//*MPI v2.0 only. Reserved on MPI v2.5*/
170f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 MsgFlags;		/*0x07 */
171f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 VP_ID;		/*0x08 */
172f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 VF_ID;		/*0x09 */
173f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U16 Reserved1;		/*0x0A */
174f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U32 Reserved2;		/*0x0C */
175f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U32 Reserved3;		/*0x10 */
176f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U32 Reserved4;		/*0x14 */
177f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U32 DataLength;		/*0x18 */
178f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 CommandFIS[20];	/*0x1C */
179f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	MPI2_SATA_PT_SGE_UNION SGL;/*0x30*//*MPI v2.5: IEEE 64 elements only*/
180f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy} MPI2_SATA_PASSTHROUGH_REQUEST, *PTR_MPI2_SATA_PASSTHROUGH_REQUEST,
181f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	Mpi2SataPassthroughRequest_t,
182f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	*pMpi2SataPassthroughRequest_t;
183f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy
184f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy/*values for PassthroughFlags field */
185f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SATA_PT_REQ_PT_FLAGS_EXECUTE_DIAG      (0x0100)
186f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SATA_PT_REQ_PT_FLAGS_DMA               (0x0020)
187f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SATA_PT_REQ_PT_FLAGS_PIO               (0x0010)
188f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SATA_PT_REQ_PT_FLAGS_UNSPECIFIED_VU    (0x0004)
189f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SATA_PT_REQ_PT_FLAGS_WRITE             (0x0002)
190f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SATA_PT_REQ_PT_FLAGS_READ              (0x0001)
191f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy
192f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy/*MPI v2.0: use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
193f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy
194f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy/*SATA Passthrough Reply Message */
195f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddytypedef struct _MPI2_SATA_PASSTHROUGH_REPLY {
196f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U16 DevHandle;		/*0x00 */
197f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 MsgLength;		/*0x02 */
198f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 Function;		/*0x03 */
199f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U16 PassthroughFlags;	/*0x04 */
200f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 SGLFlags;		/*0x06 */
201f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 MsgFlags;		/*0x07 */
202f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 VP_ID;		/*0x08 */
203f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 VF_ID;		/*0x09 */
204f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U16 Reserved1;		/*0x0A */
205f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 Reserved2;		/*0x0C */
206f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 SASStatus;		/*0x0D */
207f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U16 IOCStatus;		/*0x0E */
208f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U32 IOCLogInfo;		/*0x10 */
209f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 StatusFIS[20];	/*0x14 */
210f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U32 StatusControlRegisters;	/*0x28 */
211f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U32 TransferCount;	/*0x2C */
212f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy} MPI2_SATA_PASSTHROUGH_REPLY, *PTR_MPI2_SATA_PASSTHROUGH_REPLY,
213f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	Mpi2SataPassthroughReply_t, *pMpi2SataPassthroughReply_t;
214f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy
215f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy/*values for SASStatus field are at the top of this file */
216f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy
217f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy/****************************************************************************
218f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy* SAS IO Unit Control messages
219f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy****************************************************************************/
220f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy
221f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy/*SAS IO Unit Control Request Message */
222f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddytypedef struct _MPI2_SAS_IOUNIT_CONTROL_REQUEST {
223f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 Operation;		/*0x00 */
224f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 Reserved1;		/*0x01 */
225f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 ChainOffset;		/*0x02 */
226f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 Function;		/*0x03 */
227f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U16 DevHandle;		/*0x04 */
228f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 IOCParameter;	/*0x06 */
229f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 MsgFlags;		/*0x07 */
230f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 VP_ID;		/*0x08 */
231f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 VF_ID;		/*0x09 */
232f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U16 Reserved3;		/*0x0A */
233f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U16 Reserved4;		/*0x0C */
234f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 PhyNum;		/*0x0E */
235f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 PrimFlags;		/*0x0F */
236f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U32 Primitive;		/*0x10 */
237f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 LookupMethod;	/*0x14 */
238f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 Reserved5;		/*0x15 */
239f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U16 SlotNumber;		/*0x16 */
240f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U64 LookupAddress;	/*0x18 */
241f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U32 IOCParameterValue;	/*0x20 */
242f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U32 Reserved7;		/*0x24 */
243f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U32 Reserved8;		/*0x28 */
244f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy} MPI2_SAS_IOUNIT_CONTROL_REQUEST,
245f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	*PTR_MPI2_SAS_IOUNIT_CONTROL_REQUEST,
246f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	Mpi2SasIoUnitControlRequest_t,
247f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	*pMpi2SasIoUnitControlRequest_t;
248f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy
249f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy/*values for the Operation field */
250f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_OP_CLEAR_ALL_PERSISTENT        (0x02)
251f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_OP_PHY_LINK_RESET              (0x06)
252f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_OP_PHY_HARD_RESET              (0x07)
253f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_OP_PHY_CLEAR_ERROR_LOG         (0x08)
254f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_OP_SEND_PRIMITIVE              (0x0A)
255f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_OP_FORCE_FULL_DISCOVERY        (0x0B)
2564c8bab4d891fac7b44a8e26ec043c42bc910b391Sreekanth Reddy#define MPI2_SAS_OP_TRANSMIT_PORT_SELECT_SIGNAL (0x0C) /* MPI v2.0 only */
257f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_OP_REMOVE_DEVICE               (0x0D)
258f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_OP_LOOKUP_MAPPING              (0x0E)
259f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_OP_SET_IOC_PARAMETER           (0x0F)
260f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI25_SAS_OP_ENABLE_FP_DEVICE           (0x10)
261f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI25_SAS_OP_DISABLE_FP_DEVICE          (0x11)
262f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI25_SAS_OP_ENABLE_FP_ALL              (0x12)
263f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI25_SAS_OP_DISABLE_FP_ALL             (0x13)
264f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_OP_DEV_ENABLE_NCQ              (0x14)
265f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_OP_DEV_DISABLE_NCQ             (0x15)
266f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_OP_PRODUCT_SPECIFIC_MIN        (0x80)
267f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy
268f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy/*values for the PrimFlags field */
269f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_PRIMFLAGS_SINGLE               (0x08)
270f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_PRIMFLAGS_TRIPLE               (0x02)
271f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_PRIMFLAGS_REDUNDANT            (0x01)
272f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy
273f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy/*values for the LookupMethod field */
274f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_LOOKUP_METHOD_SAS_ADDRESS          (0x01)
275f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_LOOKUP_METHOD_SAS_ENCLOSURE_SLOT   (0x02)
276f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#define MPI2_SAS_LOOKUP_METHOD_SAS_DEVICE_NAME      (0x03)
277f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy
278f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy/*SAS IO Unit Control Reply Message */
279f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddytypedef struct _MPI2_SAS_IOUNIT_CONTROL_REPLY {
280f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 Operation;		/*0x00 */
281f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 Reserved1;		/*0x01 */
282f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 MsgLength;		/*0x02 */
283f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 Function;		/*0x03 */
284f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U16 DevHandle;		/*0x04 */
285f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 IOCParameter;	/*0x06 */
286f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 MsgFlags;		/*0x07 */
287f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 VP_ID;		/*0x08 */
288f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U8 VF_ID;		/*0x09 */
289f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U16 Reserved3;		/*0x0A */
290f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U16 Reserved4;		/*0x0C */
291f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U16 IOCStatus;		/*0x0E */
292f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	U32 IOCLogInfo;		/*0x10 */
293f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy} MPI2_SAS_IOUNIT_CONTROL_REPLY,
294f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	*PTR_MPI2_SAS_IOUNIT_CONTROL_REPLY,
295f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy	Mpi2SasIoUnitControlReply_t, *pMpi2SasIoUnitControlReply_t;
296f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy
297f92363d12359498f9a9960511de1a550f0ec41c2Sreekanth Reddy#endif
298