1 /* 57xx_iscsi_hsi.h: Broadcom NetXtreme II iSCSI HSI.
3 * Copyright (c) 2006 - 2012 Broadcom Corporation
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation.
9 * Written by: Anil Veerabhadrappa (anilgv@broadcom.com)
10 * Maintained by: Eddie Wai (eddie.wai@broadcom.com)
12 #ifndef __57XX_ISCSI_HSI_LINUX_LE__
13 #define __57XX_ISCSI_HSI_LINUX_LE__
18 struct bnx2i_async_msg
{
19 #if defined(__BIG_ENDIAN)
23 #elif defined(__LITTLE_ENDIAN)
32 #if defined(__BIG_ENDIAN)
36 #elif defined(__LITTLE_ENDIAN)
43 #if defined(__BIG_ENDIAN)
47 #elif defined(__LITTLE_ENDIAN)
52 #if defined(__BIG_ENDIAN)
55 #elif defined(__LITTLE_ENDIAN)
65 * iSCSI Buffer Descriptor (BD)
70 #if defined(__BIG_ENDIAN)
73 #elif defined(__LITTLE_ENDIAN)
77 #if defined(__BIG_ENDIAN)
80 #define ISCSI_BD_RESERVED1 (0x3F<<0)
81 #define ISCSI_BD_RESERVED1_SHIFT 0
82 #define ISCSI_BD_LAST_IN_BD_CHAIN (0x1<<6)
83 #define ISCSI_BD_LAST_IN_BD_CHAIN_SHIFT 6
84 #define ISCSI_BD_FIRST_IN_BD_CHAIN (0x1<<7)
85 #define ISCSI_BD_FIRST_IN_BD_CHAIN_SHIFT 7
86 #define ISCSI_BD_RESERVED2 (0xFF<<8)
87 #define ISCSI_BD_RESERVED2_SHIFT 8
88 #elif defined(__LITTLE_ENDIAN)
90 #define ISCSI_BD_RESERVED1 (0x3F<<0)
91 #define ISCSI_BD_RESERVED1_SHIFT 0
92 #define ISCSI_BD_LAST_IN_BD_CHAIN (0x1<<6)
93 #define ISCSI_BD_LAST_IN_BD_CHAIN_SHIFT 6
94 #define ISCSI_BD_FIRST_IN_BD_CHAIN (0x1<<7)
95 #define ISCSI_BD_FIRST_IN_BD_CHAIN_SHIFT 7
96 #define ISCSI_BD_RESERVED2 (0xFF<<8)
97 #define ISCSI_BD_RESERVED2_SHIFT 8
104 * iSCSI Cleanup SQ WQE
106 struct bnx2i_cleanup_request
{
107 #if defined(__BIG_ENDIAN)
111 #elif defined(__LITTLE_ENDIAN)
117 #if defined(__BIG_ENDIAN)
120 #define ISCSI_CLEANUP_REQUEST_INDEX (0x3FFF<<0)
121 #define ISCSI_CLEANUP_REQUEST_INDEX_SHIFT 0
122 #define ISCSI_CLEANUP_REQUEST_TYPE (0x3<<14)
123 #define ISCSI_CLEANUP_REQUEST_TYPE_SHIFT 14
124 #elif defined(__LITTLE_ENDIAN)
126 #define ISCSI_CLEANUP_REQUEST_INDEX (0x3FFF<<0)
127 #define ISCSI_CLEANUP_REQUEST_INDEX_SHIFT 0
128 #define ISCSI_CLEANUP_REQUEST_TYPE (0x3<<14)
129 #define ISCSI_CLEANUP_REQUEST_TYPE_SHIFT 14
133 #if defined(__BIG_ENDIAN)
137 #elif defined(__LITTLE_ENDIAN)
148 struct bnx2i_cleanup_response
{
149 #if defined(__BIG_ENDIAN)
153 #elif defined(__LITTLE_ENDIAN)
160 #if defined(__BIG_ENDIAN)
164 #elif defined(__LITTLE_ENDIAN)
170 #if defined(__BIG_ENDIAN)
173 #define ISCSI_CLEANUP_RESPONSE_INDEX (0x3FFF<<0)
174 #define ISCSI_CLEANUP_RESPONSE_INDEX_SHIFT 0
175 #define ISCSI_CLEANUP_RESPONSE_TYPE (0x3<<14)
176 #define ISCSI_CLEANUP_RESPONSE_TYPE_SHIFT 14
177 #elif defined(__LITTLE_ENDIAN)
179 #define ISCSI_CLEANUP_RESPONSE_INDEX (0x3FFF<<0)
180 #define ISCSI_CLEANUP_RESPONSE_INDEX_SHIFT 0
181 #define ISCSI_CLEANUP_RESPONSE_TYPE (0x3<<14)
182 #define ISCSI_CLEANUP_RESPONSE_TYPE_SHIFT 14
190 * SCSI read/write SQ WQE
192 struct bnx2i_cmd_request
{
193 #if defined(__BIG_ENDIAN)
196 #define ISCSI_CMD_REQUEST_TASK_ATTR (0x7<<0)
197 #define ISCSI_CMD_REQUEST_TASK_ATTR_SHIFT 0
198 #define ISCSI_CMD_REQUEST_RESERVED1 (0x3<<3)
199 #define ISCSI_CMD_REQUEST_RESERVED1_SHIFT 3
200 #define ISCSI_CMD_REQUEST_WRITE (0x1<<5)
201 #define ISCSI_CMD_REQUEST_WRITE_SHIFT 5
202 #define ISCSI_CMD_REQUEST_READ (0x1<<6)
203 #define ISCSI_CMD_REQUEST_READ_SHIFT 6
204 #define ISCSI_CMD_REQUEST_FINAL (0x1<<7)
205 #define ISCSI_CMD_REQUEST_FINAL_SHIFT 7
207 #elif defined(__LITTLE_ENDIAN)
210 #define ISCSI_CMD_REQUEST_TASK_ATTR (0x7<<0)
211 #define ISCSI_CMD_REQUEST_TASK_ATTR_SHIFT 0
212 #define ISCSI_CMD_REQUEST_RESERVED1 (0x3<<3)
213 #define ISCSI_CMD_REQUEST_RESERVED1_SHIFT 3
214 #define ISCSI_CMD_REQUEST_WRITE (0x1<<5)
215 #define ISCSI_CMD_REQUEST_WRITE_SHIFT 5
216 #define ISCSI_CMD_REQUEST_READ (0x1<<6)
217 #define ISCSI_CMD_REQUEST_READ_SHIFT 6
218 #define ISCSI_CMD_REQUEST_FINAL (0x1<<7)
219 #define ISCSI_CMD_REQUEST_FINAL_SHIFT 7
222 #if defined(__BIG_ENDIAN)
223 u16 ud_buffer_offset
;
224 u16 sd_buffer_offset
;
225 #elif defined(__LITTLE_ENDIAN)
226 u16 sd_buffer_offset
;
227 u16 ud_buffer_offset
;
230 #if defined(__BIG_ENDIAN)
233 #define ISCSI_CMD_REQUEST_INDEX (0x3FFF<<0)
234 #define ISCSI_CMD_REQUEST_INDEX_SHIFT 0
235 #define ISCSI_CMD_REQUEST_TYPE (0x3<<14)
236 #define ISCSI_CMD_REQUEST_TYPE_SHIFT 14
237 #elif defined(__LITTLE_ENDIAN)
239 #define ISCSI_CMD_REQUEST_INDEX (0x3FFF<<0)
240 #define ISCSI_CMD_REQUEST_INDEX_SHIFT 0
241 #define ISCSI_CMD_REQUEST_TYPE (0x3<<14)
242 #define ISCSI_CMD_REQUEST_TYPE_SHIFT 14
245 u32 total_data_transfer_length
;
252 #if defined(__BIG_ENDIAN)
254 u8 sd_start_bd_index
;
255 u8 ud_start_bd_index
;
257 #elif defined(__LITTLE_ENDIAN)
259 u8 ud_start_bd_index
;
260 u8 sd_start_bd_index
;
267 * task statistics for write response
269 struct bnx2i_write_resp_task_stat
{
270 #if defined(__BIG_ENDIAN)
273 #elif defined(__LITTLE_ENDIAN)
280 * task statistics for read response
282 struct bnx2i_read_resp_task_stat
{
283 #if defined(__BIG_ENDIAN)
286 #elif defined(__LITTLE_ENDIAN)
293 * task statistics for iSCSI cmd response
295 union bnx2i_cmd_resp_task_stat
{
296 struct bnx2i_write_resp_task_stat write_stat
;
297 struct bnx2i_read_resp_task_stat read_stat
;
303 struct bnx2i_cmd_response
{
304 #if defined(__BIG_ENDIAN)
307 #define ISCSI_CMD_RESPONSE_RESERVED0 (0x1<<0)
308 #define ISCSI_CMD_RESPONSE_RESERVED0_SHIFT 0
309 #define ISCSI_CMD_RESPONSE_RESIDUAL_UNDERFLOW (0x1<<1)
310 #define ISCSI_CMD_RESPONSE_RESIDUAL_UNDERFLOW_SHIFT 1
311 #define ISCSI_CMD_RESPONSE_RESIDUAL_OVERFLOW (0x1<<2)
312 #define ISCSI_CMD_RESPONSE_RESIDUAL_OVERFLOW_SHIFT 2
313 #define ISCSI_CMD_RESPONSE_BR_RESIDUAL_UNDERFLOW (0x1<<3)
314 #define ISCSI_CMD_RESPONSE_BR_RESIDUAL_UNDERFLOW_SHIFT 3
315 #define ISCSI_CMD_RESPONSE_BR_RESIDUAL_OVERFLOW (0x1<<4)
316 #define ISCSI_CMD_RESPONSE_BR_RESIDUAL_OVERFLOW_SHIFT 4
317 #define ISCSI_CMD_RESPONSE_RESERVED1 (0x7<<5)
318 #define ISCSI_CMD_RESPONSE_RESERVED1_SHIFT 5
321 #elif defined(__LITTLE_ENDIAN)
325 #define ISCSI_CMD_RESPONSE_RESERVED0 (0x1<<0)
326 #define ISCSI_CMD_RESPONSE_RESERVED0_SHIFT 0
327 #define ISCSI_CMD_RESPONSE_RESIDUAL_UNDERFLOW (0x1<<1)
328 #define ISCSI_CMD_RESPONSE_RESIDUAL_UNDERFLOW_SHIFT 1
329 #define ISCSI_CMD_RESPONSE_RESIDUAL_OVERFLOW (0x1<<2)
330 #define ISCSI_CMD_RESPONSE_RESIDUAL_OVERFLOW_SHIFT 2
331 #define ISCSI_CMD_RESPONSE_BR_RESIDUAL_UNDERFLOW (0x1<<3)
332 #define ISCSI_CMD_RESPONSE_BR_RESIDUAL_UNDERFLOW_SHIFT 3
333 #define ISCSI_CMD_RESPONSE_BR_RESIDUAL_OVERFLOW (0x1<<4)
334 #define ISCSI_CMD_RESPONSE_BR_RESIDUAL_OVERFLOW_SHIFT 4
335 #define ISCSI_CMD_RESPONSE_RESERVED1 (0x7<<5)
336 #define ISCSI_CMD_RESPONSE_RESERVED1_SHIFT 5
344 #if defined(__BIG_ENDIAN)
348 #elif defined(__LITTLE_ENDIAN)
354 union bnx2i_cmd_resp_task_stat task_stat
;
356 #if defined(__BIG_ENDIAN)
359 #define ISCSI_CMD_RESPONSE_INDEX (0x3FFF<<0)
360 #define ISCSI_CMD_RESPONSE_INDEX_SHIFT 0
361 #define ISCSI_CMD_RESPONSE_TYPE (0x3<<14)
362 #define ISCSI_CMD_RESPONSE_TYPE_SHIFT 14
363 #elif defined(__LITTLE_ENDIAN)
365 #define ISCSI_CMD_RESPONSE_INDEX (0x3FFF<<0)
366 #define ISCSI_CMD_RESPONSE_INDEX_SHIFT 0
367 #define ISCSI_CMD_RESPONSE_TYPE (0x3<<14)
368 #define ISCSI_CMD_RESPONSE_TYPE_SHIFT 14
377 * firmware middle-path request SQ WQE
379 struct bnx2i_fw_mp_request
{
380 #if defined(__BIG_ENDIAN)
384 #elif defined(__LITTLE_ENDIAN)
391 #if defined(__BIG_ENDIAN)
394 #define ISCSI_FW_MP_REQUEST_INDEX (0x3FFF<<0)
395 #define ISCSI_FW_MP_REQUEST_INDEX_SHIFT 0
396 #define ISCSI_FW_MP_REQUEST_TYPE (0x3<<14)
397 #define ISCSI_FW_MP_REQUEST_TYPE_SHIFT 14
398 #elif defined(__LITTLE_ENDIAN)
400 #define ISCSI_FW_MP_REQUEST_INDEX (0x3FFF<<0)
401 #define ISCSI_FW_MP_REQUEST_INDEX_SHIFT 0
402 #define ISCSI_FW_MP_REQUEST_TYPE (0x3<<14)
403 #define ISCSI_FW_MP_REQUEST_TYPE_SHIFT 14
407 u32 resp_bd_list_addr_lo
;
408 u32 resp_bd_list_addr_hi
;
410 #define ISCSI_FW_MP_REQUEST_RESP_BUFFER_LENGTH (0xFFFFFF<<0)
411 #define ISCSI_FW_MP_REQUEST_RESP_BUFFER_LENGTH_SHIFT 0
412 #define ISCSI_FW_MP_REQUEST_NUM_RESP_BDS (0xFF<<24)
413 #define ISCSI_FW_MP_REQUEST_NUM_RESP_BDS_SHIFT 24
414 #if defined(__BIG_ENDIAN)
418 #define ISCSI_FW_MP_REQUEST_RESERVED1 (0x1<<0)
419 #define ISCSI_FW_MP_REQUEST_RESERVED1_SHIFT 0
420 #define ISCSI_FW_MP_REQUEST_LOCAL_COMPLETION (0x1<<1)
421 #define ISCSI_FW_MP_REQUEST_LOCAL_COMPLETION_SHIFT 1
422 #define ISCSI_FW_MP_REQUEST_UPDATE_EXP_STAT_SN (0x1<<2)
423 #define ISCSI_FW_MP_REQUEST_UPDATE_EXP_STAT_SN_SHIFT 2
424 #define ISCSI_FW_MP_REQUEST_RESERVED2 (0x1F<<3)
425 #define ISCSI_FW_MP_REQUEST_RESERVED2_SHIFT 3
426 #elif defined(__LITTLE_ENDIAN)
428 #define ISCSI_FW_MP_REQUEST_RESERVED1 (0x1<<0)
429 #define ISCSI_FW_MP_REQUEST_RESERVED1_SHIFT 0
430 #define ISCSI_FW_MP_REQUEST_LOCAL_COMPLETION (0x1<<1)
431 #define ISCSI_FW_MP_REQUEST_LOCAL_COMPLETION_SHIFT 1
432 #define ISCSI_FW_MP_REQUEST_UPDATE_EXP_STAT_SN (0x1<<2)
433 #define ISCSI_FW_MP_REQUEST_UPDATE_EXP_STAT_SN_SHIFT 2
434 #define ISCSI_FW_MP_REQUEST_RESERVED2 (0x1F<<3)
435 #define ISCSI_FW_MP_REQUEST_RESERVED2_SHIFT 3
441 #if defined(__BIG_ENDIAN)
446 #elif defined(__LITTLE_ENDIAN)
456 * firmware response - CQE: used only by firmware
458 struct bnx2i_fw_response
{
465 #define ISCSI_FW_RESPONSE_RESERVED2 (0xFF<<0)
466 #define ISCSI_FW_RESPONSE_RESERVED2_SHIFT 0
467 #define ISCSI_FW_RESPONSE_ERR_CODE (0xFF<<8)
468 #define ISCSI_FW_RESPONSE_ERR_CODE_SHIFT 8
469 #define ISCSI_FW_RESPONSE_RESERVED3 (0xFFFF<<16)
470 #define ISCSI_FW_RESPONSE_RESERVED3_SHIFT 16
482 * iSCSI KCQ CQE parameters
484 union iscsi_kcqe_params
{
493 u32 completion_status
;
494 u32 iscsi_conn_context_id
;
495 union iscsi_kcqe_params params
;
496 #if defined(__BIG_ENDIAN)
498 #define ISCSI_KCQE_RESERVED0 (0xF<<0)
499 #define ISCSI_KCQE_RESERVED0_SHIFT 0
500 #define ISCSI_KCQE_LAYER_CODE (0x7<<4)
501 #define ISCSI_KCQE_LAYER_CODE_SHIFT 4
502 #define ISCSI_KCQE_RESERVED1 (0x1<<7)
503 #define ISCSI_KCQE_RESERVED1_SHIFT 7
506 #elif defined(__LITTLE_ENDIAN)
510 #define ISCSI_KCQE_RESERVED0 (0xF<<0)
511 #define ISCSI_KCQE_RESERVED0_SHIFT 0
512 #define ISCSI_KCQE_LAYER_CODE (0x7<<4)
513 #define ISCSI_KCQE_LAYER_CODE_SHIFT 4
514 #define ISCSI_KCQE_RESERVED1 (0x1<<7)
515 #define ISCSI_KCQE_RESERVED1_SHIFT 7
524 struct iscsi_kwqe_header
{
525 #if defined(__BIG_ENDIAN)
527 #define ISCSI_KWQE_HEADER_RESERVED0 (0xF<<0)
528 #define ISCSI_KWQE_HEADER_RESERVED0_SHIFT 0
529 #define ISCSI_KWQE_HEADER_LAYER_CODE (0x7<<4)
530 #define ISCSI_KWQE_HEADER_LAYER_CODE_SHIFT 4
531 #define ISCSI_KWQE_HEADER_RESERVED1 (0x1<<7)
532 #define ISCSI_KWQE_HEADER_RESERVED1_SHIFT 7
534 #elif defined(__LITTLE_ENDIAN)
537 #define ISCSI_KWQE_HEADER_RESERVED0 (0xF<<0)
538 #define ISCSI_KWQE_HEADER_RESERVED0_SHIFT 0
539 #define ISCSI_KWQE_HEADER_LAYER_CODE (0x7<<4)
540 #define ISCSI_KWQE_HEADER_LAYER_CODE_SHIFT 4
541 #define ISCSI_KWQE_HEADER_RESERVED1 (0x1<<7)
542 #define ISCSI_KWQE_HEADER_RESERVED1_SHIFT 7
547 * iSCSI firmware init request 1
549 struct iscsi_kwqe_init1
{
550 #if defined(__BIG_ENDIAN)
551 struct iscsi_kwqe_header hdr
;
554 #elif defined(__LITTLE_ENDIAN)
557 struct iscsi_kwqe_header hdr
;
559 u32 dummy_buffer_addr_lo
;
560 u32 dummy_buffer_addr_hi
;
561 #if defined(__BIG_ENDIAN)
562 u16 num_ccells_per_conn
;
563 u16 num_tasks_per_conn
;
564 #elif defined(__LITTLE_ENDIAN)
565 u16 num_tasks_per_conn
;
566 u16 num_ccells_per_conn
;
568 #if defined(__BIG_ENDIAN)
569 u16 sq_wqes_per_page
;
571 #elif defined(__LITTLE_ENDIAN)
573 u16 sq_wqes_per_page
;
575 #if defined(__BIG_ENDIAN)
576 u8 cq_log_wqes_per_page
;
578 #define ISCSI_KWQE_INIT1_PAGE_SIZE (0xF<<0)
579 #define ISCSI_KWQE_INIT1_PAGE_SIZE_SHIFT 0
580 #define ISCSI_KWQE_INIT1_DELAYED_ACK_ENABLE (0x1<<4)
581 #define ISCSI_KWQE_INIT1_DELAYED_ACK_ENABLE_SHIFT 4
582 #define ISCSI_KWQE_INIT1_KEEP_ALIVE_ENABLE (0x1<<5)
583 #define ISCSI_KWQE_INIT1_KEEP_ALIVE_ENABLE_SHIFT 5
584 #define ISCSI_KWQE_INIT1_RESERVED1 (0x3<<6)
585 #define ISCSI_KWQE_INIT1_RESERVED1_SHIFT 6
587 #elif defined(__LITTLE_ENDIAN)
590 #define ISCSI_KWQE_INIT1_PAGE_SIZE (0xF<<0)
591 #define ISCSI_KWQE_INIT1_PAGE_SIZE_SHIFT 0
592 #define ISCSI_KWQE_INIT1_DELAYED_ACK_ENABLE (0x1<<4)
593 #define ISCSI_KWQE_INIT1_DELAYED_ACK_ENABLE_SHIFT 4
594 #define ISCSI_KWQE_INIT1_KEEP_ALIVE_ENABLE (0x1<<5)
595 #define ISCSI_KWQE_INIT1_KEEP_ALIVE_ENABLE_SHIFT 5
596 #define ISCSI_KWQE_INIT1_RESERVED1 (0x3<<6)
597 #define ISCSI_KWQE_INIT1_RESERVED1_SHIFT 6
598 u8 cq_log_wqes_per_page
;
600 #if defined(__BIG_ENDIAN)
603 #elif defined(__LITTLE_ENDIAN)
607 #if defined(__BIG_ENDIAN)
610 #elif defined(__LITTLE_ENDIAN)
617 * iSCSI firmware init request 2
619 struct iscsi_kwqe_init2
{
620 #if defined(__BIG_ENDIAN)
621 struct iscsi_kwqe_header hdr
;
623 #elif defined(__LITTLE_ENDIAN)
625 struct iscsi_kwqe_header hdr
;
627 u32 error_bit_map
[2];
632 * Initial iSCSI connection offload request 1
634 struct iscsi_kwqe_conn_offload1
{
635 #if defined(__BIG_ENDIAN)
636 struct iscsi_kwqe_header hdr
;
638 #elif defined(__LITTLE_ENDIAN)
640 struct iscsi_kwqe_header hdr
;
642 u32 sq_page_table_addr_lo
;
643 u32 sq_page_table_addr_hi
;
644 u32 cq_page_table_addr_lo
;
645 u32 cq_page_table_addr_hi
;
650 * iSCSI Page Table Entry (PTE)
658 * Initial iSCSI connection offload request 2
660 struct iscsi_kwqe_conn_offload2
{
661 #if defined(__BIG_ENDIAN)
662 struct iscsi_kwqe_header hdr
;
664 #elif defined(__LITTLE_ENDIAN)
666 struct iscsi_kwqe_header hdr
;
668 u32 rq_page_table_addr_lo
;
669 u32 rq_page_table_addr_hi
;
670 struct iscsi_pte sq_first_pte
;
671 struct iscsi_pte cq_first_pte
;
672 u32 num_additional_wqes
;
677 * Initial iSCSI connection offload request 3
679 struct iscsi_kwqe_conn_offload3
{
680 #if defined(__BIG_ENDIAN)
681 struct iscsi_kwqe_header hdr
;
683 #elif defined(__LITTLE_ENDIAN)
685 struct iscsi_kwqe_header hdr
;
688 struct iscsi_pte qp_first_pte
[3];
693 * iSCSI connection update request
695 struct iscsi_kwqe_conn_update
{
696 #if defined(__BIG_ENDIAN)
697 struct iscsi_kwqe_header hdr
;
699 #elif defined(__LITTLE_ENDIAN)
701 struct iscsi_kwqe_header hdr
;
703 #if defined(__BIG_ENDIAN)
704 u8 session_error_recovery_level
;
705 u8 max_outstanding_r2ts
;
708 #define ISCSI_KWQE_CONN_UPDATE_HEADER_DIGEST (0x1<<0)
709 #define ISCSI_KWQE_CONN_UPDATE_HEADER_DIGEST_SHIFT 0
710 #define ISCSI_KWQE_CONN_UPDATE_DATA_DIGEST (0x1<<1)
711 #define ISCSI_KWQE_CONN_UPDATE_DATA_DIGEST_SHIFT 1
712 #define ISCSI_KWQE_CONN_UPDATE_INITIAL_R2T (0x1<<2)
713 #define ISCSI_KWQE_CONN_UPDATE_INITIAL_R2T_SHIFT 2
714 #define ISCSI_KWQE_CONN_UPDATE_IMMEDIATE_DATA (0x1<<3)
715 #define ISCSI_KWQE_CONN_UPDATE_IMMEDIATE_DATA_SHIFT 3
716 #define ISCSI_KWQE_CONN_UPDATE_OOO_SUPPORT_MODE (0x3<<4)
717 #define ISCSI_KWQE_CONN_UPDATE_OOO_SUPPORT_MODE_SHIFT 4
718 #define ISCSI_KWQE_CONN_UPDATE_RESERVED1 (0x3<<6)
719 #define ISCSI_KWQE_CONN_UPDATE_RESERVED1_SHIFT 6
720 #elif defined(__LITTLE_ENDIAN)
722 #define ISCSI_KWQE_CONN_UPDATE_HEADER_DIGEST (0x1<<0)
723 #define ISCSI_KWQE_CONN_UPDATE_HEADER_DIGEST_SHIFT 0
724 #define ISCSI_KWQE_CONN_UPDATE_DATA_DIGEST (0x1<<1)
725 #define ISCSI_KWQE_CONN_UPDATE_DATA_DIGEST_SHIFT 1
726 #define ISCSI_KWQE_CONN_UPDATE_INITIAL_R2T (0x1<<2)
727 #define ISCSI_KWQE_CONN_UPDATE_INITIAL_R2T_SHIFT 2
728 #define ISCSI_KWQE_CONN_UPDATE_IMMEDIATE_DATA (0x1<<3)
729 #define ISCSI_KWQE_CONN_UPDATE_IMMEDIATE_DATA_SHIFT 3
730 #define ISCSI_KWQE_CONN_UPDATE_OOO_SUPPORT_MODE (0x3<<4)
731 #define ISCSI_KWQE_CONN_UPDATE_OOO_SUPPORT_MODE_SHIFT 4
732 #define ISCSI_KWQE_CONN_UPDATE_RESERVED1 (0x3<<6)
733 #define ISCSI_KWQE_CONN_UPDATE_RESERVED1_SHIFT 6
735 u8 max_outstanding_r2ts
;
736 u8 session_error_recovery_level
;
739 u32 max_send_pdu_length
;
740 u32 max_recv_pdu_length
;
741 u32 first_burst_length
;
742 u32 max_burst_length
;
747 * iSCSI destroy connection request
749 struct iscsi_kwqe_conn_destroy
{
750 #if defined(__BIG_ENDIAN)
751 struct iscsi_kwqe_header hdr
;
753 #elif defined(__LITTLE_ENDIAN)
755 struct iscsi_kwqe_header hdr
;
765 struct iscsi_kwqe_init1 init1
;
766 struct iscsi_kwqe_init2 init2
;
767 struct iscsi_kwqe_conn_offload1 conn_offload1
;
768 struct iscsi_kwqe_conn_offload2 conn_offload2
;
769 struct iscsi_kwqe_conn_update conn_update
;
770 struct iscsi_kwqe_conn_destroy conn_destroy
;
776 struct bnx2i_login_request
{
777 #if defined(__BIG_ENDIAN)
780 #define ISCSI_LOGIN_REQUEST_NEXT_STAGE (0x3<<0)
781 #define ISCSI_LOGIN_REQUEST_NEXT_STAGE_SHIFT 0
782 #define ISCSI_LOGIN_REQUEST_CURRENT_STAGE (0x3<<2)
783 #define ISCSI_LOGIN_REQUEST_CURRENT_STAGE_SHIFT 2
784 #define ISCSI_LOGIN_REQUEST_RESERVED0 (0x3<<4)
785 #define ISCSI_LOGIN_REQUEST_RESERVED0_SHIFT 4
786 #define ISCSI_LOGIN_REQUEST_CONT (0x1<<6)
787 #define ISCSI_LOGIN_REQUEST_CONT_SHIFT 6
788 #define ISCSI_LOGIN_REQUEST_TRANSIT (0x1<<7)
789 #define ISCSI_LOGIN_REQUEST_TRANSIT_SHIFT 7
792 #elif defined(__LITTLE_ENDIAN)
796 #define ISCSI_LOGIN_REQUEST_NEXT_STAGE (0x3<<0)
797 #define ISCSI_LOGIN_REQUEST_NEXT_STAGE_SHIFT 0
798 #define ISCSI_LOGIN_REQUEST_CURRENT_STAGE (0x3<<2)
799 #define ISCSI_LOGIN_REQUEST_CURRENT_STAGE_SHIFT 2
800 #define ISCSI_LOGIN_REQUEST_RESERVED0 (0x3<<4)
801 #define ISCSI_LOGIN_REQUEST_RESERVED0_SHIFT 4
802 #define ISCSI_LOGIN_REQUEST_CONT (0x1<<6)
803 #define ISCSI_LOGIN_REQUEST_CONT_SHIFT 6
804 #define ISCSI_LOGIN_REQUEST_TRANSIT (0x1<<7)
805 #define ISCSI_LOGIN_REQUEST_TRANSIT_SHIFT 7
810 #if defined(__BIG_ENDIAN)
813 #elif defined(__LITTLE_ENDIAN)
817 #if defined(__BIG_ENDIAN)
820 #define ISCSI_LOGIN_REQUEST_INDEX (0x3FFF<<0)
821 #define ISCSI_LOGIN_REQUEST_INDEX_SHIFT 0
822 #define ISCSI_LOGIN_REQUEST_TYPE (0x3<<14)
823 #define ISCSI_LOGIN_REQUEST_TYPE_SHIFT 14
824 #elif defined(__LITTLE_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
832 #if defined(__BIG_ENDIAN)
835 #elif defined(__LITTLE_ENDIAN)
842 u32 resp_bd_list_addr_lo
;
843 u32 resp_bd_list_addr_hi
;
845 #define ISCSI_LOGIN_REQUEST_RESP_BUFFER_LENGTH (0xFFFFFF<<0)
846 #define ISCSI_LOGIN_REQUEST_RESP_BUFFER_LENGTH_SHIFT 0
847 #define ISCSI_LOGIN_REQUEST_NUM_RESP_BDS (0xFF<<24)
848 #define ISCSI_LOGIN_REQUEST_NUM_RESP_BDS_SHIFT 24
849 #if defined(__BIG_ENDIAN)
853 #define ISCSI_LOGIN_REQUEST_RESERVED5 (0x3<<0)
854 #define ISCSI_LOGIN_REQUEST_RESERVED5_SHIFT 0
855 #define ISCSI_LOGIN_REQUEST_UPDATE_EXP_STAT_SN (0x1<<2)
856 #define ISCSI_LOGIN_REQUEST_UPDATE_EXP_STAT_SN_SHIFT 2
857 #define ISCSI_LOGIN_REQUEST_RESERVED6 (0x1F<<3)
858 #define ISCSI_LOGIN_REQUEST_RESERVED6_SHIFT 3
859 #elif defined(__LITTLE_ENDIAN)
861 #define ISCSI_LOGIN_REQUEST_RESERVED5 (0x3<<0)
862 #define ISCSI_LOGIN_REQUEST_RESERVED5_SHIFT 0
863 #define ISCSI_LOGIN_REQUEST_UPDATE_EXP_STAT_SN (0x1<<2)
864 #define ISCSI_LOGIN_REQUEST_UPDATE_EXP_STAT_SN_SHIFT 2
865 #define ISCSI_LOGIN_REQUEST_RESERVED6 (0x1F<<3)
866 #define ISCSI_LOGIN_REQUEST_RESERVED6_SHIFT 3
872 #if defined(__BIG_ENDIAN)
877 #elif defined(__LITTLE_ENDIAN)
889 struct bnx2i_login_response
{
890 #if defined(__BIG_ENDIAN)
893 #define ISCSI_LOGIN_RESPONSE_NEXT_STAGE (0x3<<0)
894 #define ISCSI_LOGIN_RESPONSE_NEXT_STAGE_SHIFT 0
895 #define ISCSI_LOGIN_RESPONSE_CURRENT_STAGE (0x3<<2)
896 #define ISCSI_LOGIN_RESPONSE_CURRENT_STAGE_SHIFT 2
897 #define ISCSI_LOGIN_RESPONSE_RESERVED0 (0x3<<4)
898 #define ISCSI_LOGIN_RESPONSE_RESERVED0_SHIFT 4
899 #define ISCSI_LOGIN_RESPONSE_CONT (0x1<<6)
900 #define ISCSI_LOGIN_RESPONSE_CONT_SHIFT 6
901 #define ISCSI_LOGIN_RESPONSE_TRANSIT (0x1<<7)
902 #define ISCSI_LOGIN_RESPONSE_TRANSIT_SHIFT 7
905 #elif defined(__LITTLE_ENDIAN)
909 #define ISCSI_LOGIN_RESPONSE_NEXT_STAGE (0x3<<0)
910 #define ISCSI_LOGIN_RESPONSE_NEXT_STAGE_SHIFT 0
911 #define ISCSI_LOGIN_RESPONSE_CURRENT_STAGE (0x3<<2)
912 #define ISCSI_LOGIN_RESPONSE_CURRENT_STAGE_SHIFT 2
913 #define ISCSI_LOGIN_RESPONSE_RESERVED0 (0x3<<4)
914 #define ISCSI_LOGIN_RESPONSE_RESERVED0_SHIFT 4
915 #define ISCSI_LOGIN_RESPONSE_CONT (0x1<<6)
916 #define ISCSI_LOGIN_RESPONSE_CONT_SHIFT 6
917 #define ISCSI_LOGIN_RESPONSE_TRANSIT (0x1<<7)
918 #define ISCSI_LOGIN_RESPONSE_TRANSIT_SHIFT 7
925 #if defined(__BIG_ENDIAN)
929 #elif defined(__LITTLE_ENDIAN)
936 #if defined(__BIG_ENDIAN)
939 #elif defined(__LITTLE_ENDIAN)
943 #if defined(__BIG_ENDIAN)
947 #elif defined(__LITTLE_ENDIAN)
953 #if defined(__BIG_ENDIAN)
956 #define ISCSI_LOGIN_RESPONSE_INDEX (0x3FFF<<0)
957 #define ISCSI_LOGIN_RESPONSE_INDEX_SHIFT 0
958 #define ISCSI_LOGIN_RESPONSE_TYPE (0x3<<14)
959 #define ISCSI_LOGIN_RESPONSE_TYPE_SHIFT 14
960 #elif defined(__LITTLE_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
973 * iSCSI Logout SQ WQE
975 struct bnx2i_logout_request
{
976 #if defined(__BIG_ENDIAN)
979 #define ISCSI_LOGOUT_REQUEST_REASON (0x7F<<0)
980 #define ISCSI_LOGOUT_REQUEST_REASON_SHIFT 0
981 #define ISCSI_LOGOUT_REQUEST_ALWAYS_ONE (0x1<<7)
982 #define ISCSI_LOGOUT_REQUEST_ALWAYS_ONE_SHIFT 7
984 #elif defined(__LITTLE_ENDIAN)
987 #define ISCSI_LOGOUT_REQUEST_REASON (0x7F<<0)
988 #define ISCSI_LOGOUT_REQUEST_REASON_SHIFT 0
989 #define ISCSI_LOGOUT_REQUEST_ALWAYS_ONE (0x1<<7)
990 #define ISCSI_LOGOUT_REQUEST_ALWAYS_ONE_SHIFT 7
995 #if defined(__BIG_ENDIAN)
998 #define ISCSI_LOGOUT_REQUEST_INDEX (0x3FFF<<0)
999 #define ISCSI_LOGOUT_REQUEST_INDEX_SHIFT 0
1000 #define ISCSI_LOGOUT_REQUEST_TYPE (0x3<<14)
1001 #define ISCSI_LOGOUT_REQUEST_TYPE_SHIFT 14
1002 #elif defined(__LITTLE_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
1010 #if defined(__BIG_ENDIAN)
1013 #elif defined(__LITTLE_ENDIAN)
1020 u32 bd_list_addr_lo
;
1021 u32 bd_list_addr_hi
;
1022 #if defined(__BIG_ENDIAN)
1027 #elif defined(__LITTLE_ENDIAN)
1039 struct bnx2i_logout_response
{
1040 #if defined(__BIG_ENDIAN)
1045 #elif defined(__LITTLE_ENDIAN)
1055 #if defined(__BIG_ENDIAN)
1059 #elif defined(__LITTLE_ENDIAN)
1065 #if defined(__BIG_ENDIAN)
1068 #elif defined(__LITTLE_ENDIAN)
1073 #if defined(__BIG_ENDIAN)
1076 #define ISCSI_LOGOUT_RESPONSE_INDEX (0x3FFF<<0)
1077 #define ISCSI_LOGOUT_RESPONSE_INDEX_SHIFT 0
1078 #define ISCSI_LOGOUT_RESPONSE_TYPE (0x3<<14)
1079 #define ISCSI_LOGOUT_RESPONSE_TYPE_SHIFT 14
1080 #elif defined(__LITTLE_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
1095 struct bnx2i_nop_in_msg
{
1096 #if defined(__BIG_ENDIAN)
1100 #elif defined(__LITTLE_ENDIAN)
1110 #if defined(__BIG_ENDIAN)
1114 #elif defined(__LITTLE_ENDIAN)
1122 #if defined(__BIG_ENDIAN)
1125 #define ISCSI_NOP_IN_MSG_INDEX (0x3FFF<<0)
1126 #define ISCSI_NOP_IN_MSG_INDEX_SHIFT 0
1127 #define ISCSI_NOP_IN_MSG_TYPE (0x3<<14)
1128 #define ISCSI_NOP_IN_MSG_TYPE_SHIFT 14
1129 #elif defined(__LITTLE_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
1142 * iSCSI NOP-OUT SQ WQE
1144 struct bnx2i_nop_out_request
{
1145 #if defined(__BIG_ENDIAN)
1148 #define ISCSI_NOP_OUT_REQUEST_RESERVED1 (0x7F<<0)
1149 #define ISCSI_NOP_OUT_REQUEST_RESERVED1_SHIFT 0
1150 #define ISCSI_NOP_OUT_REQUEST_ALWAYS_ONE (0x1<<7)
1151 #define ISCSI_NOP_OUT_REQUEST_ALWAYS_ONE_SHIFT 7
1153 #elif defined(__LITTLE_ENDIAN)
1156 #define ISCSI_NOP_OUT_REQUEST_RESERVED1 (0x7F<<0)
1157 #define ISCSI_NOP_OUT_REQUEST_RESERVED1_SHIFT 0
1158 #define ISCSI_NOP_OUT_REQUEST_ALWAYS_ONE (0x1<<7)
1159 #define ISCSI_NOP_OUT_REQUEST_ALWAYS_ONE_SHIFT 7
1164 #if defined(__BIG_ENDIAN)
1167 #define ISCSI_NOP_OUT_REQUEST_INDEX (0x3FFF<<0)
1168 #define ISCSI_NOP_OUT_REQUEST_INDEX_SHIFT 0
1169 #define ISCSI_NOP_OUT_REQUEST_TYPE (0x3<<14)
1170 #define ISCSI_NOP_OUT_REQUEST_TYPE_SHIFT 14
1171 #elif defined(__LITTLE_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
1182 u32 resp_bd_list_addr_lo
;
1183 u32 resp_bd_list_addr_hi
;
1185 #define ISCSI_NOP_OUT_REQUEST_RESP_BUFFER_LENGTH (0xFFFFFF<<0)
1186 #define ISCSI_NOP_OUT_REQUEST_RESP_BUFFER_LENGTH_SHIFT 0
1187 #define ISCSI_NOP_OUT_REQUEST_NUM_RESP_BDS (0xFF<<24)
1188 #define ISCSI_NOP_OUT_REQUEST_NUM_RESP_BDS_SHIFT 24
1189 #if defined(__BIG_ENDIAN)
1193 #define ISCSI_NOP_OUT_REQUEST_RESERVED4 (0x1<<0)
1194 #define ISCSI_NOP_OUT_REQUEST_RESERVED4_SHIFT 0
1195 #define ISCSI_NOP_OUT_REQUEST_LOCAL_COMPLETION (0x1<<1)
1196 #define ISCSI_NOP_OUT_REQUEST_LOCAL_COMPLETION_SHIFT 1
1197 #define ISCSI_NOP_OUT_REQUEST_ZERO_FILL (0x3F<<2)
1198 #define ISCSI_NOP_OUT_REQUEST_ZERO_FILL_SHIFT 2
1199 #elif defined(__LITTLE_ENDIAN)
1201 #define ISCSI_NOP_OUT_REQUEST_RESERVED4 (0x1<<0)
1202 #define ISCSI_NOP_OUT_REQUEST_RESERVED4_SHIFT 0
1203 #define ISCSI_NOP_OUT_REQUEST_LOCAL_COMPLETION (0x1<<1)
1204 #define ISCSI_NOP_OUT_REQUEST_LOCAL_COMPLETION_SHIFT 1
1205 #define ISCSI_NOP_OUT_REQUEST_ZERO_FILL (0x3F<<2)
1206 #define ISCSI_NOP_OUT_REQUEST_ZERO_FILL_SHIFT 2
1210 u32 bd_list_addr_lo
;
1211 u32 bd_list_addr_hi
;
1212 #if defined(__BIG_ENDIAN)
1217 #elif defined(__LITTLE_ENDIAN)
1228 struct bnx2i_reject_msg
{
1229 #if defined(__BIG_ENDIAN)
1234 #elif defined(__LITTLE_ENDIAN)
1244 #if defined(__BIG_ENDIAN)
1248 #elif defined(__LITTLE_ENDIAN)
1258 * bnx2i iSCSI TMF SQ WQE
1260 struct bnx2i_tmf_request
{
1261 #if defined(__BIG_ENDIAN)
1264 #define ISCSI_TMF_REQUEST_FUNCTION (0x7F<<0)
1265 #define ISCSI_TMF_REQUEST_FUNCTION_SHIFT 0
1266 #define ISCSI_TMF_REQUEST_ALWAYS_ONE (0x1<<7)
1267 #define ISCSI_TMF_REQUEST_ALWAYS_ONE_SHIFT 7
1269 #elif defined(__LITTLE_ENDIAN)
1272 #define ISCSI_TMF_REQUEST_FUNCTION (0x7F<<0)
1273 #define ISCSI_TMF_REQUEST_FUNCTION_SHIFT 0
1274 #define ISCSI_TMF_REQUEST_ALWAYS_ONE (0x1<<7)
1275 #define ISCSI_TMF_REQUEST_ALWAYS_ONE_SHIFT 7
1280 #if defined(__BIG_ENDIAN)
1283 #define ISCSI_TMF_REQUEST_INDEX (0x3FFF<<0)
1284 #define ISCSI_TMF_REQUEST_INDEX_SHIFT 0
1285 #define ISCSI_TMF_REQUEST_TYPE (0x3<<14)
1286 #define ISCSI_TMF_REQUEST_TYPE_SHIFT 14
1287 #elif defined(__LITTLE_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
1301 u32 bd_list_addr_lo
;
1302 u32 bd_list_addr_hi
;
1303 #if defined(__BIG_ENDIAN)
1308 #elif defined(__LITTLE_ENDIAN)
1319 struct bnx2i_text_request
{
1320 #if defined(__BIG_ENDIAN)
1323 #define ISCSI_TEXT_REQUEST_RESERVED1 (0x3F<<0)
1324 #define ISCSI_TEXT_REQUEST_RESERVED1_SHIFT 0
1325 #define ISCSI_TEXT_REQUEST_CONT (0x1<<6)
1326 #define ISCSI_TEXT_REQUEST_CONT_SHIFT 6
1327 #define ISCSI_TEXT_REQUEST_FINAL (0x1<<7)
1328 #define ISCSI_TEXT_REQUEST_FINAL_SHIFT 7
1330 #elif defined(__LITTLE_ENDIAN)
1333 #define ISCSI_TEXT_REQUEST_RESERVED1 (0x3F<<0)
1334 #define ISCSI_TEXT_REQUEST_RESERVED1_SHIFT 0
1335 #define ISCSI_TEXT_REQUEST_CONT (0x1<<6)
1336 #define ISCSI_TEXT_REQUEST_CONT_SHIFT 6
1337 #define ISCSI_TEXT_REQUEST_FINAL (0x1<<7)
1338 #define ISCSI_TEXT_REQUEST_FINAL_SHIFT 7
1343 #if defined(__BIG_ENDIAN)
1346 #define ISCSI_TEXT_REQUEST_INDEX (0x3FFF<<0)
1347 #define ISCSI_TEXT_REQUEST_INDEX_SHIFT 0
1348 #define ISCSI_TEXT_REQUEST_TYPE (0x3<<14)
1349 #define ISCSI_TEXT_REQUEST_TYPE_SHIFT 14
1350 #elif defined(__LITTLE_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
1361 u32 resp_bd_list_addr_lo
;
1362 u32 resp_bd_list_addr_hi
;
1364 #define ISCSI_TEXT_REQUEST_RESP_BUFFER_LENGTH (0xFFFFFF<<0)
1365 #define ISCSI_TEXT_REQUEST_RESP_BUFFER_LENGTH_SHIFT 0
1366 #define ISCSI_TEXT_REQUEST_NUM_RESP_BDS (0xFF<<24)
1367 #define ISCSI_TEXT_REQUEST_NUM_RESP_BDS_SHIFT 24
1369 u32 bd_list_addr_lo
;
1370 u32 bd_list_addr_hi
;
1371 #if defined(__BIG_ENDIAN)
1376 #elif defined(__LITTLE_ENDIAN)
1387 union iscsi_request
{
1388 struct bnx2i_cmd_request cmd
;
1389 struct bnx2i_tmf_request tmf
;
1390 struct bnx2i_nop_out_request nop_out
;
1391 struct bnx2i_login_request login_req
;
1392 struct bnx2i_text_request text
;
1393 struct bnx2i_logout_request logout_req
;
1394 struct bnx2i_cleanup_request cleanup
;
1401 struct bnx2i_tmf_response
{
1402 #if defined(__BIG_ENDIAN)
1407 #elif defined(__LITTLE_ENDIAN)
1417 #if defined(__BIG_ENDIAN)
1421 #elif defined(__LITTLE_ENDIAN)
1427 #if defined(__BIG_ENDIAN)
1430 #define ISCSI_TMF_RESPONSE_INDEX (0x3FFF<<0)
1431 #define ISCSI_TMF_RESPONSE_INDEX_SHIFT 0
1432 #define ISCSI_TMF_RESPONSE_TYPE (0x3<<14)
1433 #define ISCSI_TMF_RESPONSE_TYPE_SHIFT 14
1434 #elif defined(__LITTLE_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
1448 struct bnx2i_text_response
{
1449 #if defined(__BIG_ENDIAN)
1452 #define ISCSI_TEXT_RESPONSE_RESERVED1 (0x3F<<0)
1453 #define ISCSI_TEXT_RESPONSE_RESERVED1_SHIFT 0
1454 #define ISCSI_TEXT_RESPONSE_CONT (0x1<<6)
1455 #define ISCSI_TEXT_RESPONSE_CONT_SHIFT 6
1456 #define ISCSI_TEXT_RESPONSE_FINAL (0x1<<7)
1457 #define ISCSI_TEXT_RESPONSE_FINAL_SHIFT 7
1459 #elif defined(__LITTLE_ENDIAN)
1462 #define ISCSI_TEXT_RESPONSE_RESERVED1 (0x3F<<0)
1463 #define ISCSI_TEXT_RESPONSE_RESERVED1_SHIFT 0
1464 #define ISCSI_TEXT_RESPONSE_CONT (0x1<<6)
1465 #define ISCSI_TEXT_RESPONSE_CONT_SHIFT 6
1466 #define ISCSI_TEXT_RESPONSE_FINAL (0x1<<7)
1467 #define ISCSI_TEXT_RESPONSE_FINAL_SHIFT 7
1475 #if defined(__BIG_ENDIAN)
1479 #elif defined(__LITTLE_ENDIAN)
1487 #if defined(__BIG_ENDIAN)
1490 #define ISCSI_TEXT_RESPONSE_INDEX (0x3FFF<<0)
1491 #define ISCSI_TEXT_RESPONSE_INDEX_SHIFT 0
1492 #define ISCSI_TEXT_RESPONSE_TYPE (0x3<<14)
1493 #define ISCSI_TEXT_RESPONSE_TYPE_SHIFT 14
1494 #elif defined(__LITTLE_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
1508 union iscsi_response
{
1509 struct bnx2i_cmd_response cmd
;
1510 struct bnx2i_tmf_response tmf
;
1511 struct bnx2i_login_response login_resp
;
1512 struct bnx2i_text_response text
;
1513 struct bnx2i_logout_response logout_resp
;
1514 struct bnx2i_cleanup_response cleanup
;
1515 struct bnx2i_reject_msg reject
;
1516 struct bnx2i_async_msg async
;
1517 struct bnx2i_nop_in_msg nop_in
;
1520 #endif /* __57XX_ISCSI_HSI_LINUX_LE__ */