mpt(4): Pass INTR_MPSAFE when setting up the interrupt.
[dragonfly.git] / sys / dev / disk / mpt / mpilib / mpi_inb.h
CommitLineData
2545bca0
MD
1/* $FreeBSD: src/sys/dev/mpt/mpilib/mpi_inb.h,v 1.1 2006/01/21 00:29:51 mjacob Exp $ */
2/*-
3 * Copyright (c) 2000-2005, LSI Logic Corporation and its contributors.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
12 * substantially similar to the "NO WARRANTY" disclaimer below
13 * ("Disclaimer") and any redistribution must be conditioned upon including
14 * a substantially similar Disclaimer requirement for further binary
15 * redistribution.
16 * 3. Neither the name of the LSI Logic Corporation nor the names of its
17 * contributors may be used to endorse or promote products derived from
18 * this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
24 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF THE COPYRIGHT
30 * OWNER OR CONTRIBUTOR IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31/*
32 * Copyright (c) 2003-2004 LSI Logic Corporation.
33 *
34 *
35 * Name: mpi_inb.h
36 * Title: MPI Inband structures and definitions
37 * Creation Date: September 30, 2003
38 *
39 * mpi_inb.h Version: 01.05.01
40 *
41 * Version History
42 * ---------------
43 *
44 * Date Version Description
45 * -------- -------- ------------------------------------------------------
46 * 05-11-04 01.03.01 Original release.
47 * 08-19-04 01.05.01 Original release for MPI v1.5.
48 * --------------------------------------------------------------------------
49 */
50
51#ifndef MPI_INB_H
52#define MPI_INB_H
53
54/******************************************************************************
55*
56* I n b a n d M e s s a g e s
57*
58*******************************************************************************/
59
60
61/****************************************************************************/
62/* Inband Buffer Post Request */
63/****************************************************************************/
64
65typedef struct _MSG_INBAND_BUFFER_POST_REQUEST
66{
67 U8 Reserved1; /* 00h */
68 U8 BufferCount; /* 01h */
69 U8 ChainOffset; /* 02h */
70 U8 Function; /* 03h */
71 U16 Reserved2; /* 04h */
72 U8 Reserved3; /* 06h */
73 U8 MsgFlags; /* 07h */
74 U32 MsgContext; /* 08h */
75 U32 Reserved4; /* 0Ch */
76 SGE_TRANS_SIMPLE_UNION SGL; /* 10h */
77} MSG_INBAND_BUFFER_POST_REQUEST, MPI_POINTER PTR_MSG_INBAND_BUFFER_POST_REQUEST,
78 MpiInbandBufferPostRequest_t , MPI_POINTER pMpiInbandBufferPostRequest_t;
79
80
81typedef struct _WWN_FC_FORMAT
82{
83 U64 NodeName; /* 00h */
84 U64 PortName; /* 08h */
85} WWN_FC_FORMAT, MPI_POINTER PTR_WWN_FC_FORMAT,
86 WwnFcFormat_t, MPI_POINTER pWwnFcFormat_t;
87
88typedef struct _WWN_SAS_FORMAT
89{
90 U64 WorldWideID; /* 00h */
91 U32 Reserved1; /* 08h */
92 U32 Reserved2; /* 0Ch */
93} WWN_SAS_FORMAT, MPI_POINTER PTR_WWN_SAS_FORMAT,
94 WwnSasFormat_t, MPI_POINTER pWwnSasFormat_t;
95
96typedef union _WWN_INBAND_FORMAT
97{
98 WWN_FC_FORMAT Fc;
99 WWN_SAS_FORMAT Sas;
100} WWN_INBAND_FORMAT, MPI_POINTER PTR_WWN_INBAND_FORMAT,
101 WwnInbandFormat, MPI_POINTER pWwnInbandFormat;
102
103
104/* Inband Buffer Post reply message */
105
106typedef struct _MSG_INBAND_BUFFER_POST_REPLY
107{
108 U16 Reserved1; /* 00h */
109 U8 MsgLength; /* 02h */
110 U8 Function; /* 03h */
111 U16 Reserved2; /* 04h */
112 U8 Reserved3; /* 06h */
113 U8 MsgFlags; /* 07h */
114 U32 MsgContext; /* 08h */
115 U16 Reserved4; /* 0Ch */
116 U16 IOCStatus; /* 0Eh */
117 U32 IOCLogInfo; /* 10h */
118 U32 TransferLength; /* 14h */
119 U32 TransactionContext; /* 18h */
120 WWN_INBAND_FORMAT Wwn; /* 1Ch */
121 U32 IOCIdentifier[4]; /* 2Ch */
122} MSG_INBAND_BUFFER_POST_REPLY, MPI_POINTER PTR_MSG_INBAND_BUFFER_POST_REPLY,
123 MpiInbandBufferPostReply_t, MPI_POINTER pMpiInbandBufferPostReply_t;
124
125
126/****************************************************************************/
127/* Inband Send Request */
128/****************************************************************************/
129
130typedef struct _MSG_INBAND_SEND_REQUEST
131{
132 U16 Reserved1; /* 00h */
133 U8 ChainOffset; /* 02h */
134 U8 Function; /* 03h */
135 U16 Reserved2; /* 04h */
136 U8 Reserved3; /* 06h */
137 U8 MsgFlags; /* 07h */
138 U32 MsgContext; /* 08h */
139 U32 Reserved4; /* 0Ch */
140 WWN_INBAND_FORMAT Wwn; /* 10h */
141 U32 Reserved5; /* 20h */
142 SGE_IO_UNION SGL; /* 24h */
143} MSG_INBAND_SEND_REQUEST, MPI_POINTER PTR_MSG_INBAND_SEND_REQUEST,
144 MpiInbandSendRequest_t , MPI_POINTER pMpiInbandSendRequest_t;
145
146
147/* Inband Send reply message */
148
149typedef struct _MSG_INBAND_SEND_REPLY
150{
151 U16 Reserved1; /* 00h */
152 U8 MsgLength; /* 02h */
153 U8 Function; /* 03h */
154 U16 Reserved2; /* 04h */
155 U8 Reserved3; /* 06h */
156 U8 MsgFlags; /* 07h */
157 U32 MsgContext; /* 08h */
158 U16 Reserved4; /* 0Ch */
159 U16 IOCStatus; /* 0Eh */
160 U32 IOCLogInfo; /* 10h */
161 U32 ResponseLength; /* 14h */
162} MSG_INBAND_SEND_REPLY, MPI_POINTER PTR_MSG_INBAND_SEND_REPLY,
163 MpiInbandSendReply_t, MPI_POINTER pMpiInbandSendReply_t;
164
165
166/****************************************************************************/
167/* Inband Response Request */
168/****************************************************************************/
169
170typedef struct _MSG_INBAND_RSP_REQUEST
171{
172 U16 Reserved1; /* 00h */
173 U8 ChainOffset; /* 02h */
174 U8 Function; /* 03h */
175 U16 Reserved2; /* 04h */
176 U8 Reserved3; /* 06h */
177 U8 MsgFlags; /* 07h */
178 U32 MsgContext; /* 08h */
179 U32 Reserved4; /* 0Ch */
180 WWN_INBAND_FORMAT Wwn; /* 10h */
181 U32 IOCIdentifier[4]; /* 20h */
182 U32 ResponseLength; /* 30h */
183 SGE_IO_UNION SGL; /* 34h */
184} MSG_INBAND_RSP_REQUEST, MPI_POINTER PTR_MSG_INBAND_RSP_REQUEST,
185 MpiInbandRspRequest_t , MPI_POINTER pMpiInbandRspRequest_t;
186
187
188/* Inband Response reply message */
189
190typedef struct _MSG_INBAND_RSP_REPLY
191{
192 U16 Reserved1; /* 00h */
193 U8 MsgLength; /* 02h */
194 U8 Function; /* 03h */
195 U16 Reserved2; /* 04h */
196 U8 Reserved3; /* 06h */
197 U8 MsgFlags; /* 07h */
198 U32 MsgContext; /* 08h */
199 U16 Reserved4; /* 0Ch */
200 U16 IOCStatus; /* 0Eh */
201 U32 IOCLogInfo; /* 10h */
202} MSG_INBAND_RSP_REPLY, MPI_POINTER PTR_MSG_INBAND_RSP_REPLY,
203 MpiInbandRspReply_t, MPI_POINTER pMpiInbandRspReply_t;
204
205
206/****************************************************************************/
207/* Inband Abort Request */
208/****************************************************************************/
209
210typedef struct _MSG_INBAND_ABORT_REQUEST
211{
212 U8 Reserved1; /* 00h */
213 U8 AbortType; /* 01h */
214 U8 ChainOffset; /* 02h */
215 U8 Function; /* 03h */
216 U16 Reserved2; /* 04h */
217 U8 Reserved3; /* 06h */
218 U8 MsgFlags; /* 07h */
219 U32 MsgContext; /* 08h */
220 U32 Reserved4; /* 0Ch */
221 U32 ContextToAbort; /* 10h */
222} MSG_INBAND_ABORT_REQUEST, MPI_POINTER PTR_MSG_INBAND_ABORT_REQUEST,
223 MpiInbandAbortRequest_t , MPI_POINTER pMpiInbandAbortRequest_t;
224
225#define MPI_INBAND_ABORT_TYPE_ALL_BUFFERS (0x00)
226#define MPI_INBAND_ABORT_TYPE_EXACT_BUFFER (0x01)
227#define MPI_INBAND_ABORT_TYPE_SEND_REQUEST (0x02)
228#define MPI_INBAND_ABORT_TYPE_RESPONSE_REQUEST (0x03)
229
230
231/* Inband Abort reply message */
232
233typedef struct _MSG_INBAND_ABORT_REPLY
234{
235 U8 Reserved1; /* 00h */
236 U8 AbortType; /* 01h */
237 U8 MsgLength; /* 02h */
238 U8 Function; /* 03h */
239 U16 Reserved2; /* 04h */
240 U8 Reserved3; /* 06h */
241 U8 MsgFlags; /* 07h */
242 U32 MsgContext; /* 08h */
243 U16 Reserved4; /* 0Ch */
244 U16 IOCStatus; /* 0Eh */
245 U32 IOCLogInfo; /* 10h */
246} MSG_INBAND_ABORT_REPLY, MPI_POINTER PTR_MSG_INBAND_ABORT_REPLY,
247 MpiInbandAbortReply_t, MPI_POINTER pMpiInbandAbortReply_t;
248
249
250#endif