1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89 #ifndef MPI_H
90 #define MPI_H
91
92
93
94
95
96
97
98
99 #define MPI_VERSION_MAJOR (0x01)
100 #define MPI_VERSION_MINOR (0x05)
101 #define MPI_VERSION_MAJOR_MASK (0xFF00)
102 #define MPI_VERSION_MAJOR_SHIFT (8)
103 #define MPI_VERSION_MINOR_MASK (0x00FF)
104 #define MPI_VERSION_MINOR_SHIFT (0)
105 #define MPI_VERSION ((MPI_VERSION_MAJOR << MPI_VERSION_MAJOR_SHIFT) | \
106 MPI_VERSION_MINOR)
107
108 #define MPI_VERSION_01_00 (0x0100)
109 #define MPI_VERSION_01_01 (0x0101)
110 #define MPI_VERSION_01_02 (0x0102)
111 #define MPI_VERSION_01_03 (0x0103)
112 #define MPI_VERSION_01_05 (0x0105)
113
114
115
116 #define MPI_HEADER_VERSION_UNIT (0x13)
117 #define MPI_HEADER_VERSION_DEV (0x00)
118 #define MPI_HEADER_VERSION_UNIT_MASK (0xFF00)
119 #define MPI_HEADER_VERSION_UNIT_SHIFT (8)
120 #define MPI_HEADER_VERSION_DEV_MASK (0x00FF)
121 #define MPI_HEADER_VERSION_DEV_SHIFT (0)
122 #define MPI_HEADER_VERSION ((MPI_HEADER_VERSION_UNIT << 8) | MPI_HEADER_VERSION_DEV)
123
124
125
126
127
128
129
130 #define MPI_IOC_STATE_RESET (0x00000000)
131 #define MPI_IOC_STATE_READY (0x10000000)
132 #define MPI_IOC_STATE_OPERATIONAL (0x20000000)
133 #define MPI_IOC_STATE_FAULT (0x40000000)
134
135 #define MPI_IOC_STATE_MASK (0xF0000000)
136 #define MPI_IOC_STATE_SHIFT (28)
137
138
139
140 #define MPI_FAULT_REQUEST_MESSAGE_PCI_PARITY_ERROR (0x8111)
141 #define MPI_FAULT_REQUEST_MESSAGE_PCI_BUS_FAULT (0x8112)
142 #define MPI_FAULT_REPLY_MESSAGE_PCI_PARITY_ERROR (0x8113)
143 #define MPI_FAULT_REPLY_MESSAGE_PCI_BUS_FAULT (0x8114)
144 #define MPI_FAULT_DATA_SEND_PCI_PARITY_ERROR (0x8115)
145 #define MPI_FAULT_DATA_SEND_PCI_BUS_FAULT (0x8116)
146 #define MPI_FAULT_DATA_RECEIVE_PCI_PARITY_ERROR (0x8117)
147 #define MPI_FAULT_DATA_RECEIVE_PCI_BUS_FAULT (0x8118)
148
149
150
151
152
153
154
155
156
157
158
159
160
161 #define MPI_DOORBELL_OFFSET (0x00000000)
162 #define MPI_DOORBELL_ACTIVE (0x08000000)
163 #define MPI_DOORBELL_USED (MPI_DOORBELL_ACTIVE)
164 #define MPI_DOORBELL_ACTIVE_SHIFT (27)
165 #define MPI_DOORBELL_WHO_INIT_MASK (0x07000000)
166 #define MPI_DOORBELL_WHO_INIT_SHIFT (24)
167 #define MPI_DOORBELL_FUNCTION_MASK (0xFF000000)
168 #define MPI_DOORBELL_FUNCTION_SHIFT (24)
169 #define MPI_DOORBELL_ADD_DWORDS_MASK (0x00FF0000)
170 #define MPI_DOORBELL_ADD_DWORDS_SHIFT (16)
171 #define MPI_DOORBELL_DATA_MASK (0x0000FFFF)
172 #define MPI_DOORBELL_FUNCTION_SPECIFIC_MASK (0x0000FFFF)
173
174
175 #define MPI_DB_HPBAC_VALUE_MASK (0x0000F000)
176 #define MPI_DB_HPBAC_ENABLE_ACCESS (0x01)
177 #define MPI_DB_HPBAC_DISABLE_ACCESS (0x02)
178 #define MPI_DB_HPBAC_FREE_BUFFER (0x03)
179
180
181 #define MPI_WRITE_SEQUENCE_OFFSET (0x00000004)
182 #define MPI_WRSEQ_KEY_VALUE_MASK (0x0000000F)
183 #define MPI_WRSEQ_1ST_KEY_VALUE (0x04)
184 #define MPI_WRSEQ_2ND_KEY_VALUE (0x0B)
185 #define MPI_WRSEQ_3RD_KEY_VALUE (0x02)
186 #define MPI_WRSEQ_4TH_KEY_VALUE (0x07)
187 #define MPI_WRSEQ_5TH_KEY_VALUE (0x0D)
188
189 #define MPI_DIAGNOSTIC_OFFSET (0x00000008)
190 #define MPI_DIAG_CLEAR_FLASH_BAD_SIG (0x00000400)
191 #define MPI_DIAG_PREVENT_IOC_BOOT (0x00000200)
192 #define MPI_DIAG_DRWE (0x00000080)
193 #define MPI_DIAG_FLASH_BAD_SIG (0x00000040)
194 #define MPI_DIAG_RESET_HISTORY (0x00000020)
195 #define MPI_DIAG_RW_ENABLE (0x00000010)
196 #define MPI_DIAG_RESET_ADAPTER (0x00000004)
197 #define MPI_DIAG_DISABLE_ARM (0x00000002)
198 #define MPI_DIAG_MEM_ENABLE (0x00000001)
199
200 #define MPI_TEST_BASE_ADDRESS_OFFSET (0x0000000C)
201
202 #define MPI_DIAG_RW_DATA_OFFSET (0x00000010)
203
204 #define MPI_DIAG_RW_ADDRESS_OFFSET (0x00000014)
205
206 #define MPI_HOST_INTERRUPT_STATUS_OFFSET (0x00000030)
207 #define MPI_HIS_IOP_DOORBELL_STATUS (0x80000000)
208 #define MPI_HIS_REPLY_MESSAGE_INTERRUPT (0x00000008)
209 #define MPI_HIS_DOORBELL_INTERRUPT (0x00000001)
210
211 #define MPI_HOST_INTERRUPT_MASK_OFFSET (0x00000034)
212 #define MPI_HIM_RIM (0x00000008)
213 #define MPI_HIM_DIM (0x00000001)
214
215 #define MPI_REQUEST_QUEUE_OFFSET (0x00000040)
216 #define MPI_REQUEST_POST_FIFO_OFFSET (0x00000040)
217
218 #define MPI_REPLY_QUEUE_OFFSET (0x00000044)
219 #define MPI_REPLY_POST_FIFO_OFFSET (0x00000044)
220 #define MPI_REPLY_FREE_FIFO_OFFSET (0x00000044)
221
222 #define MPI_HI_PRI_REQUEST_QUEUE_OFFSET (0x00000048)
223
224
225
226
227
228
229
230
231
232 #define MPI_REQ_MF_DESCRIPTOR_NB_MASK (0x00000003)
233 #define MPI_REQ_MF_DESCRIPTOR_F_BIT (0x00000004)
234 #define MPI_REQ_MF_DESCRIPTOR_ADDRESS_MASK (0xFFFFFFF8)
235
236 #define MPI_ADDRESS_REPLY_A_BIT (0x80000000)
237 #define MPI_ADDRESS_REPLY_ADDRESS_MASK (0x7FFFFFFF)
238
239 #define MPI_CONTEXT_REPLY_A_BIT (0x80000000)
240 #define MPI_CONTEXT_REPLY_TYPE_MASK (0x60000000)
241 #define MPI_CONTEXT_REPLY_TYPE_SCSI_INIT (0x00)
242 #define MPI_CONTEXT_REPLY_TYPE_SCSI_TARGET (0x01)
243 #define MPI_CONTEXT_REPLY_TYPE_LAN (0x02)
244 #define MPI_CONTEXT_REPLY_TYPE_SHIFT (29)
245 #define MPI_CONTEXT_REPLY_CONTEXT_MASK (0x1FFFFFFF)
246
247
248
249
250
251
252 #define MPI_GET_CONTEXT_REPLY_TYPE(x) (((x) & MPI_CONTEXT_REPLY_TYPE_MASK) \
253 >> MPI_CONTEXT_REPLY_TYPE_SHIFT)
254
255 #define MPI_SET_CONTEXT_REPLY_TYPE(x, typ) \
256 ((x) = ((x) & ~MPI_CONTEXT_REPLY_TYPE_MASK) | \
257 (((typ) << MPI_CONTEXT_REPLY_TYPE_SHIFT) & \
258 MPI_CONTEXT_REPLY_TYPE_MASK))
259
260
261
262
263
264
265
266
267
268
269 #define MPI_FUNCTION_SCSI_IO_REQUEST (0x00)
270 #define MPI_FUNCTION_SCSI_TASK_MGMT (0x01)
271 #define MPI_FUNCTION_IOC_INIT (0x02)
272 #define MPI_FUNCTION_IOC_FACTS (0x03)
273 #define MPI_FUNCTION_CONFIG (0x04)
274 #define MPI_FUNCTION_PORT_FACTS (0x05)
275 #define MPI_FUNCTION_PORT_ENABLE (0x06)
276 #define MPI_FUNCTION_EVENT_NOTIFICATION (0x07)
277 #define MPI_FUNCTION_EVENT_ACK (0x08)
278 #define MPI_FUNCTION_FW_DOWNLOAD (0x09)
279 #define MPI_FUNCTION_TARGET_CMD_BUFFER_POST (0x0A)
280 #define MPI_FUNCTION_TARGET_ASSIST (0x0B)
281 #define MPI_FUNCTION_TARGET_STATUS_SEND (0x0C)
282 #define MPI_FUNCTION_TARGET_MODE_ABORT (0x0D)
283 #define MPI_FUNCTION_FC_LINK_SRVC_BUF_POST (0x0E)
284 #define MPI_FUNCTION_FC_LINK_SRVC_RSP (0x0F)
285 #define MPI_FUNCTION_FC_EX_LINK_SRVC_SEND (0x10)
286 #define MPI_FUNCTION_FC_ABORT (0x11)
287 #define MPI_FUNCTION_FW_UPLOAD (0x12)
288 #define MPI_FUNCTION_FC_COMMON_TRANSPORT_SEND (0x13)
289 #define MPI_FUNCTION_FC_PRIMITIVE_SEND (0x14)
290
291 #define MPI_FUNCTION_RAID_ACTION (0x15)
292 #define MPI_FUNCTION_RAID_SCSI_IO_PASSTHROUGH (0x16)
293
294 #define MPI_FUNCTION_TOOLBOX (0x17)
295
296 #define MPI_FUNCTION_SCSI_ENCLOSURE_PROCESSOR (0x18)
297
298 #define MPI_FUNCTION_MAILBOX (0x19)
299
300 #define MPI_FUNCTION_SMP_PASSTHROUGH (0x1A)
301 #define MPI_FUNCTION_SAS_IO_UNIT_CONTROL (0x1B)
302 #define MPI_FUNCTION_SATA_PASSTHROUGH (0x1C)
303
304 #define MPI_FUNCTION_DIAG_BUFFER_POST (0x1D)
305 #define MPI_FUNCTION_DIAG_RELEASE (0x1E)
306
307 #define MPI_FUNCTION_SCSI_IO_32 (0x1F)
308
309 #define MPI_FUNCTION_LAN_SEND (0x20)
310 #define MPI_FUNCTION_LAN_RECEIVE (0x21)
311 #define MPI_FUNCTION_LAN_RESET (0x22)
312
313 #define MPI_FUNCTION_TARGET_ASSIST_EXTENDED (0x23)
314 #define MPI_FUNCTION_TARGET_CMD_BUF_BASE_POST (0x24)
315 #define MPI_FUNCTION_TARGET_CMD_BUF_LIST_POST (0x25)
316
317 #define MPI_FUNCTION_INBAND_BUFFER_POST (0x28)
318 #define MPI_FUNCTION_INBAND_SEND (0x29)
319 #define MPI_FUNCTION_INBAND_RSP (0x2A)
320 #define MPI_FUNCTION_INBAND_ABORT (0x2B)
321
322 #define MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET (0x40)
323 #define MPI_FUNCTION_IO_UNIT_RESET (0x41)
324 #define MPI_FUNCTION_HANDSHAKE (0x42)
325 #define MPI_FUNCTION_REPLY_FRAME_REMOVAL (0x43)
326 #define MPI_FUNCTION_HOST_PAGEBUF_ACCESS_CONTROL (0x44)
327
328
329
330 typedef struct _MPI_VERSION_STRUCT
331 {
332 U8 Dev;
333 U8 Unit;
334 U8 Minor;
335 U8 Major;
336 } MPI_VERSION_STRUCT, MPI_POINTER PTR_MPI_VERSION_STRUCT,
337 MpiVersionStruct_t, MPI_POINTER pMpiVersionStruct;
338
339 typedef union _MPI_VERSION_FORMAT
340 {
341 MPI_VERSION_STRUCT Struct;
342 U32 Word;
343 } MPI_VERSION_FORMAT, MPI_POINTER PTR_MPI_VERSION_FORMAT,
344 MpiVersionFormat_t, MPI_POINTER pMpiVersionFormat_t;
345
346
347
348
349
350
351
352
353
354
355
356
357 typedef struct _SGE_SIMPLE32
358 {
359 U32 FlagsLength;
360 U32 Address;
361 } SGE_SIMPLE32, MPI_POINTER PTR_SGE_SIMPLE32,
362 SGESimple32_t, MPI_POINTER pSGESimple32_t;
363
364 typedef struct _SGE_SIMPLE64
365 {
366 U32 FlagsLength;
367 U64 Address;
368 } SGE_SIMPLE64, MPI_POINTER PTR_SGE_SIMPLE64,
369 SGESimple64_t, MPI_POINTER pSGESimple64_t;
370
371 typedef struct _SGE_SIMPLE_UNION
372 {
373 U32 FlagsLength;
374 union
375 {
376 U32 Address32;
377 U64 Address64;
378 }u;
379 } SGE_SIMPLE_UNION, MPI_POINTER PTR_SGE_SIMPLE_UNION,
380 SGESimpleUnion_t, MPI_POINTER pSGESimpleUnion_t;
381
382
383
384
385
386 typedef struct _SGE_CHAIN32
387 {
388 U16 Length;
389 U8 NextChainOffset;
390 U8 Flags;
391 U32 Address;
392 } SGE_CHAIN32, MPI_POINTER PTR_SGE_CHAIN32,
393 SGEChain32_t, MPI_POINTER pSGEChain32_t;
394
395 typedef struct _SGE_CHAIN64
396 {
397 U16 Length;
398 U8 NextChainOffset;
399 U8 Flags;
400 U64 Address;
401 } SGE_CHAIN64, MPI_POINTER PTR_SGE_CHAIN64,
402 SGEChain64_t, MPI_POINTER pSGEChain64_t;
403
404 typedef struct _SGE_CHAIN_UNION
405 {
406 U16 Length;
407 U8 NextChainOffset;
408 U8 Flags;
409 union
410 {
411 U32 Address32;
412 U64 Address64;
413 }u;
414 } SGE_CHAIN_UNION, MPI_POINTER PTR_SGE_CHAIN_UNION,
415 SGEChainUnion_t, MPI_POINTER pSGEChainUnion_t;
416
417
418
419
420
421 typedef struct _SGE_TRANSACTION32
422 {
423 U8 Reserved;
424 U8 ContextSize;
425 U8 DetailsLength;
426 U8 Flags;
427 U32 TransactionContext[1];
428 U32 TransactionDetails[1];
429 } SGE_TRANSACTION32, MPI_POINTER PTR_SGE_TRANSACTION32,
430 SGETransaction32_t, MPI_POINTER pSGETransaction32_t;
431
432 typedef struct _SGE_TRANSACTION64
433 {
434 U8 Reserved;
435 U8 ContextSize;
436 U8 DetailsLength;
437 U8 Flags;
438 U32 TransactionContext[2];
439 U32 TransactionDetails[1];
440 } SGE_TRANSACTION64, MPI_POINTER PTR_SGE_TRANSACTION64,
441 SGETransaction64_t, MPI_POINTER pSGETransaction64_t;
442
443 typedef struct _SGE_TRANSACTION96
444 {
445 U8 Reserved;
446 U8 ContextSize;
447 U8 DetailsLength;
448 U8 Flags;
449 U32 TransactionContext[3];
450 U32 TransactionDetails[1];
451 } SGE_TRANSACTION96, MPI_POINTER PTR_SGE_TRANSACTION96,
452 SGETransaction96_t, MPI_POINTER pSGETransaction96_t;
453
454 typedef struct _SGE_TRANSACTION128
455 {
456 U8 Reserved;
457 U8 ContextSize;
458 U8 DetailsLength;
459 U8 Flags;
460 U32 TransactionContext[4];
461 U32 TransactionDetails[1];
462 } SGE_TRANSACTION128, MPI_POINTER PTR_SGE_TRANSACTION128,
463 SGETransaction_t128, MPI_POINTER pSGETransaction_t128;
464
465 typedef struct _SGE_TRANSACTION_UNION
466 {
467 U8 Reserved;
468 U8 ContextSize;
469 U8 DetailsLength;
470 U8 Flags;
471 union
472 {
473 U32 TransactionContext32[1];
474 U32 TransactionContext64[2];
475 U32 TransactionContext96[3];
476 U32 TransactionContext128[4];
477 }u;
478 U32 TransactionDetails[1];
479 } SGE_TRANSACTION_UNION, MPI_POINTER PTR_SGE_TRANSACTION_UNION,
480 SGETransactionUnion_t, MPI_POINTER pSGETransactionUnion_t;
481
482
483
484
485
486
487 typedef struct _SGE_IO_UNION
488 {
489 union
490 {
491 SGE_SIMPLE_UNION Simple;
492 SGE_CHAIN_UNION Chain;
493 } u;
494 } SGE_IO_UNION, MPI_POINTER PTR_SGE_IO_UNION,
495 SGEIOUnion_t, MPI_POINTER pSGEIOUnion_t;
496
497
498
499
500
501 typedef struct _SGE_TRANS_SIMPLE_UNION
502 {
503 union
504 {
505 SGE_SIMPLE_UNION Simple;
506 SGE_TRANSACTION_UNION Transaction;
507 } u;
508 } SGE_TRANS_SIMPLE_UNION, MPI_POINTER PTR_SGE_TRANS_SIMPLE_UNION,
509 SGETransSimpleUnion_t, MPI_POINTER pSGETransSimpleUnion_t;
510
511
512
513
514
515 typedef struct _SGE_MPI_UNION
516 {
517 union
518 {
519 SGE_SIMPLE_UNION Simple;
520 SGE_CHAIN_UNION Chain;
521 SGE_TRANSACTION_UNION Transaction;
522 } u;
523 } SGE_MPI_UNION, MPI_POINTER PTR_SGE_MPI_UNION,
524 MPI_SGE_UNION_t, MPI_POINTER pMPI_SGE_UNION_t,
525 SGEAllUnion_t, MPI_POINTER pSGEAllUnion_t;
526
527
528
529
530
531
532
533
534 #define MPI_SGE_FLAGS_LAST_ELEMENT (0x80)
535 #define MPI_SGE_FLAGS_END_OF_BUFFER (0x40)
536 #define MPI_SGE_FLAGS_ELEMENT_TYPE_MASK (0x30)
537 #define MPI_SGE_FLAGS_LOCAL_ADDRESS (0x08)
538 #define MPI_SGE_FLAGS_DIRECTION (0x04)
539 #define MPI_SGE_FLAGS_ADDRESS_SIZE (0x02)
540 #define MPI_SGE_FLAGS_END_OF_LIST (0x01)
541
542 #define MPI_SGE_FLAGS_SHIFT (24)
543
544 #define MPI_SGE_LENGTH_MASK (0x00FFFFFF)
545 #define MPI_SGE_CHAIN_LENGTH_MASK (0x0000FFFF)
546
547
548
549 #define MPI_SGE_FLAGS_TRANSACTION_ELEMENT (0x00)
550 #define MPI_SGE_FLAGS_SIMPLE_ELEMENT (0x10)
551 #define MPI_SGE_FLAGS_CHAIN_ELEMENT (0x30)
552 #define MPI_SGE_FLAGS_ELEMENT_MASK (0x30)
553
554
555
556 #define MPI_SGE_FLAGS_SYSTEM_ADDRESS (0x00)
557
558
559
560 #define MPI_SGE_FLAGS_IOC_TO_HOST (0x00)
561 #define MPI_SGE_FLAGS_HOST_TO_IOC (0x04)
562
563
564
565 #define MPI_SGE_FLAGS_32_BIT_ADDRESSING (0x00)
566 #define MPI_SGE_FLAGS_64_BIT_ADDRESSING (0x02)
567
568
569
570 #define MPI_SGE_FLAGS_32_BIT_CONTEXT (0x00)
571 #define MPI_SGE_FLAGS_64_BIT_CONTEXT (0x02)
572 #define MPI_SGE_FLAGS_96_BIT_CONTEXT (0x04)
573 #define MPI_SGE_FLAGS_128_BIT_CONTEXT (0x06)
574
575 #define MPI_SGE_CHAIN_OFFSET_MASK (0x00FF0000)
576 #define MPI_SGE_CHAIN_OFFSET_SHIFT (16)
577
578
579
580
581
582
583
584 #define MPI_SGE_SET_FLAGS(f) ((U32)(f) << MPI_SGE_FLAGS_SHIFT)
585 #define MPI_SGE_GET_FLAGS(fl) (((fl) & ~MPI_SGE_LENGTH_MASK) >> MPI_SGE_FLAGS_SHIFT)
586 #define MPI_SGE_LENGTH(fl) ((fl) & MPI_SGE_LENGTH_MASK)
587 #define MPI_SGE_CHAIN_LENGTH(fl) ((fl) & MPI_SGE_CHAIN_LENGTH_MASK)
588
589 #define MPI_SGE_SET_FLAGS_LENGTH(f,l) (MPI_SGE_SET_FLAGS(f) | MPI_SGE_LENGTH(l))
590
591 #define MPI_pSGE_GET_FLAGS(psg) MPI_SGE_GET_FLAGS((psg)->FlagsLength)
592 #define MPI_pSGE_GET_LENGTH(psg) MPI_SGE_LENGTH((psg)->FlagsLength)
593 #define MPI_pSGE_SET_FLAGS_LENGTH(psg,f,l) (psg)->FlagsLength = MPI_SGE_SET_FLAGS_LENGTH(f,l)
594
595 #define MPI_pSGE_SET_FLAGS(psg,f) (psg)->FlagsLength |= MPI_SGE_SET_FLAGS(f)
596 #define MPI_pSGE_SET_LENGTH(psg,l) (psg)->FlagsLength |= MPI_SGE_LENGTH(l)
597
598 #define MPI_GET_CHAIN_OFFSET(x) ((x&MPI_SGE_CHAIN_OFFSET_MASK)>>MPI_SGE_CHAIN_OFFSET_SHIFT)
599
600
601
602
603
604
605
606
607
608
609
610
611
612 typedef struct _MSG_REQUEST_HEADER
613 {
614 U8 Reserved[2];
615 U8 ChainOffset;
616 U8 Function;
617 U8 Reserved1[3];
618 U8 MsgFlags;
619 U32 MsgContext;
620 } MSG_REQUEST_HEADER, MPI_POINTER PTR_MSG_REQUEST_HEADER,
621 MPIHeader_t, MPI_POINTER pMPIHeader_t;
622
623
624
625
626
627
628 typedef struct _MSG_DEFAULT_REPLY
629 {
630 U8 Reserved[2];
631 U8 MsgLength;
632 U8 Function;
633 U8 Reserved1[3];
634 U8 MsgFlags;
635 U32 MsgContext;
636 U8 Reserved2[2];
637 U16 IOCStatus;
638 U32 IOCLogInfo;
639 } MSG_DEFAULT_REPLY, MPI_POINTER PTR_MSG_DEFAULT_REPLY,
640 MPIDefaultReply_t, MPI_POINTER pMPIDefaultReply_t;
641
642
643
644
645 #define MPI_MSGFLAGS_CONTINUATION_REPLY (0x80)
646
647
648
649
650
651
652
653
654
655
656
657
658 #define MPI_IOCSTATUS_SUCCESS (0x0000)
659 #define MPI_IOCSTATUS_INVALID_FUNCTION (0x0001)
660 #define MPI_IOCSTATUS_BUSY (0x0002)
661 #define MPI_IOCSTATUS_INVALID_SGL (0x0003)
662 #define MPI_IOCSTATUS_INTERNAL_ERROR (0x0004)
663 #define MPI_IOCSTATUS_RESERVED (0x0005)
664 #define MPI_IOCSTATUS_INSUFFICIENT_RESOURCES (0x0006)
665 #define MPI_IOCSTATUS_INVALID_FIELD (0x0007)
666 #define MPI_IOCSTATUS_INVALID_STATE (0x0008)
667 #define MPI_IOCSTATUS_OP_STATE_NOT_SUPPORTED (0x0009)
668
669
670
671
672
673 #define MPI_IOCSTATUS_CONFIG_INVALID_ACTION (0x0020)
674 #define MPI_IOCSTATUS_CONFIG_INVALID_TYPE (0x0021)
675 #define MPI_IOCSTATUS_CONFIG_INVALID_PAGE (0x0022)
676 #define MPI_IOCSTATUS_CONFIG_INVALID_DATA (0x0023)
677 #define MPI_IOCSTATUS_CONFIG_NO_DEFAULTS (0x0024)
678 #define MPI_IOCSTATUS_CONFIG_CANT_COMMIT (0x0025)
679
680
681
682
683
684 #define MPI_IOCSTATUS_SCSI_RECOVERED_ERROR (0x0040)
685 #define MPI_IOCSTATUS_SCSI_INVALID_BUS (0x0041)
686 #define MPI_IOCSTATUS_SCSI_INVALID_TARGETID (0x0042)
687 #define MPI_IOCSTATUS_SCSI_DEVICE_NOT_THERE (0x0043)
688 #define MPI_IOCSTATUS_SCSI_DATA_OVERRUN (0x0044)
689 #define MPI_IOCSTATUS_SCSI_DATA_UNDERRUN (0x0045)
690 #define MPI_IOCSTATUS_SCSI_IO_DATA_ERROR (0x0046)
691 #define MPI_IOCSTATUS_SCSI_PROTOCOL_ERROR (0x0047)
692 #define MPI_IOCSTATUS_SCSI_TASK_TERMINATED (0x0048)
693 #define MPI_IOCSTATUS_SCSI_RESIDUAL_MISMATCH (0x0049)
694 #define MPI_IOCSTATUS_SCSI_TASK_MGMT_FAILED (0x004A)
695 #define MPI_IOCSTATUS_SCSI_IOC_TERMINATED (0x004B)
696 #define MPI_IOCSTATUS_SCSI_EXT_TERMINATED (0x004C)
697
698
699
700
701
702 #define MPI_IOCSTATUS_EEDP_GUARD_ERROR (0x004D)
703 #define MPI_IOCSTATUS_EEDP_REF_TAG_ERROR (0x004E)
704 #define MPI_IOCSTATUS_EEDP_APP_TAG_ERROR (0x004F)
705
706
707
708
709
710
711 #define MPI_IOCSTATUS_TARGET_PRIORITY_IO (0x0060)
712 #define MPI_IOCSTATUS_TARGET_INVALID_PORT (0x0061)
713 #define MPI_IOCSTATUS_TARGET_INVALID_IOCINDEX (0x0062)
714 #define MPI_IOCSTATUS_TARGET_INVALID_IO_INDEX (0x0062)
715 #define MPI_IOCSTATUS_TARGET_ABORTED (0x0063)
716 #define MPI_IOCSTATUS_TARGET_NO_CONN_RETRYABLE (0x0064)
717 #define MPI_IOCSTATUS_TARGET_NO_CONNECTION (0x0065)
718 #define MPI_IOCSTATUS_TARGET_XFER_COUNT_MISMATCH (0x006A)
719 #define MPI_IOCSTATUS_TARGET_STS_DATA_NOT_SENT (0x006B)
720 #define MPI_IOCSTATUS_TARGET_DATA_OFFSET_ERROR (0x006D)
721 #define MPI_IOCSTATUS_TARGET_TOO_MUCH_WRITE_DATA (0x006E)
722 #define MPI_IOCSTATUS_TARGET_IU_TOO_SHORT (0x006F)
723 #define MPI_IOCSTATUS_TARGET_ACK_NAK_TIMEOUT (0x0070)
724 #define MPI_IOCSTATUS_TARGET_NAK_RECEIVED (0x0071)
725
726
727
728
729
730 #define MPI_IOCSTATUS_TARGET_FC_ABORTED (0x0066)
731 #define MPI_IOCSTATUS_TARGET_FC_RX_ID_INVALID (0x0067)
732 #define MPI_IOCSTATUS_TARGET_FC_DID_INVALID (0x0068)
733 #define MPI_IOCSTATUS_TARGET_FC_NODE_LOGGED_OUT (0x0069)
734
735
736
737
738
739 #define MPI_IOCSTATUS_FC_ABORTED (0x0066)
740 #define MPI_IOCSTATUS_FC_RX_ID_INVALID (0x0067)
741 #define MPI_IOCSTATUS_FC_DID_INVALID (0x0068)
742 #define MPI_IOCSTATUS_FC_NODE_LOGGED_OUT (0x0069)
743 #define MPI_IOCSTATUS_FC_EXCHANGE_CANCELED (0x006C)
744
745
746
747
748
749 #define MPI_IOCSTATUS_LAN_DEVICE_NOT_FOUND (0x0080)
750 #define MPI_IOCSTATUS_LAN_DEVICE_FAILURE (0x0081)
751 #define MPI_IOCSTATUS_LAN_TRANSMIT_ERROR (0x0082)
752 #define MPI_IOCSTATUS_LAN_TRANSMIT_ABORTED (0x0083)
753 #define MPI_IOCSTATUS_LAN_RECEIVE_ERROR (0x0084)
754 #define MPI_IOCSTATUS_LAN_RECEIVE_ABORTED (0x0085)
755 #define MPI_IOCSTATUS_LAN_PARTIAL_PACKET (0x0086)
756 #define MPI_IOCSTATUS_LAN_CANCELED (0x0087)
757
758
759
760
761
762 #define MPI_IOCSTATUS_SAS_SMP_REQUEST_FAILED (0x0090)
763 #define MPI_IOCSTATUS_SAS_SMP_DATA_OVERRUN (0x0091)
764
765
766
767
768
769 #define MPI_IOCSTATUS_INBAND_ABORTED (0x0098)
770 #define MPI_IOCSTATUS_INBAND_NO_CONNECTION (0x0099)
771
772
773
774
775
776 #define MPI_IOCSTATUS_DIAGNOSTIC_RELEASED (0x00A0)
777
778
779
780
781
782
783 #define MPI_IOCSTATUS_FLAG_LOG_INFO_AVAILABLE (0x8000)
784 #define MPI_IOCSTATUS_MASK (0x7FFF)
785
786
787
788
789
790 #define MPI_IOCLOGINFO_TYPE_MASK (0xF0000000)
791 #define MPI_IOCLOGINFO_TYPE_SHIFT (28)
792 #define MPI_IOCLOGINFO_TYPE_NONE (0x0)
793 #define MPI_IOCLOGINFO_TYPE_SCSI (0x1)
794 #define MPI_IOCLOGINFO_TYPE_FC (0x2)
795 #define MPI_IOCLOGINFO_TYPE_SAS (0x3)
796 #define MPI_IOCLOGINFO_TYPE_ISCSI (0x4)
797 #define MPI_IOCLOGINFO_LOG_DATA_MASK (0x0FFFFFFF)
798
799
800 #endif