1 /* 57xx_iscsi_hsi.h: QLogic NetXtreme II iSCSI HSI.
3 * Copyright (c) 2006 - 2013 Broadcom Corporation
4 * Copyright (c) 2014, QLogic Corporation
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation.
10 * Written by: Anil Veerabhadrappa (anilgv@broadcom.com)
11 * Previously Maintained by: Eddie Wai (eddie.wai@broadcom.com)
12 * Maintained by: QLogic-Storage-Upstream@qlogic.com
14 #ifndef __57XX_ISCSI_HSI_LINUX_LE__
15 #define __57XX_ISCSI_HSI_LINUX_LE__
20 struct bnx2i_async_msg
{
21 #if defined(__BIG_ENDIAN)
25 #elif defined(__LITTLE_ENDIAN)
34 #if defined(__BIG_ENDIAN)
38 #elif defined(__LITTLE_ENDIAN)
45 #if defined(__BIG_ENDIAN)
49 #elif defined(__LITTLE_ENDIAN)
54 #if defined(__BIG_ENDIAN)
57 #elif defined(__LITTLE_ENDIAN)
67 * iSCSI Buffer Descriptor (BD)
72 #if defined(__BIG_ENDIAN)
75 #elif defined(__LITTLE_ENDIAN)
79 #if defined(__BIG_ENDIAN)
82 #define ISCSI_BD_RESERVED1 (0x3F<<0)
83 #define ISCSI_BD_RESERVED1_SHIFT 0
84 #define ISCSI_BD_LAST_IN_BD_CHAIN (0x1<<6)
85 #define ISCSI_BD_LAST_IN_BD_CHAIN_SHIFT 6
86 #define ISCSI_BD_FIRST_IN_BD_CHAIN (0x1<<7)
87 #define ISCSI_BD_FIRST_IN_BD_CHAIN_SHIFT 7
88 #define ISCSI_BD_RESERVED2 (0xFF<<8)
89 #define ISCSI_BD_RESERVED2_SHIFT 8
90 #elif defined(__LITTLE_ENDIAN)
92 #define ISCSI_BD_RESERVED1 (0x3F<<0)
93 #define ISCSI_BD_RESERVED1_SHIFT 0
94 #define ISCSI_BD_LAST_IN_BD_CHAIN (0x1<<6)
95 #define ISCSI_BD_LAST_IN_BD_CHAIN_SHIFT 6
96 #define ISCSI_BD_FIRST_IN_BD_CHAIN (0x1<<7)
97 #define ISCSI_BD_FIRST_IN_BD_CHAIN_SHIFT 7
98 #define ISCSI_BD_RESERVED2 (0xFF<<8)
99 #define ISCSI_BD_RESERVED2_SHIFT 8
106 * iSCSI Cleanup SQ WQE
108 struct bnx2i_cleanup_request
{
109 #if defined(__BIG_ENDIAN)
113 #elif defined(__LITTLE_ENDIAN)
119 #if defined(__BIG_ENDIAN)
122 #define ISCSI_CLEANUP_REQUEST_INDEX (0x3FFF<<0)
123 #define ISCSI_CLEANUP_REQUEST_INDEX_SHIFT 0
124 #define ISCSI_CLEANUP_REQUEST_TYPE (0x3<<14)
125 #define ISCSI_CLEANUP_REQUEST_TYPE_SHIFT 14
126 #elif defined(__LITTLE_ENDIAN)
128 #define ISCSI_CLEANUP_REQUEST_INDEX (0x3FFF<<0)
129 #define ISCSI_CLEANUP_REQUEST_INDEX_SHIFT 0
130 #define ISCSI_CLEANUP_REQUEST_TYPE (0x3<<14)
131 #define ISCSI_CLEANUP_REQUEST_TYPE_SHIFT 14
135 #if defined(__BIG_ENDIAN)
139 #elif defined(__LITTLE_ENDIAN)
150 struct bnx2i_cleanup_response
{
151 #if defined(__BIG_ENDIAN)
155 #elif defined(__LITTLE_ENDIAN)
162 #if defined(__BIG_ENDIAN)
166 #elif defined(__LITTLE_ENDIAN)
172 #if defined(__BIG_ENDIAN)
175 #define ISCSI_CLEANUP_RESPONSE_INDEX (0x3FFF<<0)
176 #define ISCSI_CLEANUP_RESPONSE_INDEX_SHIFT 0
177 #define ISCSI_CLEANUP_RESPONSE_TYPE (0x3<<14)
178 #define ISCSI_CLEANUP_RESPONSE_TYPE_SHIFT 14
179 #elif defined(__LITTLE_ENDIAN)
181 #define ISCSI_CLEANUP_RESPONSE_INDEX (0x3FFF<<0)
182 #define ISCSI_CLEANUP_RESPONSE_INDEX_SHIFT 0
183 #define ISCSI_CLEANUP_RESPONSE_TYPE (0x3<<14)
184 #define ISCSI_CLEANUP_RESPONSE_TYPE_SHIFT 14
192 * SCSI read/write SQ WQE
194 struct bnx2i_cmd_request
{
195 #if defined(__BIG_ENDIAN)
198 #define ISCSI_CMD_REQUEST_TASK_ATTR (0x7<<0)
199 #define ISCSI_CMD_REQUEST_TASK_ATTR_SHIFT 0
200 #define ISCSI_CMD_REQUEST_RESERVED1 (0x3<<3)
201 #define ISCSI_CMD_REQUEST_RESERVED1_SHIFT 3
202 #define ISCSI_CMD_REQUEST_WRITE (0x1<<5)
203 #define ISCSI_CMD_REQUEST_WRITE_SHIFT 5
204 #define ISCSI_CMD_REQUEST_READ (0x1<<6)
205 #define ISCSI_CMD_REQUEST_READ_SHIFT 6
206 #define ISCSI_CMD_REQUEST_FINAL (0x1<<7)
207 #define ISCSI_CMD_REQUEST_FINAL_SHIFT 7
209 #elif defined(__LITTLE_ENDIAN)
212 #define ISCSI_CMD_REQUEST_TASK_ATTR (0x7<<0)
213 #define ISCSI_CMD_REQUEST_TASK_ATTR_SHIFT 0
214 #define ISCSI_CMD_REQUEST_RESERVED1 (0x3<<3)
215 #define ISCSI_CMD_REQUEST_RESERVED1_SHIFT 3
216 #define ISCSI_CMD_REQUEST_WRITE (0x1<<5)
217 #define ISCSI_CMD_REQUEST_WRITE_SHIFT 5
218 #define ISCSI_CMD_REQUEST_READ (0x1<<6)
219 #define ISCSI_CMD_REQUEST_READ_SHIFT 6
220 #define ISCSI_CMD_REQUEST_FINAL (0x1<<7)
221 #define ISCSI_CMD_REQUEST_FINAL_SHIFT 7
224 #if defined(__BIG_ENDIAN)
225 u16 ud_buffer_offset
;
226 u16 sd_buffer_offset
;
227 #elif defined(__LITTLE_ENDIAN)
228 u16 sd_buffer_offset
;
229 u16 ud_buffer_offset
;
232 #if defined(__BIG_ENDIAN)
235 #define ISCSI_CMD_REQUEST_INDEX (0x3FFF<<0)
236 #define ISCSI_CMD_REQUEST_INDEX_SHIFT 0
237 #define ISCSI_CMD_REQUEST_TYPE (0x3<<14)
238 #define ISCSI_CMD_REQUEST_TYPE_SHIFT 14
239 #elif defined(__LITTLE_ENDIAN)
241 #define ISCSI_CMD_REQUEST_INDEX (0x3FFF<<0)
242 #define ISCSI_CMD_REQUEST_INDEX_SHIFT 0
243 #define ISCSI_CMD_REQUEST_TYPE (0x3<<14)
244 #define ISCSI_CMD_REQUEST_TYPE_SHIFT 14
247 u32 total_data_transfer_length
;
254 #if defined(__BIG_ENDIAN)
256 u8 sd_start_bd_index
;
257 u8 ud_start_bd_index
;
259 #elif defined(__LITTLE_ENDIAN)
261 u8 ud_start_bd_index
;
262 u8 sd_start_bd_index
;
269 * task statistics for write response
271 struct bnx2i_write_resp_task_stat
{
272 #if defined(__BIG_ENDIAN)
275 #elif defined(__LITTLE_ENDIAN)
282 * task statistics for read response
284 struct bnx2i_read_resp_task_stat
{
285 #if defined(__BIG_ENDIAN)
288 #elif defined(__LITTLE_ENDIAN)
295 * task statistics for iSCSI cmd response
297 union bnx2i_cmd_resp_task_stat
{
298 struct bnx2i_write_resp_task_stat write_stat
;
299 struct bnx2i_read_resp_task_stat read_stat
;
305 struct bnx2i_cmd_response
{
306 #if defined(__BIG_ENDIAN)
309 #define ISCSI_CMD_RESPONSE_RESERVED0 (0x1<<0)
310 #define ISCSI_CMD_RESPONSE_RESERVED0_SHIFT 0
311 #define ISCSI_CMD_RESPONSE_RESIDUAL_UNDERFLOW (0x1<<1)
312 #define ISCSI_CMD_RESPONSE_RESIDUAL_UNDERFLOW_SHIFT 1
313 #define ISCSI_CMD_RESPONSE_RESIDUAL_OVERFLOW (0x1<<2)
314 #define ISCSI_CMD_RESPONSE_RESIDUAL_OVERFLOW_SHIFT 2
315 #define ISCSI_CMD_RESPONSE_BR_RESIDUAL_UNDERFLOW (0x1<<3)
316 #define ISCSI_CMD_RESPONSE_BR_RESIDUAL_UNDERFLOW_SHIFT 3
317 #define ISCSI_CMD_RESPONSE_BR_RESIDUAL_OVERFLOW (0x1<<4)
318 #define ISCSI_CMD_RESPONSE_BR_RESIDUAL_OVERFLOW_SHIFT 4
319 #define ISCSI_CMD_RESPONSE_RESERVED1 (0x7<<5)
320 #define ISCSI_CMD_RESPONSE_RESERVED1_SHIFT 5
323 #elif defined(__LITTLE_ENDIAN)
327 #define ISCSI_CMD_RESPONSE_RESERVED0 (0x1<<0)
328 #define ISCSI_CMD_RESPONSE_RESERVED0_SHIFT 0
329 #define ISCSI_CMD_RESPONSE_RESIDUAL_UNDERFLOW (0x1<<1)
330 #define ISCSI_CMD_RESPONSE_RESIDUAL_UNDERFLOW_SHIFT 1
331 #define ISCSI_CMD_RESPONSE_RESIDUAL_OVERFLOW (0x1<<2)
332 #define ISCSI_CMD_RESPONSE_RESIDUAL_OVERFLOW_SHIFT 2
333 #define ISCSI_CMD_RESPONSE_BR_RESIDUAL_UNDERFLOW (0x1<<3)
334 #define ISCSI_CMD_RESPONSE_BR_RESIDUAL_UNDERFLOW_SHIFT 3
335 #define ISCSI_CMD_RESPONSE_BR_RESIDUAL_OVERFLOW (0x1<<4)
336 #define ISCSI_CMD_RESPONSE_BR_RESIDUAL_OVERFLOW_SHIFT 4
337 #define ISCSI_CMD_RESPONSE_RESERVED1 (0x7<<5)
338 #define ISCSI_CMD_RESPONSE_RESERVED1_SHIFT 5
346 #if defined(__BIG_ENDIAN)
350 #elif defined(__LITTLE_ENDIAN)
356 union bnx2i_cmd_resp_task_stat task_stat
;
358 #if defined(__BIG_ENDIAN)
361 #define ISCSI_CMD_RESPONSE_INDEX (0x3FFF<<0)
362 #define ISCSI_CMD_RESPONSE_INDEX_SHIFT 0
363 #define ISCSI_CMD_RESPONSE_TYPE (0x3<<14)
364 #define ISCSI_CMD_RESPONSE_TYPE_SHIFT 14
365 #elif defined(__LITTLE_ENDIAN)
367 #define ISCSI_CMD_RESPONSE_INDEX (0x3FFF<<0)
368 #define ISCSI_CMD_RESPONSE_INDEX_SHIFT 0
369 #define ISCSI_CMD_RESPONSE_TYPE (0x3<<14)
370 #define ISCSI_CMD_RESPONSE_TYPE_SHIFT 14
379 * firmware middle-path request SQ WQE
381 struct bnx2i_fw_mp_request
{
382 #if defined(__BIG_ENDIAN)
386 #elif defined(__LITTLE_ENDIAN)
393 #if defined(__BIG_ENDIAN)
396 #define ISCSI_FW_MP_REQUEST_INDEX (0x3FFF<<0)
397 #define ISCSI_FW_MP_REQUEST_INDEX_SHIFT 0
398 #define ISCSI_FW_MP_REQUEST_TYPE (0x3<<14)
399 #define ISCSI_FW_MP_REQUEST_TYPE_SHIFT 14
400 #elif defined(__LITTLE_ENDIAN)
402 #define ISCSI_FW_MP_REQUEST_INDEX (0x3FFF<<0)
403 #define ISCSI_FW_MP_REQUEST_INDEX_SHIFT 0
404 #define ISCSI_FW_MP_REQUEST_TYPE (0x3<<14)
405 #define ISCSI_FW_MP_REQUEST_TYPE_SHIFT 14
409 u32 resp_bd_list_addr_lo
;
410 u32 resp_bd_list_addr_hi
;
412 #define ISCSI_FW_MP_REQUEST_RESP_BUFFER_LENGTH (0xFFFFFF<<0)
413 #define ISCSI_FW_MP_REQUEST_RESP_BUFFER_LENGTH_SHIFT 0
414 #define ISCSI_FW_MP_REQUEST_NUM_RESP_BDS (0xFF<<24)
415 #define ISCSI_FW_MP_REQUEST_NUM_RESP_BDS_SHIFT 24
416 #if defined(__BIG_ENDIAN)
420 #define ISCSI_FW_MP_REQUEST_RESERVED1 (0x1<<0)
421 #define ISCSI_FW_MP_REQUEST_RESERVED1_SHIFT 0
422 #define ISCSI_FW_MP_REQUEST_LOCAL_COMPLETION (0x1<<1)
423 #define ISCSI_FW_MP_REQUEST_LOCAL_COMPLETION_SHIFT 1
424 #define ISCSI_FW_MP_REQUEST_UPDATE_EXP_STAT_SN (0x1<<2)
425 #define ISCSI_FW_MP_REQUEST_UPDATE_EXP_STAT_SN_SHIFT 2
426 #define ISCSI_FW_MP_REQUEST_RESERVED2 (0x1F<<3)
427 #define ISCSI_FW_MP_REQUEST_RESERVED2_SHIFT 3
428 #elif defined(__LITTLE_ENDIAN)
430 #define ISCSI_FW_MP_REQUEST_RESERVED1 (0x1<<0)
431 #define ISCSI_FW_MP_REQUEST_RESERVED1_SHIFT 0
432 #define ISCSI_FW_MP_REQUEST_LOCAL_COMPLETION (0x1<<1)
433 #define ISCSI_FW_MP_REQUEST_LOCAL_COMPLETION_SHIFT 1
434 #define ISCSI_FW_MP_REQUEST_UPDATE_EXP_STAT_SN (0x1<<2)
435 #define ISCSI_FW_MP_REQUEST_UPDATE_EXP_STAT_SN_SHIFT 2
436 #define ISCSI_FW_MP_REQUEST_RESERVED2 (0x1F<<3)
437 #define ISCSI_FW_MP_REQUEST_RESERVED2_SHIFT 3
443 #if defined(__BIG_ENDIAN)
448 #elif defined(__LITTLE_ENDIAN)
458 * firmware response - CQE: used only by firmware
460 struct bnx2i_fw_response
{
467 #define ISCSI_FW_RESPONSE_RESERVED2 (0xFF<<0)
468 #define ISCSI_FW_RESPONSE_RESERVED2_SHIFT 0
469 #define ISCSI_FW_RESPONSE_ERR_CODE (0xFF<<8)
470 #define ISCSI_FW_RESPONSE_ERR_CODE_SHIFT 8
471 #define ISCSI_FW_RESPONSE_RESERVED3 (0xFFFF<<16)
472 #define ISCSI_FW_RESPONSE_RESERVED3_SHIFT 16
484 * iSCSI KCQ CQE parameters
486 union iscsi_kcqe_params
{
495 u32 completion_status
;
496 u32 iscsi_conn_context_id
;
497 union iscsi_kcqe_params params
;
498 #if defined(__BIG_ENDIAN)
500 #define ISCSI_KCQE_RESERVED0 (0xF<<0)
501 #define ISCSI_KCQE_RESERVED0_SHIFT 0
502 #define ISCSI_KCQE_LAYER_CODE (0x7<<4)
503 #define ISCSI_KCQE_LAYER_CODE_SHIFT 4
504 #define ISCSI_KCQE_RESERVED1 (0x1<<7)
505 #define ISCSI_KCQE_RESERVED1_SHIFT 7
508 #elif defined(__LITTLE_ENDIAN)
512 #define ISCSI_KCQE_RESERVED0 (0xF<<0)
513 #define ISCSI_KCQE_RESERVED0_SHIFT 0
514 #define ISCSI_KCQE_LAYER_CODE (0x7<<4)
515 #define ISCSI_KCQE_LAYER_CODE_SHIFT 4
516 #define ISCSI_KCQE_RESERVED1 (0x1<<7)
517 #define ISCSI_KCQE_RESERVED1_SHIFT 7
526 struct iscsi_kwqe_header
{
527 #if defined(__BIG_ENDIAN)
529 #define ISCSI_KWQE_HEADER_RESERVED0 (0xF<<0)
530 #define ISCSI_KWQE_HEADER_RESERVED0_SHIFT 0
531 #define ISCSI_KWQE_HEADER_LAYER_CODE (0x7<<4)
532 #define ISCSI_KWQE_HEADER_LAYER_CODE_SHIFT 4
533 #define ISCSI_KWQE_HEADER_RESERVED1 (0x1<<7)
534 #define ISCSI_KWQE_HEADER_RESERVED1_SHIFT 7
536 #elif defined(__LITTLE_ENDIAN)
539 #define ISCSI_KWQE_HEADER_RESERVED0 (0xF<<0)
540 #define ISCSI_KWQE_HEADER_RESERVED0_SHIFT 0
541 #define ISCSI_KWQE_HEADER_LAYER_CODE (0x7<<4)
542 #define ISCSI_KWQE_HEADER_LAYER_CODE_SHIFT 4
543 #define ISCSI_KWQE_HEADER_RESERVED1 (0x1<<7)
544 #define ISCSI_KWQE_HEADER_RESERVED1_SHIFT 7
549 * iSCSI firmware init request 1
551 struct iscsi_kwqe_init1
{
552 #if defined(__BIG_ENDIAN)
553 struct iscsi_kwqe_header hdr
;
556 #elif defined(__LITTLE_ENDIAN)
559 struct iscsi_kwqe_header hdr
;
561 u32 dummy_buffer_addr_lo
;
562 u32 dummy_buffer_addr_hi
;
563 #if defined(__BIG_ENDIAN)
564 u16 num_ccells_per_conn
;
565 u16 num_tasks_per_conn
;
566 #elif defined(__LITTLE_ENDIAN)
567 u16 num_tasks_per_conn
;
568 u16 num_ccells_per_conn
;
570 #if defined(__BIG_ENDIAN)
571 u16 sq_wqes_per_page
;
573 #elif defined(__LITTLE_ENDIAN)
575 u16 sq_wqes_per_page
;
577 #if defined(__BIG_ENDIAN)
578 u8 cq_log_wqes_per_page
;
580 #define ISCSI_KWQE_INIT1_PAGE_SIZE (0xF<<0)
581 #define ISCSI_KWQE_INIT1_PAGE_SIZE_SHIFT 0
582 #define ISCSI_KWQE_INIT1_DELAYED_ACK_ENABLE (0x1<<4)
583 #define ISCSI_KWQE_INIT1_DELAYED_ACK_ENABLE_SHIFT 4
584 #define ISCSI_KWQE_INIT1_KEEP_ALIVE_ENABLE (0x1<<5)
585 #define ISCSI_KWQE_INIT1_KEEP_ALIVE_ENABLE_SHIFT 5
586 #define ISCSI_KWQE_INIT1_TIME_STAMPS_ENABLE (0x1<<6)
587 #define ISCSI_KWQE_INIT1_TIME_STAMPS_ENABLE_SHIFT 6
588 #define ISCSI_KWQE_INIT1_RESERVED1 (0x1<<7)
589 #define ISCSI_KWQE_INIT1_RESERVED1_SHIFT 7
591 #elif defined(__LITTLE_ENDIAN)
594 #define ISCSI_KWQE_INIT1_PAGE_SIZE (0xF<<0)
595 #define ISCSI_KWQE_INIT1_PAGE_SIZE_SHIFT 0
596 #define ISCSI_KWQE_INIT1_DELAYED_ACK_ENABLE (0x1<<4)
597 #define ISCSI_KWQE_INIT1_DELAYED_ACK_ENABLE_SHIFT 4
598 #define ISCSI_KWQE_INIT1_KEEP_ALIVE_ENABLE (0x1<<5)
599 #define ISCSI_KWQE_INIT1_KEEP_ALIVE_ENABLE_SHIFT 5
600 #define ISCSI_KWQE_INIT1_TIME_STAMPS_ENABLE (0x1<<6)
601 #define ISCSI_KWQE_INIT1_TIME_STAMPS_ENABLE_SHIFT 6
602 #define ISCSI_KWQE_INIT1_RESERVED1 (0x1<<7)
603 #define ISCSI_KWQE_INIT1_RESERVED1_SHIFT 7
604 u8 cq_log_wqes_per_page
;
606 #if defined(__BIG_ENDIAN)
609 #elif defined(__LITTLE_ENDIAN)
613 #if defined(__BIG_ENDIAN)
616 #elif defined(__LITTLE_ENDIAN)
623 * iSCSI firmware init request 2
625 struct iscsi_kwqe_init2
{
626 #if defined(__BIG_ENDIAN)
627 struct iscsi_kwqe_header hdr
;
629 #elif defined(__LITTLE_ENDIAN)
631 struct iscsi_kwqe_header hdr
;
633 u32 error_bit_map
[2];
638 * Initial iSCSI connection offload request 1
640 struct iscsi_kwqe_conn_offload1
{
641 #if defined(__BIG_ENDIAN)
642 struct iscsi_kwqe_header hdr
;
644 #elif defined(__LITTLE_ENDIAN)
646 struct iscsi_kwqe_header hdr
;
648 u32 sq_page_table_addr_lo
;
649 u32 sq_page_table_addr_hi
;
650 u32 cq_page_table_addr_lo
;
651 u32 cq_page_table_addr_hi
;
656 * iSCSI Page Table Entry (PTE)
664 * Initial iSCSI connection offload request 2
666 struct iscsi_kwqe_conn_offload2
{
667 #if defined(__BIG_ENDIAN)
668 struct iscsi_kwqe_header hdr
;
670 #elif defined(__LITTLE_ENDIAN)
672 struct iscsi_kwqe_header hdr
;
674 u32 rq_page_table_addr_lo
;
675 u32 rq_page_table_addr_hi
;
676 struct iscsi_pte sq_first_pte
;
677 struct iscsi_pte cq_first_pte
;
678 u32 num_additional_wqes
;
683 * Initial iSCSI connection offload request 3
685 struct iscsi_kwqe_conn_offload3
{
686 #if defined(__BIG_ENDIAN)
687 struct iscsi_kwqe_header hdr
;
689 #elif defined(__LITTLE_ENDIAN)
691 struct iscsi_kwqe_header hdr
;
694 struct iscsi_pte qp_first_pte
[3];
699 * iSCSI connection update request
701 struct iscsi_kwqe_conn_update
{
702 #if defined(__BIG_ENDIAN)
703 struct iscsi_kwqe_header hdr
;
705 #elif defined(__LITTLE_ENDIAN)
707 struct iscsi_kwqe_header hdr
;
709 #if defined(__BIG_ENDIAN)
710 u8 session_error_recovery_level
;
711 u8 max_outstanding_r2ts
;
714 #define ISCSI_KWQE_CONN_UPDATE_HEADER_DIGEST (0x1<<0)
715 #define ISCSI_KWQE_CONN_UPDATE_HEADER_DIGEST_SHIFT 0
716 #define ISCSI_KWQE_CONN_UPDATE_DATA_DIGEST (0x1<<1)
717 #define ISCSI_KWQE_CONN_UPDATE_DATA_DIGEST_SHIFT 1
718 #define ISCSI_KWQE_CONN_UPDATE_INITIAL_R2T (0x1<<2)
719 #define ISCSI_KWQE_CONN_UPDATE_INITIAL_R2T_SHIFT 2
720 #define ISCSI_KWQE_CONN_UPDATE_IMMEDIATE_DATA (0x1<<3)
721 #define ISCSI_KWQE_CONN_UPDATE_IMMEDIATE_DATA_SHIFT 3
722 #define ISCSI_KWQE_CONN_UPDATE_OOO_SUPPORT_MODE (0x3<<4)
723 #define ISCSI_KWQE_CONN_UPDATE_OOO_SUPPORT_MODE_SHIFT 4
724 #define ISCSI_KWQE_CONN_UPDATE_RESERVED1 (0x3<<6)
725 #define ISCSI_KWQE_CONN_UPDATE_RESERVED1_SHIFT 6
726 #elif defined(__LITTLE_ENDIAN)
728 #define ISCSI_KWQE_CONN_UPDATE_HEADER_DIGEST (0x1<<0)
729 #define ISCSI_KWQE_CONN_UPDATE_HEADER_DIGEST_SHIFT 0
730 #define ISCSI_KWQE_CONN_UPDATE_DATA_DIGEST (0x1<<1)
731 #define ISCSI_KWQE_CONN_UPDATE_DATA_DIGEST_SHIFT 1
732 #define ISCSI_KWQE_CONN_UPDATE_INITIAL_R2T (0x1<<2)
733 #define ISCSI_KWQE_CONN_UPDATE_INITIAL_R2T_SHIFT 2
734 #define ISCSI_KWQE_CONN_UPDATE_IMMEDIATE_DATA (0x1<<3)
735 #define ISCSI_KWQE_CONN_UPDATE_IMMEDIATE_DATA_SHIFT 3
736 #define ISCSI_KWQE_CONN_UPDATE_OOO_SUPPORT_MODE (0x3<<4)
737 #define ISCSI_KWQE_CONN_UPDATE_OOO_SUPPORT_MODE_SHIFT 4
738 #define ISCSI_KWQE_CONN_UPDATE_RESERVED1 (0x3<<6)
739 #define ISCSI_KWQE_CONN_UPDATE_RESERVED1_SHIFT 6
741 u8 max_outstanding_r2ts
;
742 u8 session_error_recovery_level
;
745 u32 max_send_pdu_length
;
746 u32 max_recv_pdu_length
;
747 u32 first_burst_length
;
748 u32 max_burst_length
;
753 * iSCSI destroy connection request
755 struct iscsi_kwqe_conn_destroy
{
756 #if defined(__BIG_ENDIAN)
757 struct iscsi_kwqe_header hdr
;
759 #elif defined(__LITTLE_ENDIAN)
761 struct iscsi_kwqe_header hdr
;
771 struct iscsi_kwqe_init1 init1
;
772 struct iscsi_kwqe_init2 init2
;
773 struct iscsi_kwqe_conn_offload1 conn_offload1
;
774 struct iscsi_kwqe_conn_offload2 conn_offload2
;
775 struct iscsi_kwqe_conn_update conn_update
;
776 struct iscsi_kwqe_conn_destroy conn_destroy
;
782 struct bnx2i_login_request
{
783 #if defined(__BIG_ENDIAN)
786 #define ISCSI_LOGIN_REQUEST_NEXT_STAGE (0x3<<0)
787 #define ISCSI_LOGIN_REQUEST_NEXT_STAGE_SHIFT 0
788 #define ISCSI_LOGIN_REQUEST_CURRENT_STAGE (0x3<<2)
789 #define ISCSI_LOGIN_REQUEST_CURRENT_STAGE_SHIFT 2
790 #define ISCSI_LOGIN_REQUEST_RESERVED0 (0x3<<4)
791 #define ISCSI_LOGIN_REQUEST_RESERVED0_SHIFT 4
792 #define ISCSI_LOGIN_REQUEST_CONT (0x1<<6)
793 #define ISCSI_LOGIN_REQUEST_CONT_SHIFT 6
794 #define ISCSI_LOGIN_REQUEST_TRANSIT (0x1<<7)
795 #define ISCSI_LOGIN_REQUEST_TRANSIT_SHIFT 7
798 #elif defined(__LITTLE_ENDIAN)
802 #define ISCSI_LOGIN_REQUEST_NEXT_STAGE (0x3<<0)
803 #define ISCSI_LOGIN_REQUEST_NEXT_STAGE_SHIFT 0
804 #define ISCSI_LOGIN_REQUEST_CURRENT_STAGE (0x3<<2)
805 #define ISCSI_LOGIN_REQUEST_CURRENT_STAGE_SHIFT 2
806 #define ISCSI_LOGIN_REQUEST_RESERVED0 (0x3<<4)
807 #define ISCSI_LOGIN_REQUEST_RESERVED0_SHIFT 4
808 #define ISCSI_LOGIN_REQUEST_CONT (0x1<<6)
809 #define ISCSI_LOGIN_REQUEST_CONT_SHIFT 6
810 #define ISCSI_LOGIN_REQUEST_TRANSIT (0x1<<7)
811 #define ISCSI_LOGIN_REQUEST_TRANSIT_SHIFT 7
816 #if defined(__BIG_ENDIAN)
819 #elif defined(__LITTLE_ENDIAN)
823 #if defined(__BIG_ENDIAN)
826 #define ISCSI_LOGIN_REQUEST_INDEX (0x3FFF<<0)
827 #define ISCSI_LOGIN_REQUEST_INDEX_SHIFT 0
828 #define ISCSI_LOGIN_REQUEST_TYPE (0x3<<14)
829 #define ISCSI_LOGIN_REQUEST_TYPE_SHIFT 14
830 #elif defined(__LITTLE_ENDIAN)
832 #define ISCSI_LOGIN_REQUEST_INDEX (0x3FFF<<0)
833 #define ISCSI_LOGIN_REQUEST_INDEX_SHIFT 0
834 #define ISCSI_LOGIN_REQUEST_TYPE (0x3<<14)
835 #define ISCSI_LOGIN_REQUEST_TYPE_SHIFT 14
838 #if defined(__BIG_ENDIAN)
841 #elif defined(__LITTLE_ENDIAN)
848 u32 resp_bd_list_addr_lo
;
849 u32 resp_bd_list_addr_hi
;
851 #define ISCSI_LOGIN_REQUEST_RESP_BUFFER_LENGTH (0xFFFFFF<<0)
852 #define ISCSI_LOGIN_REQUEST_RESP_BUFFER_LENGTH_SHIFT 0
853 #define ISCSI_LOGIN_REQUEST_NUM_RESP_BDS (0xFF<<24)
854 #define ISCSI_LOGIN_REQUEST_NUM_RESP_BDS_SHIFT 24
855 #if defined(__BIG_ENDIAN)
859 #define ISCSI_LOGIN_REQUEST_RESERVED5 (0x3<<0)
860 #define ISCSI_LOGIN_REQUEST_RESERVED5_SHIFT 0
861 #define ISCSI_LOGIN_REQUEST_UPDATE_EXP_STAT_SN (0x1<<2)
862 #define ISCSI_LOGIN_REQUEST_UPDATE_EXP_STAT_SN_SHIFT 2
863 #define ISCSI_LOGIN_REQUEST_RESERVED6 (0x1F<<3)
864 #define ISCSI_LOGIN_REQUEST_RESERVED6_SHIFT 3
865 #elif defined(__LITTLE_ENDIAN)
867 #define ISCSI_LOGIN_REQUEST_RESERVED5 (0x3<<0)
868 #define ISCSI_LOGIN_REQUEST_RESERVED5_SHIFT 0
869 #define ISCSI_LOGIN_REQUEST_UPDATE_EXP_STAT_SN (0x1<<2)
870 #define ISCSI_LOGIN_REQUEST_UPDATE_EXP_STAT_SN_SHIFT 2
871 #define ISCSI_LOGIN_REQUEST_RESERVED6 (0x1F<<3)
872 #define ISCSI_LOGIN_REQUEST_RESERVED6_SHIFT 3
878 #if defined(__BIG_ENDIAN)
883 #elif defined(__LITTLE_ENDIAN)
895 struct bnx2i_login_response
{
896 #if defined(__BIG_ENDIAN)
899 #define ISCSI_LOGIN_RESPONSE_NEXT_STAGE (0x3<<0)
900 #define ISCSI_LOGIN_RESPONSE_NEXT_STAGE_SHIFT 0
901 #define ISCSI_LOGIN_RESPONSE_CURRENT_STAGE (0x3<<2)
902 #define ISCSI_LOGIN_RESPONSE_CURRENT_STAGE_SHIFT 2
903 #define ISCSI_LOGIN_RESPONSE_RESERVED0 (0x3<<4)
904 #define ISCSI_LOGIN_RESPONSE_RESERVED0_SHIFT 4
905 #define ISCSI_LOGIN_RESPONSE_CONT (0x1<<6)
906 #define ISCSI_LOGIN_RESPONSE_CONT_SHIFT 6
907 #define ISCSI_LOGIN_RESPONSE_TRANSIT (0x1<<7)
908 #define ISCSI_LOGIN_RESPONSE_TRANSIT_SHIFT 7
911 #elif defined(__LITTLE_ENDIAN)
915 #define ISCSI_LOGIN_RESPONSE_NEXT_STAGE (0x3<<0)
916 #define ISCSI_LOGIN_RESPONSE_NEXT_STAGE_SHIFT 0
917 #define ISCSI_LOGIN_RESPONSE_CURRENT_STAGE (0x3<<2)
918 #define ISCSI_LOGIN_RESPONSE_CURRENT_STAGE_SHIFT 2
919 #define ISCSI_LOGIN_RESPONSE_RESERVED0 (0x3<<4)
920 #define ISCSI_LOGIN_RESPONSE_RESERVED0_SHIFT 4
921 #define ISCSI_LOGIN_RESPONSE_CONT (0x1<<6)
922 #define ISCSI_LOGIN_RESPONSE_CONT_SHIFT 6
923 #define ISCSI_LOGIN_RESPONSE_TRANSIT (0x1<<7)
924 #define ISCSI_LOGIN_RESPONSE_TRANSIT_SHIFT 7
931 #if defined(__BIG_ENDIAN)
935 #elif defined(__LITTLE_ENDIAN)
942 #if defined(__BIG_ENDIAN)
945 #elif defined(__LITTLE_ENDIAN)
949 #if defined(__BIG_ENDIAN)
953 #elif defined(__LITTLE_ENDIAN)
959 #if defined(__BIG_ENDIAN)
962 #define ISCSI_LOGIN_RESPONSE_INDEX (0x3FFF<<0)
963 #define ISCSI_LOGIN_RESPONSE_INDEX_SHIFT 0
964 #define ISCSI_LOGIN_RESPONSE_TYPE (0x3<<14)
965 #define ISCSI_LOGIN_RESPONSE_TYPE_SHIFT 14
966 #elif defined(__LITTLE_ENDIAN)
968 #define ISCSI_LOGIN_RESPONSE_INDEX (0x3FFF<<0)
969 #define ISCSI_LOGIN_RESPONSE_INDEX_SHIFT 0
970 #define ISCSI_LOGIN_RESPONSE_TYPE (0x3<<14)
971 #define ISCSI_LOGIN_RESPONSE_TYPE_SHIFT 14
979 * iSCSI Logout SQ WQE
981 struct bnx2i_logout_request
{
982 #if defined(__BIG_ENDIAN)
985 #define ISCSI_LOGOUT_REQUEST_REASON (0x7F<<0)
986 #define ISCSI_LOGOUT_REQUEST_REASON_SHIFT 0
987 #define ISCSI_LOGOUT_REQUEST_ALWAYS_ONE (0x1<<7)
988 #define ISCSI_LOGOUT_REQUEST_ALWAYS_ONE_SHIFT 7
990 #elif defined(__LITTLE_ENDIAN)
993 #define ISCSI_LOGOUT_REQUEST_REASON (0x7F<<0)
994 #define ISCSI_LOGOUT_REQUEST_REASON_SHIFT 0
995 #define ISCSI_LOGOUT_REQUEST_ALWAYS_ONE (0x1<<7)
996 #define ISCSI_LOGOUT_REQUEST_ALWAYS_ONE_SHIFT 7
1001 #if defined(__BIG_ENDIAN)
1004 #define ISCSI_LOGOUT_REQUEST_INDEX (0x3FFF<<0)
1005 #define ISCSI_LOGOUT_REQUEST_INDEX_SHIFT 0
1006 #define ISCSI_LOGOUT_REQUEST_TYPE (0x3<<14)
1007 #define ISCSI_LOGOUT_REQUEST_TYPE_SHIFT 14
1008 #elif defined(__LITTLE_ENDIAN)
1010 #define ISCSI_LOGOUT_REQUEST_INDEX (0x3FFF<<0)
1011 #define ISCSI_LOGOUT_REQUEST_INDEX_SHIFT 0
1012 #define ISCSI_LOGOUT_REQUEST_TYPE (0x3<<14)
1013 #define ISCSI_LOGOUT_REQUEST_TYPE_SHIFT 14
1016 #if defined(__BIG_ENDIAN)
1019 #elif defined(__LITTLE_ENDIAN)
1026 u32 bd_list_addr_lo
;
1027 u32 bd_list_addr_hi
;
1028 #if defined(__BIG_ENDIAN)
1033 #elif defined(__LITTLE_ENDIAN)
1045 struct bnx2i_logout_response
{
1046 #if defined(__BIG_ENDIAN)
1051 #elif defined(__LITTLE_ENDIAN)
1061 #if defined(__BIG_ENDIAN)
1065 #elif defined(__LITTLE_ENDIAN)
1071 #if defined(__BIG_ENDIAN)
1074 #elif defined(__LITTLE_ENDIAN)
1079 #if defined(__BIG_ENDIAN)
1082 #define ISCSI_LOGOUT_RESPONSE_INDEX (0x3FFF<<0)
1083 #define ISCSI_LOGOUT_RESPONSE_INDEX_SHIFT 0
1084 #define ISCSI_LOGOUT_RESPONSE_TYPE (0x3<<14)
1085 #define ISCSI_LOGOUT_RESPONSE_TYPE_SHIFT 14
1086 #elif defined(__LITTLE_ENDIAN)
1088 #define ISCSI_LOGOUT_RESPONSE_INDEX (0x3FFF<<0)
1089 #define ISCSI_LOGOUT_RESPONSE_INDEX_SHIFT 0
1090 #define ISCSI_LOGOUT_RESPONSE_TYPE (0x3<<14)
1091 #define ISCSI_LOGOUT_RESPONSE_TYPE_SHIFT 14
1101 struct bnx2i_nop_in_msg
{
1102 #if defined(__BIG_ENDIAN)
1106 #elif defined(__LITTLE_ENDIAN)
1116 #if defined(__BIG_ENDIAN)
1120 #elif defined(__LITTLE_ENDIAN)
1128 #if defined(__BIG_ENDIAN)
1131 #define ISCSI_NOP_IN_MSG_INDEX (0x3FFF<<0)
1132 #define ISCSI_NOP_IN_MSG_INDEX_SHIFT 0
1133 #define ISCSI_NOP_IN_MSG_TYPE (0x3<<14)
1134 #define ISCSI_NOP_IN_MSG_TYPE_SHIFT 14
1135 #elif defined(__LITTLE_ENDIAN)
1137 #define ISCSI_NOP_IN_MSG_INDEX (0x3FFF<<0)
1138 #define ISCSI_NOP_IN_MSG_INDEX_SHIFT 0
1139 #define ISCSI_NOP_IN_MSG_TYPE (0x3<<14)
1140 #define ISCSI_NOP_IN_MSG_TYPE_SHIFT 14
1148 * iSCSI NOP-OUT SQ WQE
1150 struct bnx2i_nop_out_request
{
1151 #if defined(__BIG_ENDIAN)
1154 #define ISCSI_NOP_OUT_REQUEST_RESERVED1 (0x7F<<0)
1155 #define ISCSI_NOP_OUT_REQUEST_RESERVED1_SHIFT 0
1156 #define ISCSI_NOP_OUT_REQUEST_ALWAYS_ONE (0x1<<7)
1157 #define ISCSI_NOP_OUT_REQUEST_ALWAYS_ONE_SHIFT 7
1159 #elif defined(__LITTLE_ENDIAN)
1162 #define ISCSI_NOP_OUT_REQUEST_RESERVED1 (0x7F<<0)
1163 #define ISCSI_NOP_OUT_REQUEST_RESERVED1_SHIFT 0
1164 #define ISCSI_NOP_OUT_REQUEST_ALWAYS_ONE (0x1<<7)
1165 #define ISCSI_NOP_OUT_REQUEST_ALWAYS_ONE_SHIFT 7
1170 #if defined(__BIG_ENDIAN)
1173 #define ISCSI_NOP_OUT_REQUEST_INDEX (0x3FFF<<0)
1174 #define ISCSI_NOP_OUT_REQUEST_INDEX_SHIFT 0
1175 #define ISCSI_NOP_OUT_REQUEST_TYPE (0x3<<14)
1176 #define ISCSI_NOP_OUT_REQUEST_TYPE_SHIFT 14
1177 #elif defined(__LITTLE_ENDIAN)
1179 #define ISCSI_NOP_OUT_REQUEST_INDEX (0x3FFF<<0)
1180 #define ISCSI_NOP_OUT_REQUEST_INDEX_SHIFT 0
1181 #define ISCSI_NOP_OUT_REQUEST_TYPE (0x3<<14)
1182 #define ISCSI_NOP_OUT_REQUEST_TYPE_SHIFT 14
1188 u32 resp_bd_list_addr_lo
;
1189 u32 resp_bd_list_addr_hi
;
1191 #define ISCSI_NOP_OUT_REQUEST_RESP_BUFFER_LENGTH (0xFFFFFF<<0)
1192 #define ISCSI_NOP_OUT_REQUEST_RESP_BUFFER_LENGTH_SHIFT 0
1193 #define ISCSI_NOP_OUT_REQUEST_NUM_RESP_BDS (0xFF<<24)
1194 #define ISCSI_NOP_OUT_REQUEST_NUM_RESP_BDS_SHIFT 24
1195 #if defined(__BIG_ENDIAN)
1199 #define ISCSI_NOP_OUT_REQUEST_RESERVED4 (0x1<<0)
1200 #define ISCSI_NOP_OUT_REQUEST_RESERVED4_SHIFT 0
1201 #define ISCSI_NOP_OUT_REQUEST_LOCAL_COMPLETION (0x1<<1)
1202 #define ISCSI_NOP_OUT_REQUEST_LOCAL_COMPLETION_SHIFT 1
1203 #define ISCSI_NOP_OUT_REQUEST_ZERO_FILL (0x3F<<2)
1204 #define ISCSI_NOP_OUT_REQUEST_ZERO_FILL_SHIFT 2
1205 #elif defined(__LITTLE_ENDIAN)
1207 #define ISCSI_NOP_OUT_REQUEST_RESERVED4 (0x1<<0)
1208 #define ISCSI_NOP_OUT_REQUEST_RESERVED4_SHIFT 0
1209 #define ISCSI_NOP_OUT_REQUEST_LOCAL_COMPLETION (0x1<<1)
1210 #define ISCSI_NOP_OUT_REQUEST_LOCAL_COMPLETION_SHIFT 1
1211 #define ISCSI_NOP_OUT_REQUEST_ZERO_FILL (0x3F<<2)
1212 #define ISCSI_NOP_OUT_REQUEST_ZERO_FILL_SHIFT 2
1216 u32 bd_list_addr_lo
;
1217 u32 bd_list_addr_hi
;
1218 #if defined(__BIG_ENDIAN)
1223 #elif defined(__LITTLE_ENDIAN)
1234 struct bnx2i_reject_msg
{
1235 #if defined(__BIG_ENDIAN)
1240 #elif defined(__LITTLE_ENDIAN)
1250 #if defined(__BIG_ENDIAN)
1254 #elif defined(__LITTLE_ENDIAN)
1264 * bnx2i iSCSI TMF SQ WQE
1266 struct bnx2i_tmf_request
{
1267 #if defined(__BIG_ENDIAN)
1270 #define ISCSI_TMF_REQUEST_FUNCTION (0x7F<<0)
1271 #define ISCSI_TMF_REQUEST_FUNCTION_SHIFT 0
1272 #define ISCSI_TMF_REQUEST_ALWAYS_ONE (0x1<<7)
1273 #define ISCSI_TMF_REQUEST_ALWAYS_ONE_SHIFT 7
1275 #elif defined(__LITTLE_ENDIAN)
1278 #define ISCSI_TMF_REQUEST_FUNCTION (0x7F<<0)
1279 #define ISCSI_TMF_REQUEST_FUNCTION_SHIFT 0
1280 #define ISCSI_TMF_REQUEST_ALWAYS_ONE (0x1<<7)
1281 #define ISCSI_TMF_REQUEST_ALWAYS_ONE_SHIFT 7
1286 #if defined(__BIG_ENDIAN)
1289 #define ISCSI_TMF_REQUEST_INDEX (0x3FFF<<0)
1290 #define ISCSI_TMF_REQUEST_INDEX_SHIFT 0
1291 #define ISCSI_TMF_REQUEST_TYPE (0x3<<14)
1292 #define ISCSI_TMF_REQUEST_TYPE_SHIFT 14
1293 #elif defined(__LITTLE_ENDIAN)
1295 #define ISCSI_TMF_REQUEST_INDEX (0x3FFF<<0)
1296 #define ISCSI_TMF_REQUEST_INDEX_SHIFT 0
1297 #define ISCSI_TMF_REQUEST_TYPE (0x3<<14)
1298 #define ISCSI_TMF_REQUEST_TYPE_SHIFT 14
1307 u32 bd_list_addr_lo
;
1308 u32 bd_list_addr_hi
;
1309 #if defined(__BIG_ENDIAN)
1314 #elif defined(__LITTLE_ENDIAN)
1325 struct bnx2i_text_request
{
1326 #if defined(__BIG_ENDIAN)
1329 #define ISCSI_TEXT_REQUEST_RESERVED1 (0x3F<<0)
1330 #define ISCSI_TEXT_REQUEST_RESERVED1_SHIFT 0
1331 #define ISCSI_TEXT_REQUEST_CONT (0x1<<6)
1332 #define ISCSI_TEXT_REQUEST_CONT_SHIFT 6
1333 #define ISCSI_TEXT_REQUEST_FINAL (0x1<<7)
1334 #define ISCSI_TEXT_REQUEST_FINAL_SHIFT 7
1336 #elif defined(__LITTLE_ENDIAN)
1339 #define ISCSI_TEXT_REQUEST_RESERVED1 (0x3F<<0)
1340 #define ISCSI_TEXT_REQUEST_RESERVED1_SHIFT 0
1341 #define ISCSI_TEXT_REQUEST_CONT (0x1<<6)
1342 #define ISCSI_TEXT_REQUEST_CONT_SHIFT 6
1343 #define ISCSI_TEXT_REQUEST_FINAL (0x1<<7)
1344 #define ISCSI_TEXT_REQUEST_FINAL_SHIFT 7
1349 #if defined(__BIG_ENDIAN)
1352 #define ISCSI_TEXT_REQUEST_INDEX (0x3FFF<<0)
1353 #define ISCSI_TEXT_REQUEST_INDEX_SHIFT 0
1354 #define ISCSI_TEXT_REQUEST_TYPE (0x3<<14)
1355 #define ISCSI_TEXT_REQUEST_TYPE_SHIFT 14
1356 #elif defined(__LITTLE_ENDIAN)
1358 #define ISCSI_TEXT_REQUEST_INDEX (0x3FFF<<0)
1359 #define ISCSI_TEXT_REQUEST_INDEX_SHIFT 0
1360 #define ISCSI_TEXT_REQUEST_TYPE (0x3<<14)
1361 #define ISCSI_TEXT_REQUEST_TYPE_SHIFT 14
1367 u32 resp_bd_list_addr_lo
;
1368 u32 resp_bd_list_addr_hi
;
1370 #define ISCSI_TEXT_REQUEST_RESP_BUFFER_LENGTH (0xFFFFFF<<0)
1371 #define ISCSI_TEXT_REQUEST_RESP_BUFFER_LENGTH_SHIFT 0
1372 #define ISCSI_TEXT_REQUEST_NUM_RESP_BDS (0xFF<<24)
1373 #define ISCSI_TEXT_REQUEST_NUM_RESP_BDS_SHIFT 24
1375 u32 bd_list_addr_lo
;
1376 u32 bd_list_addr_hi
;
1377 #if defined(__BIG_ENDIAN)
1382 #elif defined(__LITTLE_ENDIAN)
1393 union iscsi_request
{
1394 struct bnx2i_cmd_request cmd
;
1395 struct bnx2i_tmf_request tmf
;
1396 struct bnx2i_nop_out_request nop_out
;
1397 struct bnx2i_login_request login_req
;
1398 struct bnx2i_text_request text
;
1399 struct bnx2i_logout_request logout_req
;
1400 struct bnx2i_cleanup_request cleanup
;
1407 struct bnx2i_tmf_response
{
1408 #if defined(__BIG_ENDIAN)
1413 #elif defined(__LITTLE_ENDIAN)
1423 #if defined(__BIG_ENDIAN)
1427 #elif defined(__LITTLE_ENDIAN)
1433 #if defined(__BIG_ENDIAN)
1436 #define ISCSI_TMF_RESPONSE_INDEX (0x3FFF<<0)
1437 #define ISCSI_TMF_RESPONSE_INDEX_SHIFT 0
1438 #define ISCSI_TMF_RESPONSE_TYPE (0x3<<14)
1439 #define ISCSI_TMF_RESPONSE_TYPE_SHIFT 14
1440 #elif defined(__LITTLE_ENDIAN)
1442 #define ISCSI_TMF_RESPONSE_INDEX (0x3FFF<<0)
1443 #define ISCSI_TMF_RESPONSE_INDEX_SHIFT 0
1444 #define ISCSI_TMF_RESPONSE_TYPE (0x3<<14)
1445 #define ISCSI_TMF_RESPONSE_TYPE_SHIFT 14
1454 struct bnx2i_text_response
{
1455 #if defined(__BIG_ENDIAN)
1458 #define ISCSI_TEXT_RESPONSE_RESERVED1 (0x3F<<0)
1459 #define ISCSI_TEXT_RESPONSE_RESERVED1_SHIFT 0
1460 #define ISCSI_TEXT_RESPONSE_CONT (0x1<<6)
1461 #define ISCSI_TEXT_RESPONSE_CONT_SHIFT 6
1462 #define ISCSI_TEXT_RESPONSE_FINAL (0x1<<7)
1463 #define ISCSI_TEXT_RESPONSE_FINAL_SHIFT 7
1465 #elif defined(__LITTLE_ENDIAN)
1468 #define ISCSI_TEXT_RESPONSE_RESERVED1 (0x3F<<0)
1469 #define ISCSI_TEXT_RESPONSE_RESERVED1_SHIFT 0
1470 #define ISCSI_TEXT_RESPONSE_CONT (0x1<<6)
1471 #define ISCSI_TEXT_RESPONSE_CONT_SHIFT 6
1472 #define ISCSI_TEXT_RESPONSE_FINAL (0x1<<7)
1473 #define ISCSI_TEXT_RESPONSE_FINAL_SHIFT 7
1481 #if defined(__BIG_ENDIAN)
1485 #elif defined(__LITTLE_ENDIAN)
1493 #if defined(__BIG_ENDIAN)
1496 #define ISCSI_TEXT_RESPONSE_INDEX (0x3FFF<<0)
1497 #define ISCSI_TEXT_RESPONSE_INDEX_SHIFT 0
1498 #define ISCSI_TEXT_RESPONSE_TYPE (0x3<<14)
1499 #define ISCSI_TEXT_RESPONSE_TYPE_SHIFT 14
1500 #elif defined(__LITTLE_ENDIAN)
1502 #define ISCSI_TEXT_RESPONSE_INDEX (0x3FFF<<0)
1503 #define ISCSI_TEXT_RESPONSE_INDEX_SHIFT 0
1504 #define ISCSI_TEXT_RESPONSE_TYPE (0x3<<14)
1505 #define ISCSI_TEXT_RESPONSE_TYPE_SHIFT 14
1514 union iscsi_response
{
1515 struct bnx2i_cmd_response cmd
;
1516 struct bnx2i_tmf_response tmf
;
1517 struct bnx2i_login_response login_resp
;
1518 struct bnx2i_text_response text
;
1519 struct bnx2i_logout_response logout_resp
;
1520 struct bnx2i_cleanup_response cleanup
;
1521 struct bnx2i_reject_msg reject
;
1522 struct bnx2i_async_msg async
;
1523 struct bnx2i_nop_in_msg nop_in
;
1526 #endif /* __57XX_ISCSI_HSI_LINUX_LE__ */