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 #ifndef MPI_TARG_H
63 #define MPI_TARG_H
64
65
66
67
68
69
70
71
72 typedef struct _CMD_BUFFER_DESCRIPTOR
73 {
74 U16 IoIndex;
75 U16 Reserved;
76 union
77 {
78 U32 PhysicalAddress32;
79 U64 PhysicalAddress64;
80 } u;
81 } CMD_BUFFER_DESCRIPTOR, MPI_POINTER PTR_CMD_BUFFER_DESCRIPTOR,
82 CmdBufferDescriptor_t, MPI_POINTER pCmdBufferDescriptor_t;
83
84
85
86
87
88
89 typedef struct _MSG_TARGET_CMD_BUFFER_POST_REQUEST
90 {
91 U8 BufferPostFlags;
92 U8 BufferCount;
93 U8 ChainOffset;
94 U8 Function;
95 U8 BufferLength;
96 U8 Reserved;
97 U8 Reserved1;
98 U8 MsgFlags;
99 U32 MsgContext;
100 CMD_BUFFER_DESCRIPTOR Buffer[1];
101 } MSG_TARGET_CMD_BUFFER_POST_REQUEST, MPI_POINTER PTR_MSG_TARGET_CMD_BUFFER_POST_REQUEST,
102 TargetCmdBufferPostRequest_t, MPI_POINTER pTargetCmdBufferPostRequest_t;
103
104 #define CMD_BUFFER_POST_FLAGS_PORT_MASK (0x01)
105 #define CMD_BUFFER_POST_FLAGS_ADDR_MODE_MASK (0x80)
106 #define CMD_BUFFER_POST_FLAGS_ADDR_MODE_32 (0)
107 #define CMD_BUFFER_POST_FLAGS_ADDR_MODE_64 (1)
108 #define CMD_BUFFER_POST_FLAGS_64_BIT_ADDR (0x80)
109
110 #define CMD_BUFFER_POST_IO_INDEX_MASK (0x00003FFF)
111 #define CMD_BUFFER_POST_IO_INDEX_MASK_0100 (0x000003FF)
112
113
114 typedef struct _MSG_TARGET_CMD_BUFFER_POST_REPLY
115 {
116 U8 BufferPostFlags;
117 U8 BufferCount;
118 U8 MsgLength;
119 U8 Function;
120 U8 BufferLength;
121 U8 Reserved;
122 U8 Reserved1;
123 U8 MsgFlags;
124 U32 MsgContext;
125 U16 Reserved2;
126 U16 IOCStatus;
127 U32 IOCLogInfo;
128 } MSG_TARGET_CMD_BUFFER_POST_REPLY, MPI_POINTER PTR_MSG_TARGET_CMD_BUFFER_POST_REPLY,
129 TargetCmdBufferPostReply_t, MPI_POINTER pTargetCmdBufferPostReply_t;
130
131
132 typedef struct _MSG_PRIORITY_CMD_RECEIVED_REPLY
133 {
134 U16 Reserved;
135 U8 MsgLength;
136 U8 Function;
137 U16 Reserved1;
138 U8 Reserved2;
139 U8 MsgFlags;
140 U32 MsgContext;
141 U8 PriorityReason;
142 U8 Reserved3;
143 U16 IOCStatus;
144 U32 IOCLogInfo;
145 U32 ReplyWord;
146 } MSG_PRIORITY_CMD_RECEIVED_REPLY, MPI_POINTER PTR_MSG_PRIORITY_CMD_RECEIVED_REPLY,
147 PriorityCommandReceivedReply_t, MPI_POINTER pPriorityCommandReceivedReply_t;
148
149
150 typedef struct _MSG_TARGET_CMD_BUFFER_POST_ERROR_REPLY
151 {
152 U16 Reserved;
153 U8 MsgLength;
154 U8 Function;
155 U16 Reserved1;
156 U8 Reserved2;
157 U8 MsgFlags;
158 U32 MsgContext;
159 U8 PriorityReason;
160 U8 Reserved3;
161 U16 IOCStatus;
162 U32 IOCLogInfo;
163 U32 ReplyWord;
164 } MSG_TARGET_CMD_BUFFER_POST_ERROR_REPLY,
165 MPI_POINTER PTR_MSG_TARGET_CMD_BUFFER_POST_ERROR_REPLY,
166 TargetCmdBufferPostErrorReply_t, MPI_POINTER pTargetCmdBufferPostErrorReply_t;
167
168 #define PRIORITY_REASON_NO_DISCONNECT (0x00)
169 #define PRIORITY_REASON_SCSI_TASK_MANAGEMENT (0x01)
170 #define PRIORITY_REASON_CMD_PARITY_ERR (0x02)
171 #define PRIORITY_REASON_MSG_OUT_PARITY_ERR (0x03)
172 #define PRIORITY_REASON_LQ_CRC_ERR (0x04)
173 #define PRIORITY_REASON_CMD_CRC_ERR (0x05)
174 #define PRIORITY_REASON_PROTOCOL_ERR (0x06)
175 #define PRIORITY_REASON_DATA_OUT_PARITY_ERR (0x07)
176 #define PRIORITY_REASON_DATA_OUT_CRC_ERR (0x08)
177 #define PRIORITY_REASON_TARGET_BUSY (0x09)
178 #define PRIORITY_REASON_UNKNOWN (0xFF)
179
180
181
182
183
184
185 typedef struct _MSG_TARGET_CMD_BUF_POST_BASE_REQUEST
186 {
187 U8 BufferPostFlags;
188 U8 PortNumber;
189 U8 ChainOffset;
190 U8 Function;
191 U16 TotalCmdBuffers;
192 U8 Reserved;
193 U8 MsgFlags;
194 U32 MsgContext;
195 U32 Reserved1;
196 U16 CmdBufferLength;
197 U16 NextCmdBufferOffset;
198 U32 BaseAddressLow;
199 U32 BaseAddressHigh;
200 } MSG_TARGET_CMD_BUF_POST_BASE_REQUEST,
201 MPI_POINTER PTR__MSG_TARGET_CMD_BUF_POST_BASE_REQUEST,
202 TargetCmdBufferPostBaseRequest_t,
203 MPI_POINTER pTargetCmdBufferPostBaseRequest_t;
204
205 #define CMD_BUFFER_POST_BASE_FLAGS_AUTO_POST_ALL (0x01)
206
207
208 typedef struct _MSG_TARGET_CMD_BUFFER_POST_BASE_LIST_REPLY
209 {
210 U16 Reserved;
211 U8 MsgLength;
212 U8 Function;
213 U16 Reserved1;
214 U8 Reserved2;
215 U8 MsgFlags;
216 U32 MsgContext;
217 U16 Reserved3;
218 U16 IOCStatus;
219 U32 IOCLogInfo;
220 } MSG_TARGET_CMD_BUFFER_POST_BASE_LIST_REPLY,
221 MPI_POINTER PTR_MSG_TARGET_CMD_BUFFER_POST_BASE_LIST_REPLY,
222 TargetCmdBufferPostBaseListReply_t,
223 MPI_POINTER pTargetCmdBufferPostBaseListReply_t;
224
225
226
227
228
229
230 typedef struct _MSG_TARGET_CMD_BUF_POST_LIST_REQUEST
231 {
232 U8 Reserved;
233 U8 PortNumber;
234 U8 ChainOffset;
235 U8 Function;
236 U16 CmdBufferCount;
237 U8 Reserved1;
238 U8 MsgFlags;
239 U32 MsgContext;
240 U32 Reserved2;
241 U16 IoIndex[2];
242 } MSG_TARGET_CMD_BUF_POST_LIST_REQUEST,
243 MPI_POINTER PTR_MSG_TARGET_CMD_BUF_POST_LIST_REQUEST,
244 TargetCmdBufferPostListRequest_t,
245 MPI_POINTER pTargetCmdBufferPostListRequest_t;
246
247
248
249
250
251
252 typedef struct _MPI_TARGET_FCP_CMD_BUFFER
253 {
254 U8 FcpLun[8];
255 U8 FcpCntl[4];
256 U8 FcpCdb[16];
257 U32 FcpDl;
258 U8 AliasIndex;
259 U8 Reserved1;
260 U16 OptionalOxid;
261 } MPI_TARGET_FCP_CMD_BUFFER, MPI_POINTER PTR_MPI_TARGET_FCP_CMD_BUFFER,
262 MpiTargetFcpCmdBuffer, MPI_POINTER pMpiTargetFcpCmdBuffer;
263
264
265 typedef struct _MPI_TARGET_SCSI_SPI_CMD_BUFFER
266 {
267
268 U8 L_QType;
269 U8 Reserved;
270 U16 Tag;
271 U8 LogicalUnitNumber[8];
272 U32 DataLength;
273
274 U8 ReservedFirstByteOfCommandIU;
275 U8 TaskAttribute;
276 U8 TaskManagementFlags;
277 U8 AdditionalCDBLength;
278 U8 CDB[16];
279
280 U8 AliasID;
281 U8 Reserved1;
282 U16 Reserved2;
283 } MPI_TARGET_SCSI_SPI_CMD_BUFFER,
284 MPI_POINTER PTR_MPI_TARGET_SCSI_SPI_CMD_BUFFER,
285 MpiTargetScsiSpiCmdBuffer, MPI_POINTER pMpiTargetScsiSpiCmdBuffer;
286
287
288 typedef struct _MPI_TARGET_SSP_CMD_BUFFER
289 {
290 U8 FrameType;
291 U8 Reserved1;
292 U16 Reserved2;
293 U16 InitiatorTag;
294 U16 DevHandle;
295
296 U8 LogicalUnitNumber[8];
297 U8 Reserved3;
298 U8 TaskAttribute;
299 U8 Reserved4;
300 U8 AdditionalCDBLength;
301 U8 CDB[16];
302
303 } MPI_TARGET_SSP_CMD_BUFFER, MPI_POINTER PTR_MPI_TARGET_SSP_CMD_BUFFER,
304 MpiTargetSspCmdBuffer, MPI_POINTER pMpiTargetSspCmdBuffer;
305
306 typedef struct _MPI_TARGET_SSP_TASK_BUFFER
307 {
308 U8 FrameType;
309 U8 Reserved1;
310 U16 Reserved2;
311 U16 InitiatorTag;
312 U16 DevHandle;
313
314 U8 LogicalUnitNumber[8];
315 U8 Reserved3;
316 U8 Reserved4;
317 U8 TaskManagementFunction;
318 U8 Reserved5;
319 U16 ManagedTaskTag;
320 U16 Reserved6;
321 U32 Reserved7;
322 U32 Reserved8;
323 U32 Reserved9;
324 } MPI_TARGET_SSP_TASK_BUFFER, MPI_POINTER PTR_MPI_TARGET_SSP_TASK_BUFFER,
325 MpiTargetSspTaskBuffer, MPI_POINTER pMpiTargetSspTaskBuffer;
326
327
328
329
330
331
332 typedef struct _MSG_TARGET_ASSIST_REQUEST
333 {
334 U8 StatusCode;
335 U8 TargetAssistFlags;
336 U8 ChainOffset;
337 U8 Function;
338 U16 QueueTag;
339 U8 Reserved;
340 U8 MsgFlags;
341 U32 MsgContext;
342 U32 ReplyWord;
343 U8 LUN[8];
344 U32 RelativeOffset;
345 U32 DataLength;
346 SGE_IO_UNION SGL[1];
347 } MSG_TARGET_ASSIST_REQUEST, MPI_POINTER PTR_MSG_TARGET_ASSIST_REQUEST,
348 TargetAssistRequest_t, MPI_POINTER pTargetAssistRequest_t;
349
350 #define TARGET_ASSIST_FLAGS_DATA_DIRECTION (0x01)
351 #define TARGET_ASSIST_FLAGS_AUTO_STATUS (0x02)
352 #define TARGET_ASSIST_FLAGS_HIGH_PRIORITY (0x04)
353 #define TARGET_ASSIST_FLAGS_CONFIRMED (0x08)
354 #define TARGET_ASSIST_FLAGS_REPOST_CMD_BUFFER (0x80)
355
356
357 typedef struct _MSG_TARGET_ERROR_REPLY
358 {
359 U16 Reserved;
360 U8 MsgLength;
361 U8 Function;
362 U16 Reserved1;
363 U8 Reserved2;
364 U8 MsgFlags;
365 U32 MsgContext;
366 U8 PriorityReason;
367 U8 Reserved3;
368 U16 IOCStatus;
369 U32 IOCLogInfo;
370 U32 ReplyWord;
371 U32 TransferCount;
372 } MSG_TARGET_ERROR_REPLY, MPI_POINTER PTR_MSG_TARGET_ERROR_REPLY,
373 TargetErrorReply_t, MPI_POINTER pTargetErrorReply_t;
374
375
376
377
378
379
380 typedef struct _MSG_TARGET_ASSIST_EXT_REQUEST
381 {
382 U8 StatusCode;
383 U8 TargetAssistFlags;
384 U8 ChainOffset;
385 U8 Function;
386 U16 QueueTag;
387 U8 Reserved1;
388 U8 MsgFlags;
389 U32 MsgContext;
390 U32 ReplyWord;
391 U8 LUN[8];
392 U32 RelativeOffset;
393 U32 Reserved2;
394 U32 Reserved3;
395 U32 PrimaryReferenceTag;
396 U16 PrimaryApplicationTag;
397 U16 PrimaryApplicationTagMask;
398 U32 Reserved4;
399 U32 DataLength;
400 U32 BidirectionalDataLength;
401 U32 SecondaryReferenceTag;
402 U16 SecondaryApplicationTag;
403 U16 Reserved5;
404 U16 EEDPFlags;
405 U16 ApplicationTagTranslationMask;
406 U32 EEDPBlockSize;
407 U8 SGLOffset0;
408 U8 SGLOffset1;
409 U8 SGLOffset2;
410 U8 SGLOffset3;
411 U32 Reserved6;
412 SGE_IO_UNION SGL[1];
413 } MSG_TARGET_ASSIST_EXT_REQUEST, MPI_POINTER PTR_MSG_TARGET_ASSIST_EXT_REQUEST,
414 TargetAssistExtRequest_t, MPI_POINTER pTargetAssistExtRequest_t;
415
416
417
418
419 #define TARGET_ASSIST_EXT_MSGFLAGS_BIDIRECTIONAL (0x20)
420 #define TARGET_ASSIST_EXT_MSGFLAGS_MULTICAST (0x10)
421 #define TARGET_ASSIST_EXT_MSGFLAGS_SGL_OFFSET_CHAINS (0x08)
422
423
424 #define TARGET_ASSIST_EXT_EEDP_MASK_OP (0x0007)
425 #define TARGET_ASSIST_EXT_EEDP_NOOP_OP (0x0000)
426 #define TARGET_ASSIST_EXT_EEDP_CHK_OP (0x0001)
427 #define TARGET_ASSIST_EXT_EEDP_STRIP_OP (0x0002)
428 #define TARGET_ASSIST_EXT_EEDP_CHKRM_OP (0x0003)
429 #define TARGET_ASSIST_EXT_EEDP_INSERT_OP (0x0004)
430 #define TARGET_ASSIST_EXT_EEDP_REPLACE_OP (0x0006)
431 #define TARGET_ASSIST_EXT_EEDP_CHKREGEN_OP (0x0007)
432
433 #define TARGET_ASSIST_EXT_EEDP_PASS_REF_TAG (0x0008)
434
435 #define TARGET_ASSIST_EXT_EEDP_T10_CHK_MASK (0x0700)
436 #define TARGET_ASSIST_EXT_EEDP_T10_CHK_GUARD (0x0100)
437 #define TARGET_ASSIST_EXT_EEDP_T10_CHK_APPTAG (0x0200)
438 #define TARGET_ASSIST_EXT_EEDP_T10_CHK_REFTAG (0x0400)
439 #define TARGET_ASSIST_EXT_EEDP_T10_CHK_SHIFT (8)
440
441 #define TARGET_ASSIST_EXT_EEDP_INC_SEC_APPTAG (0x1000)
442 #define TARGET_ASSIST_EXT_EEDP_INC_PRI_APPTAG (0x2000)
443 #define TARGET_ASSIST_EXT_EEDP_INC_SEC_REFTAG (0x4000)
444 #define TARGET_ASSIST_EXT_EEDP_INC_PRI_REFTAG (0x8000)
445
446
447
448
449
450
451 typedef struct _MSG_TARGET_STATUS_SEND_REQUEST
452 {
453 U8 StatusCode;
454 U8 StatusFlags;
455 U8 ChainOffset;
456 U8 Function;
457 U16 QueueTag;
458 U8 Reserved;
459 U8 MsgFlags;
460 U32 MsgContext;
461 U32 ReplyWord;
462 U8 LUN[8];
463 SGE_SIMPLE_UNION StatusDataSGE;
464 } MSG_TARGET_STATUS_SEND_REQUEST, MPI_POINTER PTR_MSG_TARGET_STATUS_SEND_REQUEST,
465 TargetStatusSendRequest_t, MPI_POINTER pTargetStatusSendRequest_t;
466
467 #define TARGET_STATUS_SEND_FLAGS_AUTO_GOOD_STATUS (0x01)
468 #define TARGET_STATUS_SEND_FLAGS_HIGH_PRIORITY (0x04)
469 #define TARGET_STATUS_SEND_FLAGS_CONFIRMED (0x08)
470 #define TARGET_STATUS_SEND_FLAGS_REPOST_CMD_BUFFER (0x80)
471
472
473
474
475
476 typedef struct _MPI_TARGET_FCP_RSP_BUFFER
477 {
478 U8 Reserved0[8];
479 U8 Reserved1[2];
480 U8 FcpFlags;
481 U8 FcpStatus;
482 U32 FcpResid;
483 U32 FcpSenseLength;
484 U32 FcpResponseLength;
485 U8 FcpResponseData[8];
486 U8 FcpSenseData[32];
487 } MPI_TARGET_FCP_RSP_BUFFER, MPI_POINTER PTR_MPI_TARGET_FCP_RSP_BUFFER,
488 MpiTargetFcpRspBuffer, MPI_POINTER pMpiTargetFcpRspBuffer;
489
490
491
492
493
494 typedef struct _MPI_TARGET_SCSI_SPI_STATUS_IU
495 {
496 U8 Reserved0;
497 U8 Reserved1;
498 U8 Valid;
499 U8 Status;
500 U32 SenseDataListLength;
501 U32 PktFailuresListLength;
502 U8 SenseData[52];
503 } MPI_TARGET_SCSI_SPI_STATUS_IU, MPI_POINTER PTR_MPI_TARGET_SCSI_SPI_STATUS_IU,
504 TargetScsiSpiStatusIU_t, MPI_POINTER pTargetScsiSpiStatusIU_t;
505
506
507
508
509
510 typedef struct _MPI_TARGET_SSP_RSP_IU
511 {
512 U32 Reserved0[6];
513
514 U32 Reserved1;
515 U32 Reserved2;
516 U16 Reserved3;
517 U8 DataPres;
518 U8 Status;
519 U32 Reserved4;
520 U32 SenseDataLength;
521 U32 ResponseDataLength;
522 U8 ResponseSenseData[4];
523 } MPI_TARGET_SSP_RSP_IU, MPI_POINTER PTR_MPI_TARGET_SSP_RSP_IU,
524 MpiTargetSspRspIu_t, MPI_POINTER pMpiTargetSspRspIu_t;
525
526
527
528
529
530
531 typedef struct _MSG_TARGET_MODE_ABORT_REQUEST
532 {
533 U8 AbortType;
534 U8 Reserved;
535 U8 ChainOffset;
536 U8 Function;
537 U16 Reserved1;
538 U8 Reserved2;
539 U8 MsgFlags;
540 U32 MsgContext;
541 U32 ReplyWord;
542 U32 MsgContextToAbort;
543 } MSG_TARGET_MODE_ABORT, MPI_POINTER PTR_MSG_TARGET_MODE_ABORT,
544 TargetModeAbort_t, MPI_POINTER pTargetModeAbort_t;
545
546 #define TARGET_MODE_ABORT_TYPE_ALL_CMD_BUFFERS (0x00)
547 #define TARGET_MODE_ABORT_TYPE_ALL_IO (0x01)
548 #define TARGET_MODE_ABORT_TYPE_EXACT_IO (0x02)
549 #define TARGET_MODE_ABORT_TYPE_EXACT_IO_REQUEST (0x03)
550
551
552
553 typedef struct _MSG_TARGET_MODE_ABORT_REPLY
554 {
555 U16 Reserved;
556 U8 MsgLength;
557 U8 Function;
558 U16 Reserved1;
559 U8 Reserved2;
560 U8 MsgFlags;
561 U32 MsgContext;
562 U16 Reserved3;
563 U16 IOCStatus;
564 U32 IOCLogInfo;
565 U32 AbortCount;
566 } MSG_TARGET_MODE_ABORT_REPLY, MPI_POINTER PTR_MSG_TARGET_MODE_ABORT_REPLY,
567 TargetModeAbortReply_t, MPI_POINTER pTargetModeAbortReply_t;
568
569
570
571
572
573
574 #define TARGET_MODE_REPLY_IO_INDEX_MASK (0x00003FFF)
575 #define TARGET_MODE_REPLY_IO_INDEX_SHIFT (0)
576 #define TARGET_MODE_REPLY_INITIATOR_INDEX_MASK (0x03FFC000)
577 #define TARGET_MODE_REPLY_INITIATOR_INDEX_SHIFT (14)
578 #define TARGET_MODE_REPLY_ALIAS_MASK (0x04000000)
579 #define TARGET_MODE_REPLY_ALIAS_SHIFT (26)
580 #define TARGET_MODE_REPLY_PORT_MASK (0x10000000)
581 #define TARGET_MODE_REPLY_PORT_SHIFT (28)
582
583
584 #define GET_IO_INDEX(x) (((x) & TARGET_MODE_REPLY_IO_INDEX_MASK) \
585 >> TARGET_MODE_REPLY_IO_INDEX_SHIFT)
586
587 #define SET_IO_INDEX(t, i) \
588 ((t) = ((t) & ~TARGET_MODE_REPLY_IO_INDEX_MASK) | \
589 (((i) << TARGET_MODE_REPLY_IO_INDEX_SHIFT) & \
590 TARGET_MODE_REPLY_IO_INDEX_MASK))
591
592 #define GET_INITIATOR_INDEX(x) (((x) & TARGET_MODE_REPLY_INITIATOR_INDEX_MASK) \
593 >> TARGET_MODE_REPLY_INITIATOR_INDEX_SHIFT)
594
595 #define SET_INITIATOR_INDEX(t, ii) \
596 ((t) = ((t) & ~TARGET_MODE_REPLY_INITIATOR_INDEX_MASK) | \
597 (((ii) << TARGET_MODE_REPLY_INITIATOR_INDEX_SHIFT) & \
598 TARGET_MODE_REPLY_INITIATOR_INDEX_MASK))
599
600 #define GET_ALIAS(x) (((x) & TARGET_MODE_REPLY_ALIAS_MASK) \
601 >> TARGET_MODE_REPLY_ALIAS_SHIFT)
602
603 #define SET_ALIAS(t, a) ((t) = ((t) & ~TARGET_MODE_REPLY_ALIAS_MASK) | \
604 (((a) << TARGET_MODE_REPLY_ALIAS_SHIFT) & \
605 TARGET_MODE_REPLY_ALIAS_MASK))
606
607 #define GET_PORT(x) (((x) & TARGET_MODE_REPLY_PORT_MASK) \
608 >> TARGET_MODE_REPLY_PORT_SHIFT)
609
610 #define SET_PORT(t, p) ((t) = ((t) & ~TARGET_MODE_REPLY_PORT_MASK) | \
611 (((p) << TARGET_MODE_REPLY_PORT_SHIFT) & \
612 TARGET_MODE_REPLY_PORT_MASK))
613
614
615 #define TARGET_MODE_REPLY_0100_MASK_HOST_INDEX (0x000003FF)
616 #define TARGET_MODE_REPLY_0100_SHIFT_HOST_INDEX (0)
617 #define TARGET_MODE_REPLY_0100_MASK_IOC_INDEX (0x001FF800)
618 #define TARGET_MODE_REPLY_0100_SHIFT_IOC_INDEX (11)
619 #define TARGET_MODE_REPLY_0100_PORT_MASK (0x00400000)
620 #define TARGET_MODE_REPLY_0100_PORT_SHIFT (22)
621 #define TARGET_MODE_REPLY_0100_MASK_INITIATOR_INDEX (0x1F800000)
622 #define TARGET_MODE_REPLY_0100_SHIFT_INITIATOR_INDEX (23)
623
624 #define GET_HOST_INDEX_0100(x) (((x) & TARGET_MODE_REPLY_0100_MASK_HOST_INDEX) \
625 >> TARGET_MODE_REPLY_0100_SHIFT_HOST_INDEX)
626
627 #define SET_HOST_INDEX_0100(t, hi) \
628 ((t) = ((t) & ~TARGET_MODE_REPLY_0100_MASK_HOST_INDEX) | \
629 (((hi) << TARGET_MODE_REPLY_0100_SHIFT_HOST_INDEX) & \
630 TARGET_MODE_REPLY_0100_MASK_HOST_INDEX))
631
632 #define GET_IOC_INDEX_0100(x) (((x) & TARGET_MODE_REPLY_0100_MASK_IOC_INDEX) \
633 >> TARGET_MODE_REPLY_0100_SHIFT_IOC_INDEX)
634
635 #define SET_IOC_INDEX_0100(t, ii) \
636 ((t) = ((t) & ~TARGET_MODE_REPLY_0100_MASK_IOC_INDEX) | \
637 (((ii) << TARGET_MODE_REPLY_0100_SHIFT_IOC_INDEX) & \
638 TARGET_MODE_REPLY_0100_MASK_IOC_INDEX))
639
640 #define GET_INITIATOR_INDEX_0100(x) \
641 (((x) & TARGET_MODE_REPLY_0100_MASK_INITIATOR_INDEX) \
642 >> TARGET_MODE_REPLY_0100_SHIFT_INITIATOR_INDEX)
643
644 #define SET_INITIATOR_INDEX_0100(t, ii) \
645 ((t) = ((t) & ~TARGET_MODE_REPLY_0100_MASK_INITIATOR_INDEX) | \
646 (((ii) << TARGET_MODE_REPLY_0100_SHIFT_INITIATOR_INDEX) & \
647 TARGET_MODE_REPLY_0100_MASK_INITIATOR_INDEX))
648
649
650 #endif
651