OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [drivers/] [message/] [fusion/] [lsi/] [mpi_init.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.