~ubuntu-branches/ubuntu/utopic/xen/utopic

« back to all changes in this revision

Viewing changes to xen/drivers/message/fusion/lsi/mpi_init.h

  • Committer: Bazaar Package Importer
  • Author(s): Bastian Blank
  • Date: 2010-05-06 15:47:38 UTC
  • mto: (1.3.1) (15.1.1 sid) (4.1.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20100506154738-agoz0rlafrh1fnq7
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 *  Copyright (c) 2000-2002 LSI Logic Corporation.
3
 
 *
4
 
 *
5
 
 *           Name:  MPI_INIT.H
6
 
 *          Title:  MPI initiator mode messages and structures
7
 
 *  Creation Date:  June 8, 2000
8
 
 *
9
 
 *    MPI_INIT.H Version:  01.02.05
10
 
 *
11
 
 *  Version History
12
 
 *  ---------------
13
 
 *
14
 
 *  Date      Version   Description
15
 
 *  --------  --------  ------------------------------------------------------
16
 
 *  05-08-00  00.10.01  Original release for 0.10 spec dated 4/26/2000.
17
 
 *  05-24-00  00.10.02  Added SenseBufferLength to _MSG_SCSI_IO_REPLY.
18
 
 *  06-06-00  01.00.01  Update version number for 1.0 release.
19
 
 *  06-08-00  01.00.02  Added MPI_SCSI_RSP_INFO_ definitions.
20
 
 *  11-02-00  01.01.01  Original release for post 1.0 work.
21
 
 *  12-04-00  01.01.02  Added MPI_SCSIIO_CONTROL_NO_DISCONNECT.
22
 
 *  02-20-01  01.01.03  Started using MPI_POINTER.
23
 
 *  03-27-01  01.01.04  Added structure offset comments.
24
 
 *  04-10-01  01.01.05  Added new MsgFlag for MSG_SCSI_TASK_MGMT.
25
 
 *  08-08-01  01.02.01  Original release for v1.2 work.
26
 
 *  08-29-01  01.02.02  Added MPI_SCSITASKMGMT_TASKTYPE_LOGICAL_UNIT_RESET.
27
 
 *                      Added MPI_SCSI_STATE_QUEUE_TAG_REJECTED for
28
 
 *                      MSG_SCSI_IO_REPLY.
29
 
 *  09-28-01  01.02.03  Added structures and defines for SCSI Enclosure
30
 
 *                      Processor messages.
31
 
 *  10-04-01  01.02.04  Added defines for SEP request Action field.
32
 
 *  05-31-02  01.02.05  Added MPI_SCSIIO_MSGFLGS_CMD_DETERMINES_DATA_DIR define
33
 
 *                      for SCSI IO requests.
34
 
 *  --------------------------------------------------------------------------
35
 
 */
36
 
 
37
 
#ifndef MPI_INIT_H
38
 
#define MPI_INIT_H
39
 
 
40
 
 
41
 
/*****************************************************************************
42
 
*
43
 
*               S C S I    I n i t i a t o r    M e s s a g e s
44
 
*
45
 
*****************************************************************************/
46
 
 
47
 
/****************************************************************************/
48
 
/*  SCSI IO messages and assocaited structures                              */
49
 
/****************************************************************************/
50
 
 
51
 
typedef struct _MSG_SCSI_IO_REQUEST
52
 
{
53
 
    U8                      TargetID;           /* 00h */
54
 
    U8                      Bus;                /* 01h */
55
 
    U8                      ChainOffset;        /* 02h */
56
 
    U8                      Function;           /* 03h */
57
 
    U8                      CDBLength;          /* 04h */
58
 
    U8                      SenseBufferLength;  /* 05h */
59
 
    U8                      Reserved;           /* 06h */
60
 
    U8                      MsgFlags;           /* 07h */
61
 
    U32                     MsgContext;         /* 08h */
62
 
    U8                      LUN[8];             /* 0Ch */
63
 
    U32                     Control;            /* 14h */
64
 
    U8                      CDB[16];            /* 18h */
65
 
    U32                     DataLength;         /* 28h */
66
 
    U32                     SenseBufferLowAddr; /* 2Ch */
67
 
    SGE_IO_UNION            SGL;                /* 30h */
68
 
} MSG_SCSI_IO_REQUEST, MPI_POINTER PTR_MSG_SCSI_IO_REQUEST,
69
 
  SCSIIORequest_t, MPI_POINTER pSCSIIORequest_t;
70
 
 
71
 
 
72
 
/* SCSI IO MsgFlags bits */
73
 
 
74
 
#define MPI_SCSIIO_MSGFLGS_SENSE_WIDTH              (0x01)
75
 
#define MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_32           (0x00)
76
 
#define MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_64           (0x01)
77
 
#define MPI_SCSIIO_MSGFLGS_SENSE_LOCATION           (0x02)
78
 
#define MPI_SCSIIO_MSGFLGS_SENSE_LOC_HOST           (0x00)
79
 
#define MPI_SCSIIO_MSGFLGS_SENSE_LOC_IOC            (0x02)
80
 
#define MPI_SCSIIO_MSGFLGS_CMD_DETERMINES_DATA_DIR  (0x04)
81
 
 
82
 
/* SCSI IO LUN fields */
83
 
 
84
 
#define MPI_SCSIIO_LUN_FIRST_LEVEL_ADDRESSING   (0x0000FFFF)
85
 
#define MPI_SCSIIO_LUN_SECOND_LEVEL_ADDRESSING  (0xFFFF0000)
86
 
#define MPI_SCSIIO_LUN_THIRD_LEVEL_ADDRESSING   (0x0000FFFF)
87
 
#define MPI_SCSIIO_LUN_FOURTH_LEVEL_ADDRESSING  (0xFFFF0000)
88
 
#define MPI_SCSIIO_LUN_LEVEL_1_WORD             (0xFF00)
89
 
#define MPI_SCSIIO_LUN_LEVEL_1_DWORD            (0x0000FF00)
90
 
 
91
 
/* SCSI IO Control bits */
92
 
 
93
 
#define MPI_SCSIIO_CONTROL_DATADIRECTION_MASK   (0x03000000)
94
 
#define MPI_SCSIIO_CONTROL_NODATATRANSFER       (0x00000000)
95
 
#define MPI_SCSIIO_CONTROL_WRITE                (0x01000000)
96
 
#define MPI_SCSIIO_CONTROL_READ                 (0x02000000)
97
 
 
98
 
#define MPI_SCSIIO_CONTROL_ADDCDBLEN_MASK       (0x3C000000)
99
 
#define MPI_SCSIIO_CONTROL_ADDCDBLEN_SHIFT      (26)
100
 
 
101
 
#define MPI_SCSIIO_CONTROL_TASKATTRIBUTE_MASK   (0x00000700)
102
 
#define MPI_SCSIIO_CONTROL_SIMPLEQ              (0x00000000)
103
 
#define MPI_SCSIIO_CONTROL_HEADOFQ              (0x00000100)
104
 
#define MPI_SCSIIO_CONTROL_ORDEREDQ             (0x00000200)
105
 
#define MPI_SCSIIO_CONTROL_ACAQ                 (0x00000400)
106
 
#define MPI_SCSIIO_CONTROL_UNTAGGED             (0x00000500)
107
 
#define MPI_SCSIIO_CONTROL_NO_DISCONNECT        (0x00000700)
108
 
 
109
 
#define MPI_SCSIIO_CONTROL_TASKMANAGE_MASK      (0x00FF0000)
110
 
#define MPI_SCSIIO_CONTROL_OBSOLETE             (0x00800000)
111
 
#define MPI_SCSIIO_CONTROL_CLEAR_ACA_RSV        (0x00400000)
112
 
#define MPI_SCSIIO_CONTROL_TARGET_RESET         (0x00200000)
113
 
#define MPI_SCSIIO_CONTROL_LUN_RESET_RSV        (0x00100000)
114
 
#define MPI_SCSIIO_CONTROL_RESERVED             (0x00080000)
115
 
#define MPI_SCSIIO_CONTROL_CLR_TASK_SET_RSV     (0x00040000)
116
 
#define MPI_SCSIIO_CONTROL_ABORT_TASK_SET       (0x00020000)
117
 
#define MPI_SCSIIO_CONTROL_RESERVED2            (0x00010000)
118
 
 
119
 
 
120
 
/* SCSI IO reply structure */
121
 
typedef struct _MSG_SCSI_IO_REPLY
122
 
{
123
 
    U8                      TargetID;           /* 00h */
124
 
    U8                      Bus;                /* 01h */
125
 
    U8                      MsgLength;          /* 02h */
126
 
    U8                      Function;           /* 03h */
127
 
    U8                      CDBLength;          /* 04h */
128
 
    U8                      SenseBufferLength;  /* 05h */
129
 
    U8                      Reserved;           /* 06h */
130
 
    U8                      MsgFlags;           /* 07h */
131
 
    U32                     MsgContext;         /* 08h */
132
 
    U8                      SCSIStatus;         /* 0Ch */
133
 
    U8                      SCSIState;          /* 0Dh */
134
 
    U16                     IOCStatus;          /* 0Eh */
135
 
    U32                     IOCLogInfo;         /* 10h */
136
 
    U32                     TransferCount;      /* 14h */
137
 
    U32                     SenseCount;         /* 18h */
138
 
    U32                     ResponseInfo;       /* 1Ch */
139
 
} MSG_SCSI_IO_REPLY, MPI_POINTER PTR_MSG_SCSI_IO_REPLY,
140
 
  SCSIIOReply_t, MPI_POINTER pSCSIIOReply_t;
141
 
 
142
 
 
143
 
/* SCSI IO Reply SCSIStatus values (SAM-2 status codes) */
144
 
 
145
 
#define MPI_SCSI_STATUS_SUCCESS                 (0x00)
146
 
#define MPI_SCSI_STATUS_CHECK_CONDITION         (0x02)
147
 
#define MPI_SCSI_STATUS_CONDITION_MET           (0x04)
148
 
#define MPI_SCSI_STATUS_BUSY                    (0x08)
149
 
#define MPI_SCSI_STATUS_INTERMEDIATE            (0x10)
150
 
#define MPI_SCSI_STATUS_INTERMEDIATE_CONDMET    (0x14)
151
 
#define MPI_SCSI_STATUS_RESERVATION_CONFLICT    (0x18)
152
 
#define MPI_SCSI_STATUS_COMMAND_TERMINATED      (0x22)
153
 
#define MPI_SCSI_STATUS_TASK_SET_FULL           (0x28)
154
 
#define MPI_SCSI_STATUS_ACA_ACTIVE              (0x30)
155
 
 
156
 
 
157
 
/* SCSI IO Reply SCSIState values */
158
 
 
159
 
#define MPI_SCSI_STATE_AUTOSENSE_VALID          (0x01)
160
 
#define MPI_SCSI_STATE_AUTOSENSE_FAILED         (0x02)
161
 
#define MPI_SCSI_STATE_NO_SCSI_STATUS           (0x04)
162
 
#define MPI_SCSI_STATE_TERMINATED               (0x08)
163
 
#define MPI_SCSI_STATE_RESPONSE_INFO_VALID      (0x10)
164
 
#define MPI_SCSI_STATE_QUEUE_TAG_REJECTED       (0x20)
165
 
 
166
 
/* SCSI IO Reply ResponseInfo values */
167
 
/* (FCP-1 RSP_CODE values and SPI-3 Packetized Failure codes) */
168
 
 
169
 
#define MPI_SCSI_RSP_INFO_FUNCTION_COMPLETE     (0x00000000)
170
 
#define MPI_SCSI_RSP_INFO_FCP_BURST_LEN_ERROR   (0x01000000)
171
 
#define MPI_SCSI_RSP_INFO_CMND_FIELDS_INVALID   (0x02000000)
172
 
#define MPI_SCSI_RSP_INFO_FCP_DATA_RO_ERROR     (0x03000000)
173
 
#define MPI_SCSI_RSP_INFO_TASK_MGMT_UNSUPPORTED (0x04000000)
174
 
#define MPI_SCSI_RSP_INFO_TASK_MGMT_FAILED      (0x05000000)
175
 
#define MPI_SCSI_RSP_INFO_SPI_LQ_INVALID_TYPE   (0x06000000)
176
 
 
177
 
 
178
 
/****************************************************************************/
179
 
/*  SCSI Task Management messages                                           */
180
 
/****************************************************************************/
181
 
 
182
 
typedef struct _MSG_SCSI_TASK_MGMT
183
 
{
184
 
    U8                      TargetID;           /* 00h */
185
 
    U8                      Bus;                /* 01h */
186
 
    U8                      ChainOffset;        /* 02h */
187
 
    U8                      Function;           /* 03h */
188
 
    U8                      Reserved;           /* 04h */
189
 
    U8                      TaskType;           /* 05h */
190
 
    U8                      Reserved1;          /* 06h */
191
 
    U8                      MsgFlags;           /* 07h */
192
 
    U32                     MsgContext;         /* 08h */
193
 
    U8                      LUN[8];             /* 0Ch */
194
 
    U32                     Reserved2[7];       /* 14h */
195
 
    U32                     TaskMsgContext;     /* 30h */
196
 
} MSG_SCSI_TASK_MGMT, MPI_POINTER PTR_SCSI_TASK_MGMT,
197
 
  SCSITaskMgmt_t, MPI_POINTER pSCSITaskMgmt_t;
198
 
 
199
 
/* TaskType values */
200
 
 
201
 
#define MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK            (0x01)
202
 
#define MPI_SCSITASKMGMT_TASKTYPE_ABRT_TASK_SET         (0x02)
203
 
#define MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET          (0x03)
204
 
#define MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS             (0x04)
205
 
#define MPI_SCSITASKMGMT_TASKTYPE_LOGICAL_UNIT_RESET    (0x05)
206
 
 
207
 
/* MsgFlags bits */
208
 
#define MPI_SCSITASKMGMT_MSGFLAGS_TARGET_RESET_OPTION   (0x00)
209
 
#define MPI_SCSITASKMGMT_MSGFLAGS_LIP_RESET_OPTION      (0x02)
210
 
#define MPI_SCSITASKMGMT_MSGFLAGS_LIPRESET_RESET_OPTION (0x04)
211
 
 
212
 
/* SCSI Task Management Reply */
213
 
typedef struct _MSG_SCSI_TASK_MGMT_REPLY
214
 
{
215
 
    U8                      TargetID;           /* 00h */
216
 
    U8                      Bus;                /* 01h */
217
 
    U8                      MsgLength;          /* 02h */
218
 
    U8                      Function;           /* 03h */
219
 
    U8                      Reserved;           /* 04h */
220
 
    U8                      TaskType;           /* 05h */
221
 
    U8                      Reserved1;          /* 06h */
222
 
    U8                      MsgFlags;           /* 07h */
223
 
    U32                     MsgContext;         /* 08h */
224
 
    U8                      Reserved2[2];       /* 0Ch */
225
 
    U16                     IOCStatus;          /* 0Eh */
226
 
    U32                     IOCLogInfo;         /* 10h */
227
 
    U32                     TerminationCount;   /* 14h */
228
 
} MSG_SCSI_TASK_MGMT_REPLY, MPI_POINTER PTR_MSG_SCSI_TASK_MGMT_REPLY,
229
 
  SCSITaskMgmtReply_t, MPI_POINTER pSCSITaskMgmtReply_t;
230
 
 
231
 
 
232
 
/****************************************************************************/
233
 
/*  SCSI Enclosure Processor messages                                       */
234
 
/****************************************************************************/
235
 
 
236
 
typedef struct _MSG_SEP_REQUEST
237
 
{
238
 
    U8                      TargetID;           /* 00h */
239
 
    U8                      Bus;                /* 01h */
240
 
    U8                      ChainOffset;        /* 02h */
241
 
    U8                      Function;           /* 03h */
242
 
    U8                      Action;             /* 04h */
243
 
    U8                      Reserved1;          /* 05h */
244
 
    U8                      Reserved2;          /* 06h */
245
 
    U8                      MsgFlags;           /* 07h */
246
 
    U32                     MsgContext;         /* 08h */
247
 
    U32                     SlotStatus;         /* 0Ch */
248
 
} MSG_SEP_REQUEST, MPI_POINTER PTR_MSG_SEP_REQUEST,
249
 
  SEPRequest_t, MPI_POINTER pSEPRequest_t;
250
 
 
251
 
/* Action defines */
252
 
#define MPI_SEP_REQ_ACTION_WRITE_STATUS                 (0x00)
253
 
#define MPI_SEP_REQ_ACTION_READ_STATUS                  (0x01)
254
 
 
255
 
/* SlotStatus bits for MSG_SEP_REQUEST */
256
 
#define MPI_SEP_REQ_SLOTSTATUS_NO_ERROR                 (0x00000001)
257
 
#define MPI_SEP_REQ_SLOTSTATUS_DEV_FAULTY               (0x00000002)
258
 
#define MPI_SEP_REQ_SLOTSTATUS_DEV_REBUILDING           (0x00000004)
259
 
#define MPI_SEP_REQ_SLOTSTATUS_IN_FAILED_ARRAY          (0x00000008)
260
 
#define MPI_SEP_REQ_SLOTSTATUS_IN_CRITICAL_ARRAY        (0x00000010)
261
 
#define MPI_SEP_REQ_SLOTSTATUS_PARITY_CHECK             (0x00000020)
262
 
#define MPI_SEP_REQ_SLOTSTATUS_PREDICTED_FAULT          (0x00000040)
263
 
#define MPI_SEP_REQ_SLOTSTATUS_UNCONFIGURED             (0x00000080)
264
 
#define MPI_SEP_REQ_SLOTSTATUS_HOT_SPARE                (0x00000100)
265
 
#define MPI_SEP_REQ_SLOTSTATUS_REBUILD_STOPPED          (0x00000200)
266
 
#define MPI_SEP_REQ_SLOTSTATUS_IDENTIFY_REQUEST         (0x00020000)
267
 
#define MPI_SEP_REQ_SLOTSTATUS_REQUEST_REMOVE           (0x00040000)
268
 
#define MPI_SEP_REQ_SLOTSTATUS_REQUEST_INSERT           (0x00080000)
269
 
#define MPI_SEP_REQ_SLOTSTATUS_DO_NOT_MOVE              (0x00400000)
270
 
#define MPI_SEP_REQ_SLOTSTATUS_B_ENABLE_BYPASS          (0x04000000)
271
 
#define MPI_SEP_REQ_SLOTSTATUS_A_ENABLE_BYPASS          (0x08000000)
272
 
#define MPI_SEP_REQ_SLOTSTATUS_DEV_OFF                  (0x10000000)
273
 
#define MPI_SEP_REQ_SLOTSTATUS_SWAP_RESET               (0x80000000)
274
 
 
275
 
 
276
 
typedef struct _MSG_SEP_REPLY
277
 
{
278
 
    U8                      TargetID;           /* 00h */
279
 
    U8                      Bus;                /* 01h */
280
 
    U8                      MsgLength;          /* 02h */
281
 
    U8                      Function;           /* 03h */
282
 
    U8                      Action;             /* 04h */
283
 
    U8                      Reserved1;          /* 05h */
284
 
    U8                      Reserved2;          /* 06h */
285
 
    U8                      MsgFlags;           /* 07h */
286
 
    U32                     MsgContext;         /* 08h */
287
 
    U16                     Reserved3;          /* 0Ch */
288
 
    U16                     IOCStatus;          /* 0Eh */
289
 
    U32                     IOCLogInfo;         /* 10h */
290
 
    U32                     SlotStatus;         /* 14h */
291
 
} MSG_SEP_REPLY, MPI_POINTER PTR_MSG_SEP_REPLY,
292
 
  SEPReply_t, MPI_POINTER pSEPReply_t;
293
 
 
294
 
/* SlotStatus bits for MSG_SEP_REPLY */
295
 
#define MPI_SEP_REPLY_SLOTSTATUS_NO_ERROR               (0x00000001)
296
 
#define MPI_SEP_REPLY_SLOTSTATUS_DEV_FAULTY             (0x00000002)
297
 
#define MPI_SEP_REPLY_SLOTSTATUS_DEV_REBUILDING         (0x00000004)
298
 
#define MPI_SEP_REPLY_SLOTSTATUS_IN_FAILED_ARRAY        (0x00000008)
299
 
#define MPI_SEP_REPLY_SLOTSTATUS_IN_CRITICAL_ARRAY      (0x00000010)
300
 
#define MPI_SEP_REPLY_SLOTSTATUS_PARITY_CHECK           (0x00000020)
301
 
#define MPI_SEP_REPLY_SLOTSTATUS_PREDICTED_FAULT        (0x00000040)
302
 
#define MPI_SEP_REPLY_SLOTSTATUS_UNCONFIGURED           (0x00000080)
303
 
#define MPI_SEP_REPLY_SLOTSTATUS_HOT_SPARE              (0x00000100)
304
 
#define MPI_SEP_REPLY_SLOTSTATUS_REBUILD_STOPPED        (0x00000200)
305
 
#define MPI_SEP_REPLY_SLOTSTATUS_REPORT                 (0x00010000)
306
 
#define MPI_SEP_REPLY_SLOTSTATUS_IDENTIFY_REQUEST       (0x00020000)
307
 
#define MPI_SEP_REPLY_SLOTSTATUS_REMOVE_READY           (0x00040000)
308
 
#define MPI_SEP_REPLY_SLOTSTATUS_INSERT_READY           (0x00080000)
309
 
#define MPI_SEP_REPLY_SLOTSTATUS_DO_NOT_REMOVE          (0x00400000)
310
 
#define MPI_SEP_REPLY_SLOTSTATUS_B_BYPASS_ENABLED       (0x01000000)
311
 
#define MPI_SEP_REPLY_SLOTSTATUS_A_BYPASS_ENABLED       (0x02000000)
312
 
#define MPI_SEP_REPLY_SLOTSTATUS_B_ENABLE_BYPASS        (0x04000000)
313
 
#define MPI_SEP_REPLY_SLOTSTATUS_A_ENABLE_BYPASS        (0x08000000)
314
 
#define MPI_SEP_REPLY_SLOTSTATUS_DEV_OFF                (0x10000000)
315
 
#define MPI_SEP_REPLY_SLOTSTATUS_FAULT_SENSED           (0x40000000)
316
 
#define MPI_SEP_REPLY_SLOTSTATUS_SWAPPED                (0x80000000)
317
 
 
318
 
#endif