aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/lsi/mpi_sas.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/message/fusion/lsi/mpi_sas.h')
-rw-r--r--drivers/message/fusion/lsi/mpi_sas.h171
1 files changed, 120 insertions, 51 deletions
diff --git a/drivers/message/fusion/lsi/mpi_sas.h b/drivers/message/fusion/lsi/mpi_sas.h
index cb878f9c65de..230fa69b5353 100644
--- a/drivers/message/fusion/lsi/mpi_sas.h
+++ b/drivers/message/fusion/lsi/mpi_sas.h
@@ -1,25 +1,76 @@
1/* 1/*
2 * Copyright (c) 2003 LSI Logic Corporation. 2 * Copyright (c) 2004 LSI Logic Corporation.
3 * 3 *
4 * 4 *
5 * Name: mpi_sas.h 5 * Name: mpi_sas.h
6 * Title: MPI Serial Attached SCSI structures and definitions 6 * Title: MPI Serial Attached SCSI structures and definitions
7 * Creation Date: April 23, 2003 7 * Creation Date: August 19, 2004
8 * 8 *
9 * mpi_sas.h Version: 01.05.xx 9 * mpi_sas.h Version: 01.05.01
10 * 10 *
11 * Version History 11 * Version History
12 * --------------- 12 * ---------------
13 * 13 *
14 * Date Version Description 14 * Date Version Description
15 * -------- -------- ------------------------------------------------------ 15 * -------- -------- ------------------------------------------------------
16 * xx-yy-zz 01.05.01 Original release. 16 * 08-19-04 01.05.01 Original release.
17 * -------------------------------------------------------------------------- 17 * --------------------------------------------------------------------------
18 */ 18 */
19 19
20#ifndef MPI_SAS_H 20#ifndef MPI_SAS_H
21#define MPI_SAS_H 21#define MPI_SAS_H
22 22
23
24/*
25 * Values for SASStatus.
26 */
27#define MPI_SASSTATUS_SUCCESS (0x00)
28#define MPI_SASSTATUS_UNKNOWN_ERROR (0x01)
29#define MPI_SASSTATUS_INVALID_FRAME (0x02)
30#define MPI_SASSTATUS_UTC_BAD_DEST (0x03)
31#define MPI_SASSTATUS_UTC_BREAK_RECEIVED (0x04)
32#define MPI_SASSTATUS_UTC_CONNECT_RATE_NOT_SUPPORTED (0x05)
33#define MPI_SASSTATUS_UTC_PORT_LAYER_REQUEST (0x06)
34#define MPI_SASSTATUS_UTC_PROTOCOL_NOT_SUPPORTED (0x07)
35#define MPI_SASSTATUS_UTC_STP_RESOURCES_BUSY (0x08)
36#define MPI_SASSTATUS_UTC_WRONG_DESTINATION (0x09)
37#define MPI_SASSTATUS_SHORT_INFORMATION_UNIT (0x0A)
38#define MPI_SASSTATUS_LONG_INFORMATION_UNIT (0x0B)
39#define MPI_SASSTATUS_XFER_RDY_INCORRECT_WRITE_DATA (0x0C)
40#define MPI_SASSTATUS_XFER_RDY_REQUEST_OFFSET_ERROR (0x0D)
41#define MPI_SASSTATUS_XFER_RDY_NOT_EXPECTED (0x0E)
42#define MPI_SASSTATUS_DATA_INCORRECT_DATA_LENGTH (0x0F)
43#define MPI_SASSTATUS_DATA_TOO_MUCH_READ_DATA (0x10)
44#define MPI_SASSTATUS_DATA_OFFSET_ERROR (0x11)
45#define MPI_SASSTATUS_SDSF_NAK_RECEIVED (0x12)
46#define MPI_SASSTATUS_SDSF_CONNECTION_FAILED (0x13)
47#define MPI_SASSTATUS_INITIATOR_RESPONSE_TIMEOUT (0x14)
48
49
50/*
51 * Values for the SAS DeviceInfo field used in SAS Device Status Change Event
52 * data and SAS IO Unit Configuration pages.
53 */
54#define MPI_SAS_DEVICE_INFO_ATAPI_DEVICE (0x00002000)
55#define MPI_SAS_DEVICE_INFO_LSI_DEVICE (0x00001000)
56#define MPI_SAS_DEVICE_INFO_DIRECT_ATTACH (0x00000800)
57#define MPI_SAS_DEVICE_INFO_SSP_TARGET (0x00000400)
58#define MPI_SAS_DEVICE_INFO_STP_TARGET (0x00000200)
59#define MPI_SAS_DEVICE_INFO_SMP_TARGET (0x00000100)
60#define MPI_SAS_DEVICE_INFO_SATA_DEVICE (0x00000080)
61#define MPI_SAS_DEVICE_INFO_SSP_INITIATOR (0x00000040)
62#define MPI_SAS_DEVICE_INFO_STP_INITIATOR (0x00000020)
63#define MPI_SAS_DEVICE_INFO_SMP_INITIATOR (0x00000010)
64#define MPI_SAS_DEVICE_INFO_SATA_HOST (0x00000008)
65
66#define MPI_SAS_DEVICE_INFO_MASK_DEVICE_TYPE (0x00000007)
67#define MPI_SAS_DEVICE_INFO_NO_DEVICE (0x00000000)
68#define MPI_SAS_DEVICE_INFO_END_DEVICE (0x00000001)
69#define MPI_SAS_DEVICE_INFO_EDGE_EXPANDER (0x00000002)
70#define MPI_SAS_DEVICE_INFO_FANOUT_EXPANDER (0x00000003)
71
72
73
23/***************************************************************************** 74/*****************************************************************************
24* 75*
25* S e r i a l A t t a c h e d S C S I M e s s a g e s 76* S e r i a l A t t a c h e d S C S I M e s s a g e s
@@ -48,8 +99,10 @@ typedef struct _MSG_SMP_PASSTHROUGH_REQUEST
48} MSG_SMP_PASSTHROUGH_REQUEST, MPI_POINTER PTR_MSG_SMP_PASSTHROUGH_REQUEST, 99} MSG_SMP_PASSTHROUGH_REQUEST, MPI_POINTER PTR_MSG_SMP_PASSTHROUGH_REQUEST,
49 SmpPassthroughRequest_t, MPI_POINTER pSmpPassthroughRequest_t; 100 SmpPassthroughRequest_t, MPI_POINTER pSmpPassthroughRequest_t;
50 101
102/* values for PassthroughFlags field */
51#define MPI_SMP_PT_REQ_PT_FLAGS_IMMEDIATE (0x80) 103#define MPI_SMP_PT_REQ_PT_FLAGS_IMMEDIATE (0x80)
52 104
105/* values for ConnectionRate field */
53#define MPI_SMP_PT_REQ_CONNECT_RATE_NEGOTIATED (0x00) 106#define MPI_SMP_PT_REQ_CONNECT_RATE_NEGOTIATED (0x00)
54#define MPI_SMP_PT_REQ_CONNECT_RATE_1_5 (0x08) 107#define MPI_SMP_PT_REQ_CONNECT_RATE_1_5 (0x08)
55#define MPI_SMP_PT_REQ_CONNECT_RATE_3_0 (0x09) 108#define MPI_SMP_PT_REQ_CONNECT_RATE_3_0 (0x09)
@@ -77,51 +130,69 @@ typedef struct _MSG_SMP_PASSTHROUGH_REPLY
77 130
78#define MPI_SMP_PT_REPLY_PT_FLAGS_IMMEDIATE (0x80) 131#define MPI_SMP_PT_REPLY_PT_FLAGS_IMMEDIATE (0x80)
79 132
80/* values for the SASStatus field */
81#define MPI_SASSTATUS_SUCCESS (0x00)
82#define MPI_SASSTATUS_UNKNOWN_ERROR (0x01)
83#define MPI_SASSTATUS_INVALID_FRAME (0x02)
84#define MPI_SASSTATUS_UTC_BAD_DEST (0x03)
85#define MPI_SASSTATUS_UTC_BREAK_RECEIVED (0x04)
86#define MPI_SASSTATUS_UTC_CONNECT_RATE_NOT_SUPPORTED (0x05)
87#define MPI_SASSTATUS_UTC_PORT_LAYER_REQUEST (0x06)
88#define MPI_SASSTATUS_UTC_PROTOCOL_NOT_SUPPORTED (0x07)
89#define MPI_SASSTATUS_UTC_STP_RESOURCES_BUSY (0x08)
90#define MPI_SASSTATUS_UTC_WRONG_DESTINATION (0x09)
91#define MPI_SASSTATUS_SHORT_INFORMATION_UNIT (0x0A)
92#define MPI_SASSTATUS_LONG_INFORMATION_UNIT (0x0B)
93#define MPI_SASSTATUS_XFER_RDY_INCORRECT_WRITE_DATA (0x0C)
94#define MPI_SASSTATUS_XFER_RDY_REQUEST_OFFSET_ERROR (0x0D)
95#define MPI_SASSTATUS_XFER_RDY_NOT_EXPECTED (0x0E)
96#define MPI_SASSTATUS_DATA_INCORRECT_DATA_LENGTH (0x0F)
97#define MPI_SASSTATUS_DATA_TOO_MUCH_READ_DATA (0x10)
98#define MPI_SASSTATUS_DATA_OFFSET_ERROR (0x11)
99#define MPI_SASSTATUS_SDSF_NAK_RECEIVED (0x12)
100#define MPI_SASSTATUS_SDSF_CONNECTION_FAILED (0x13)
101#define MPI_SASSTATUS_INITIATOR_RESPONSE_TIMEOUT (0x14)
102 133
134/****************************************************************************/
135/* SATA Passthrough Request */
136/****************************************************************************/
137
138typedef struct _MSG_SATA_PASSTHROUGH_REQUEST
139{
140 U8 TargetID; /* 00h */
141 U8 Bus; /* 01h */
142 U8 ChainOffset; /* 02h */
143 U8 Function; /* 03h */
144 U16 PassthroughFlags; /* 04h */
145 U8 ConnectionRate; /* 06h */
146 U8 MsgFlags; /* 07h */
147 U32 MsgContext; /* 08h */
148 U32 Reserved1; /* 0Ch */
149 U32 Reserved2; /* 10h */
150 U32 Reserved3; /* 14h */
151 U32 DataLength; /* 18h */
152 U8 CommandFIS[20]; /* 1Ch */
153 SGE_SIMPLE_UNION SGL; /* 30h */
154} MSG_SATA_PASSTHROUGH_REQUEST, MPI_POINTER PTR_MSG_SATA_PASSTHROUGH_REQUEST,
155 SataPassthroughRequest_t, MPI_POINTER pSataPassthroughRequest_t;
156
157/* values for PassthroughFlags field */
158#define MPI_SATA_PT_REQ_PT_FLAGS_RESET_DEVICE (0x0200)
159#define MPI_SATA_PT_REQ_PT_FLAGS_EXECUTE_DIAG (0x0100)
160#define MPI_SATA_PT_REQ_PT_FLAGS_DMA_QUEUED (0x0080)
161#define MPI_SATA_PT_REQ_PT_FLAGS_PACKET_COMMAND (0x0040)
162#define MPI_SATA_PT_REQ_PT_FLAGS_DMA (0x0020)
163#define MPI_SATA_PT_REQ_PT_FLAGS_PIO (0x0010)
164#define MPI_SATA_PT_REQ_PT_FLAGS_UNSPECIFIED_VU (0x0004)
165#define MPI_SATA_PT_REQ_PT_FLAGS_WRITE (0x0002)
166#define MPI_SATA_PT_REQ_PT_FLAGS_READ (0x0001)
167
168/* values for ConnectionRate field */
169#define MPI_SATA_PT_REQ_CONNECT_RATE_NEGOTIATED (0x00)
170#define MPI_SATA_PT_REQ_CONNECT_RATE_1_5 (0x08)
171#define MPI_SATA_PT_REQ_CONNECT_RATE_3_0 (0x09)
172
173
174/* SATA Passthrough Reply */
175typedef struct _MSG_SATA_PASSTHROUGH_REPLY
176{
177 U8 TargetID; /* 00h */
178 U8 Bus; /* 01h */
179 U8 MsgLength; /* 02h */
180 U8 Function; /* 03h */
181 U16 PassthroughFlags; /* 04h */
182 U8 Reserved1; /* 06h */
183 U8 MsgFlags; /* 07h */
184 U32 MsgContext; /* 08h */
185 U8 Reserved2; /* 0Ch */
186 U8 SASStatus; /* 0Dh */
187 U16 IOCStatus; /* 0Eh */
188 U32 IOCLogInfo; /* 10h */
189 U8 StatusFIS[20]; /* 14h */
190 U32 StatusControlRegisters; /* 28h */
191 U32 TransferCount; /* 2Ch */
192} MSG_SATA_PASSTHROUGH_REPLY, MPI_POINTER PTR_MSG_SATA_PASSTHROUGH_REPLY,
193 SataPassthroughReply_t, MPI_POINTER pSataPassthroughReply_t;
103 194
104/*
105 * Values for the SAS DeviceInfo field used in SAS Device Status Change Event
106 * data and SAS IO Unit Configuration pages.
107 */
108#define MPI_SAS_DEVICE_INFO_ATAPI_DEVICE (0x00002000)
109#define MPI_SAS_DEVICE_INFO_LSI_DEVICE (0x00001000)
110#define MPI_SAS_DEVICE_INFO_DIRECT_ATTACH (0x00000800)
111#define MPI_SAS_DEVICE_INFO_SSP_TARGET (0x00000400)
112#define MPI_SAS_DEVICE_INFO_STP_TARGET (0x00000200)
113#define MPI_SAS_DEVICE_INFO_SMP_TARGET (0x00000100)
114#define MPI_SAS_DEVICE_INFO_SATA_DEVICE (0x00000080)
115#define MPI_SAS_DEVICE_INFO_SSP_INITIATOR (0x00000040)
116#define MPI_SAS_DEVICE_INFO_STP_INITIATOR (0x00000020)
117#define MPI_SAS_DEVICE_INFO_SMP_INITIATOR (0x00000010)
118#define MPI_SAS_DEVICE_INFO_SATA_HOST (0x00000008)
119 195
120#define MPI_SAS_DEVICE_INFO_MASK_DEVICE_TYPE (0x00000007)
121#define MPI_SAS_DEVICE_INFO_NO_DEVICE (0x00000000)
122#define MPI_SAS_DEVICE_INFO_END_DEVICE (0x00000001)
123#define MPI_SAS_DEVICE_INFO_EDGE_EXPANDER (0x00000002)
124#define MPI_SAS_DEVICE_INFO_FANOUT_EXPANDER (0x00000003)
125 196
126 197
127/****************************************************************************/ 198/****************************************************************************/
@@ -148,15 +219,13 @@ typedef struct _MSG_SAS_IOUNIT_CONTROL_REQUEST
148} MSG_SAS_IOUNIT_CONTROL_REQUEST, MPI_POINTER PTR_MSG_SAS_IOUNIT_CONTROL_REQUEST, 219} MSG_SAS_IOUNIT_CONTROL_REQUEST, MPI_POINTER PTR_MSG_SAS_IOUNIT_CONTROL_REQUEST,
149 SasIoUnitControlRequest_t, MPI_POINTER pSasIoUnitControlRequest_t; 220 SasIoUnitControlRequest_t, MPI_POINTER pSasIoUnitControlRequest_t;
150 221
151/* values for the ... field */ 222/* values for the Operation field */
152#define MPI_SAS_OP_CLEAR_NOT_PRESENT (0x01) 223#define MPI_SAS_OP_CLEAR_NOT_PRESENT (0x01)
153#define MPI_SAS_OP_CLEAR_ALL (0x02) 224#define MPI_SAS_OP_CLEAR_ALL_PERSISTENT (0x02)
154#define MPI_SAS_OP_MAP (0x03)
155#define MPI_SAS_OP_MOVE (0x04)
156#define MPI_SAS_OP_CLEAR (0x05)
157#define MPI_SAS_OP_PHY_LINK_RESET (0x06) 225#define MPI_SAS_OP_PHY_LINK_RESET (0x06)
158#define MPI_SAS_OP_PHY_HARD_RESET (0x07) 226#define MPI_SAS_OP_PHY_HARD_RESET (0x07)
159#define MPI_SAS_OP_PHY_CLEAR_ERROR_LOG (0x08) 227#define MPI_SAS_OP_PHY_CLEAR_ERROR_LOG (0x08)
228#define MPI_SAS_OP_MAP_CURRENT (0x09)
160 229
161 230
162/* SAS IO Unit Control Reply */ 231/* SAS IO Unit Control Reply */