1 /* 57xx_iscsi_hsi.h: Broadcom NetXtreme II iSCSI HSI.
3 * Copyright (c) 2006 - 2013 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_TIME_STAMPS_ENABLE (0x1<<6)
585 #define ISCSI_KWQE_INIT1_TIME_STAMPS_ENABLE_SHIFT 6
586 #define ISCSI_KWQE_INIT1_RESERVED1 (0x1<<7)
587 #define ISCSI_KWQE_INIT1_RESERVED1_SHIFT 7
589 #elif defined(__LITTLE_ENDIAN)
592 #define ISCSI_KWQE_INIT1_PAGE_SIZE (0xF<<0)
593 #define ISCSI_KWQE_INIT1_PAGE_SIZE_SHIFT 0
594 #define ISCSI_KWQE_INIT1_DELAYED_ACK_ENABLE (0x1<<4)
595 #define ISCSI_KWQE_INIT1_DELAYED_ACK_ENABLE_SHIFT 4
596 #define ISCSI_KWQE_INIT1_KEEP_ALIVE_ENABLE (0x1<<5)
597 #define ISCSI_KWQE_INIT1_KEEP_ALIVE_ENABLE_SHIFT 5
598 #define ISCSI_KWQE_INIT1_TIME_STAMPS_ENABLE (0x1<<6)
599 #define ISCSI_KWQE_INIT1_TIME_STAMPS_ENABLE_SHIFT 6
600 #define ISCSI_KWQE_INIT1_RESERVED1 (0x1<<7)
601 #define ISCSI_KWQE_INIT1_RESERVED1_SHIFT 7
602 u8 cq_log_wqes_per_page
;
604 #if defined(__BIG_ENDIAN)
607 #elif defined(__LITTLE_ENDIAN)
611 #if defined(__BIG_ENDIAN)
614 #elif defined(__LITTLE_ENDIAN)
621 * iSCSI firmware init request 2
623 struct iscsi_kwqe_init2
{
624 #if defined(__BIG_ENDIAN)
625 struct iscsi_kwqe_header hdr
;
627 #elif defined(__LITTLE_ENDIAN)
629 struct iscsi_kwqe_header hdr
;
631 u32 error_bit_map
[2];
636 * Initial iSCSI connection offload request 1
638 struct iscsi_kwqe_conn_offload1
{
639 #if defined(__BIG_ENDIAN)
640 struct iscsi_kwqe_header hdr
;
642 #elif defined(__LITTLE_ENDIAN)
644 struct iscsi_kwqe_header hdr
;
646 u32 sq_page_table_addr_lo
;
647 u32 sq_page_table_addr_hi
;
648 u32 cq_page_table_addr_lo
;
649 u32 cq_page_table_addr_hi
;
654 * iSCSI Page Table Entry (PTE)
662 * Initial iSCSI connection offload request 2
664 struct iscsi_kwqe_conn_offload2
{
665 #if defined(__BIG_ENDIAN)
666 struct iscsi_kwqe_header hdr
;
668 #elif defined(__LITTLE_ENDIAN)
670 struct iscsi_kwqe_header hdr
;
672 u32 rq_page_table_addr_lo
;
673 u32 rq_page_table_addr_hi
;
674 struct iscsi_pte sq_first_pte
;
675 struct iscsi_pte cq_first_pte
;
676 u32 num_additional_wqes
;
681 * Initial iSCSI connection offload request 3
683 struct iscsi_kwqe_conn_offload3
{
684 #if defined(__BIG_ENDIAN)
685 struct iscsi_kwqe_header hdr
;
687 #elif defined(__LITTLE_ENDIAN)
689 struct iscsi_kwqe_header hdr
;
692 struct iscsi_pte qp_first_pte
[3];
697 * iSCSI connection update request
699 struct iscsi_kwqe_conn_update
{
700 #if defined(__BIG_ENDIAN)
701 struct iscsi_kwqe_header hdr
;
703 #elif defined(__LITTLE_ENDIAN)
705 struct iscsi_kwqe_header hdr
;
707 #if defined(__BIG_ENDIAN)
708 u8 session_error_recovery_level
;
709 u8 max_outstanding_r2ts
;
712 #define ISCSI_KWQE_CONN_UPDATE_HEADER_DIGEST (0x1<<0)
713 #define ISCSI_KWQE_CONN_UPDATE_HEADER_DIGEST_SHIFT 0
714 #define ISCSI_KWQE_CONN_UPDATE_DATA_DIGEST (0x1<<1)
715 #define ISCSI_KWQE_CONN_UPDATE_DATA_DIGEST_SHIFT 1
716 #define ISCSI_KWQE_CONN_UPDATE_INITIAL_R2T (0x1<<2)
717 #define ISCSI_KWQE_CONN_UPDATE_INITIAL_R2T_SHIFT 2
718 #define ISCSI_KWQE_CONN_UPDATE_IMMEDIATE_DATA (0x1<<3)
719 #define ISCSI_KWQE_CONN_UPDATE_IMMEDIATE_DATA_SHIFT 3
720 #define ISCSI_KWQE_CONN_UPDATE_OOO_SUPPORT_MODE (0x3<<4)
721 #define ISCSI_KWQE_CONN_UPDATE_OOO_SUPPORT_MODE_SHIFT 4
722 #define ISCSI_KWQE_CONN_UPDATE_RESERVED1 (0x3<<6)
723 #define ISCSI_KWQE_CONN_UPDATE_RESERVED1_SHIFT 6
724 #elif defined(__LITTLE_ENDIAN)
726 #define ISCSI_KWQE_CONN_UPDATE_HEADER_DIGEST (0x1<<0)
727 #define ISCSI_KWQE_CONN_UPDATE_HEADER_DIGEST_SHIFT 0
728 #define ISCSI_KWQE_CONN_UPDATE_DATA_DIGEST (0x1<<1)
729 #define ISCSI_KWQE_CONN_UPDATE_DATA_DIGEST_SHIFT 1
730 #define ISCSI_KWQE_CONN_UPDATE_INITIAL_R2T (0x1<<2)
731 #define ISCSI_KWQE_CONN_UPDATE_INITIAL_R2T_SHIFT 2
732 #define ISCSI_KWQE_CONN_UPDATE_IMMEDIATE_DATA (0x1<<3)
733 #define ISCSI_KWQE_CONN_UPDATE_IMMEDIATE_DATA_SHIFT 3
734 #define ISCSI_KWQE_CONN_UPDATE_OOO_SUPPORT_MODE (0x3<<4)
735 #define ISCSI_KWQE_CONN_UPDATE_OOO_SUPPORT_MODE_SHIFT 4
736 #define ISCSI_KWQE_CONN_UPDATE_RESERVED1 (0x3<<6)
737 #define ISCSI_KWQE_CONN_UPDATE_RESERVED1_SHIFT 6
739 u8 max_outstanding_r2ts
;
740 u8 session_error_recovery_level
;
743 u32 max_send_pdu_length
;
744 u32 max_recv_pdu_length
;
745 u32 first_burst_length
;
746 u32 max_burst_length
;
751 * iSCSI destroy connection request
753 struct iscsi_kwqe_conn_destroy
{
754 #if defined(__BIG_ENDIAN)
755 struct iscsi_kwqe_header hdr
;
757 #elif defined(__LITTLE_ENDIAN)
759 struct iscsi_kwqe_header hdr
;
769 struct iscsi_kwqe_init1 init1
;
770 struct iscsi_kwqe_init2 init2
;
771 struct iscsi_kwqe_conn_offload1 conn_offload1
;
772 struct iscsi_kwqe_conn_offload2 conn_offload2
;
773 struct iscsi_kwqe_conn_update conn_update
;
774 struct iscsi_kwqe_conn_destroy conn_destroy
;
780 struct bnx2i_login_request
{
781 #if defined(__BIG_ENDIAN)
784 #define ISCSI_LOGIN_REQUEST_NEXT_STAGE (0x3<<0)
785 #define ISCSI_LOGIN_REQUEST_NEXT_STAGE_SHIFT 0
786 #define ISCSI_LOGIN_REQUEST_CURRENT_STAGE (0x3<<2)
787 #define ISCSI_LOGIN_REQUEST_CURRENT_STAGE_SHIFT 2
788 #define ISCSI_LOGIN_REQUEST_RESERVED0 (0x3<<4)
789 #define ISCSI_LOGIN_REQUEST_RESERVED0_SHIFT 4
790 #define ISCSI_LOGIN_REQUEST_CONT (0x1<<6)
791 #define ISCSI_LOGIN_REQUEST_CONT_SHIFT 6
792 #define ISCSI_LOGIN_REQUEST_TRANSIT (0x1<<7)
793 #define ISCSI_LOGIN_REQUEST_TRANSIT_SHIFT 7
796 #elif defined(__LITTLE_ENDIAN)
800 #define ISCSI_LOGIN_REQUEST_NEXT_STAGE (0x3<<0)
801 #define ISCSI_LOGIN_REQUEST_NEXT_STAGE_SHIFT 0
802 #define ISCSI_LOGIN_REQUEST_CURRENT_STAGE (0x3<<2)
803 #define ISCSI_LOGIN_REQUEST_CURRENT_STAGE_SHIFT 2
804 #define ISCSI_LOGIN_REQUEST_RESERVED0 (0x3<<4)
805 #define ISCSI_LOGIN_REQUEST_RESERVED0_SHIFT 4
806 #define ISCSI_LOGIN_REQUEST_CONT (0x1<<6)
807 #define ISCSI_LOGIN_REQUEST_CONT_SHIFT 6
808 #define ISCSI_LOGIN_REQUEST_TRANSIT (0x1<<7)
809 #define ISCSI_LOGIN_REQUEST_TRANSIT_SHIFT 7
814 #if defined(__BIG_ENDIAN)
817 #elif defined(__LITTLE_ENDIAN)
821 #if defined(__BIG_ENDIAN)
824 #define ISCSI_LOGIN_REQUEST_INDEX (0x3FFF<<0)
825 #define ISCSI_LOGIN_REQUEST_INDEX_SHIFT 0
826 #define ISCSI_LOGIN_REQUEST_TYPE (0x3<<14)
827 #define ISCSI_LOGIN_REQUEST_TYPE_SHIFT 14
828 #elif defined(__LITTLE_ENDIAN)
830 #define ISCSI_LOGIN_REQUEST_INDEX (0x3FFF<<0)
831 #define ISCSI_LOGIN_REQUEST_INDEX_SHIFT 0
832 #define ISCSI_LOGIN_REQUEST_TYPE (0x3<<14)
833 #define ISCSI_LOGIN_REQUEST_TYPE_SHIFT 14
836 #if defined(__BIG_ENDIAN)
839 #elif defined(__LITTLE_ENDIAN)
846 u32 resp_bd_list_addr_lo
;
847 u32 resp_bd_list_addr_hi
;
849 #define ISCSI_LOGIN_REQUEST_RESP_BUFFER_LENGTH (0xFFFFFF<<0)
850 #define ISCSI_LOGIN_REQUEST_RESP_BUFFER_LENGTH_SHIFT 0
851 #define ISCSI_LOGIN_REQUEST_NUM_RESP_BDS (0xFF<<24)
852 #define ISCSI_LOGIN_REQUEST_NUM_RESP_BDS_SHIFT 24
853 #if defined(__BIG_ENDIAN)
857 #define ISCSI_LOGIN_REQUEST_RESERVED5 (0x3<<0)
858 #define ISCSI_LOGIN_REQUEST_RESERVED5_SHIFT 0
859 #define ISCSI_LOGIN_REQUEST_UPDATE_EXP_STAT_SN (0x1<<2)
860 #define ISCSI_LOGIN_REQUEST_UPDATE_EXP_STAT_SN_SHIFT 2
861 #define ISCSI_LOGIN_REQUEST_RESERVED6 (0x1F<<3)
862 #define ISCSI_LOGIN_REQUEST_RESERVED6_SHIFT 3
863 #elif defined(__LITTLE_ENDIAN)
865 #define ISCSI_LOGIN_REQUEST_RESERVED5 (0x3<<0)
866 #define ISCSI_LOGIN_REQUEST_RESERVED5_SHIFT 0
867 #define ISCSI_LOGIN_REQUEST_UPDATE_EXP_STAT_SN (0x1<<2)
868 #define ISCSI_LOGIN_REQUEST_UPDATE_EXP_STAT_SN_SHIFT 2
869 #define ISCSI_LOGIN_REQUEST_RESERVED6 (0x1F<<3)
870 #define ISCSI_LOGIN_REQUEST_RESERVED6_SHIFT 3
876 #if defined(__BIG_ENDIAN)
881 #elif defined(__LITTLE_ENDIAN)
893 struct bnx2i_login_response
{
894 #if defined(__BIG_ENDIAN)
897 #define ISCSI_LOGIN_RESPONSE_NEXT_STAGE (0x3<<0)
898 #define ISCSI_LOGIN_RESPONSE_NEXT_STAGE_SHIFT 0
899 #define ISCSI_LOGIN_RESPONSE_CURRENT_STAGE (0x3<<2)
900 #define ISCSI_LOGIN_RESPONSE_CURRENT_STAGE_SHIFT 2
901 #define ISCSI_LOGIN_RESPONSE_RESERVED0 (0x3<<4)
902 #define ISCSI_LOGIN_RESPONSE_RESERVED0_SHIFT 4
903 #define ISCSI_LOGIN_RESPONSE_CONT (0x1<<6)
904 #define ISCSI_LOGIN_RESPONSE_CONT_SHIFT 6
905 #define ISCSI_LOGIN_RESPONSE_TRANSIT (0x1<<7)
906 #define ISCSI_LOGIN_RESPONSE_TRANSIT_SHIFT 7
909 #elif defined(__LITTLE_ENDIAN)
913 #define ISCSI_LOGIN_RESPONSE_NEXT_STAGE (0x3<<0)
914 #define ISCSI_LOGIN_RESPONSE_NEXT_STAGE_SHIFT 0
915 #define ISCSI_LOGIN_RESPONSE_CURRENT_STAGE (0x3<<2)
916 #define ISCSI_LOGIN_RESPONSE_CURRENT_STAGE_SHIFT 2
917 #define ISCSI_LOGIN_RESPONSE_RESERVED0 (0x3<<4)
918 #define ISCSI_LOGIN_RESPONSE_RESERVED0_SHIFT 4
919 #define ISCSI_LOGIN_RESPONSE_CONT (0x1<<6)
920 #define ISCSI_LOGIN_RESPONSE_CONT_SHIFT 6
921 #define ISCSI_LOGIN_RESPONSE_TRANSIT (0x1<<7)
922 #define ISCSI_LOGIN_RESPONSE_TRANSIT_SHIFT 7
929 #if defined(__BIG_ENDIAN)
933 #elif defined(__LITTLE_ENDIAN)
940 #if defined(__BIG_ENDIAN)
943 #elif defined(__LITTLE_ENDIAN)
947 #if defined(__BIG_ENDIAN)
951 #elif defined(__LITTLE_ENDIAN)
957 #if defined(__BIG_ENDIAN)
960 #define ISCSI_LOGIN_RESPONSE_INDEX (0x3FFF<<0)
961 #define ISCSI_LOGIN_RESPONSE_INDEX_SHIFT 0
962 #define ISCSI_LOGIN_RESPONSE_TYPE (0x3<<14)
963 #define ISCSI_LOGIN_RESPONSE_TYPE_SHIFT 14
964 #elif defined(__LITTLE_ENDIAN)
966 #define ISCSI_LOGIN_RESPONSE_INDEX (0x3FFF<<0)
967 #define ISCSI_LOGIN_RESPONSE_INDEX_SHIFT 0
968 #define ISCSI_LOGIN_RESPONSE_TYPE (0x3<<14)
969 #define ISCSI_LOGIN_RESPONSE_TYPE_SHIFT 14
977 * iSCSI Logout SQ WQE
979 struct bnx2i_logout_request
{
980 #if defined(__BIG_ENDIAN)
983 #define ISCSI_LOGOUT_REQUEST_REASON (0x7F<<0)
984 #define ISCSI_LOGOUT_REQUEST_REASON_SHIFT 0
985 #define ISCSI_LOGOUT_REQUEST_ALWAYS_ONE (0x1<<7)
986 #define ISCSI_LOGOUT_REQUEST_ALWAYS_ONE_SHIFT 7
988 #elif defined(__LITTLE_ENDIAN)
991 #define ISCSI_LOGOUT_REQUEST_REASON (0x7F<<0)
992 #define ISCSI_LOGOUT_REQUEST_REASON_SHIFT 0
993 #define ISCSI_LOGOUT_REQUEST_ALWAYS_ONE (0x1<<7)
994 #define ISCSI_LOGOUT_REQUEST_ALWAYS_ONE_SHIFT 7
999 #if defined(__BIG_ENDIAN)
1002 #define ISCSI_LOGOUT_REQUEST_INDEX (0x3FFF<<0)
1003 #define ISCSI_LOGOUT_REQUEST_INDEX_SHIFT 0
1004 #define ISCSI_LOGOUT_REQUEST_TYPE (0x3<<14)
1005 #define ISCSI_LOGOUT_REQUEST_TYPE_SHIFT 14
1006 #elif defined(__LITTLE_ENDIAN)
1008 #define ISCSI_LOGOUT_REQUEST_INDEX (0x3FFF<<0)
1009 #define ISCSI_LOGOUT_REQUEST_INDEX_SHIFT 0
1010 #define ISCSI_LOGOUT_REQUEST_TYPE (0x3<<14)
1011 #define ISCSI_LOGOUT_REQUEST_TYPE_SHIFT 14
1014 #if defined(__BIG_ENDIAN)
1017 #elif defined(__LITTLE_ENDIAN)
1024 u32 bd_list_addr_lo
;
1025 u32 bd_list_addr_hi
;
1026 #if defined(__BIG_ENDIAN)
1031 #elif defined(__LITTLE_ENDIAN)
1043 struct bnx2i_logout_response
{
1044 #if defined(__BIG_ENDIAN)
1049 #elif defined(__LITTLE_ENDIAN)
1059 #if defined(__BIG_ENDIAN)
1063 #elif defined(__LITTLE_ENDIAN)
1069 #if defined(__BIG_ENDIAN)
1072 #elif defined(__LITTLE_ENDIAN)
1077 #if defined(__BIG_ENDIAN)
1080 #define ISCSI_LOGOUT_RESPONSE_INDEX (0x3FFF<<0)
1081 #define ISCSI_LOGOUT_RESPONSE_INDEX_SHIFT 0
1082 #define ISCSI_LOGOUT_RESPONSE_TYPE (0x3<<14)
1083 #define ISCSI_LOGOUT_RESPONSE_TYPE_SHIFT 14
1084 #elif defined(__LITTLE_ENDIAN)
1086 #define ISCSI_LOGOUT_RESPONSE_INDEX (0x3FFF<<0)
1087 #define ISCSI_LOGOUT_RESPONSE_INDEX_SHIFT 0
1088 #define ISCSI_LOGOUT_RESPONSE_TYPE (0x3<<14)
1089 #define ISCSI_LOGOUT_RESPONSE_TYPE_SHIFT 14
1099 struct bnx2i_nop_in_msg
{
1100 #if defined(__BIG_ENDIAN)
1104 #elif defined(__LITTLE_ENDIAN)
1114 #if defined(__BIG_ENDIAN)
1118 #elif defined(__LITTLE_ENDIAN)
1126 #if defined(__BIG_ENDIAN)
1129 #define ISCSI_NOP_IN_MSG_INDEX (0x3FFF<<0)
1130 #define ISCSI_NOP_IN_MSG_INDEX_SHIFT 0
1131 #define ISCSI_NOP_IN_MSG_TYPE (0x3<<14)
1132 #define ISCSI_NOP_IN_MSG_TYPE_SHIFT 14
1133 #elif defined(__LITTLE_ENDIAN)
1135 #define ISCSI_NOP_IN_MSG_INDEX (0x3FFF<<0)
1136 #define ISCSI_NOP_IN_MSG_INDEX_SHIFT 0
1137 #define ISCSI_NOP_IN_MSG_TYPE (0x3<<14)
1138 #define ISCSI_NOP_IN_MSG_TYPE_SHIFT 14
1146 * iSCSI NOP-OUT SQ WQE
1148 struct bnx2i_nop_out_request
{
1149 #if defined(__BIG_ENDIAN)
1152 #define ISCSI_NOP_OUT_REQUEST_RESERVED1 (0x7F<<0)
1153 #define ISCSI_NOP_OUT_REQUEST_RESERVED1_SHIFT 0
1154 #define ISCSI_NOP_OUT_REQUEST_ALWAYS_ONE (0x1<<7)
1155 #define ISCSI_NOP_OUT_REQUEST_ALWAYS_ONE_SHIFT 7
1157 #elif defined(__LITTLE_ENDIAN)
1160 #define ISCSI_NOP_OUT_REQUEST_RESERVED1 (0x7F<<0)
1161 #define ISCSI_NOP_OUT_REQUEST_RESERVED1_SHIFT 0
1162 #define ISCSI_NOP_OUT_REQUEST_ALWAYS_ONE (0x1<<7)
1163 #define ISCSI_NOP_OUT_REQUEST_ALWAYS_ONE_SHIFT 7
1168 #if defined(__BIG_ENDIAN)
1171 #define ISCSI_NOP_OUT_REQUEST_INDEX (0x3FFF<<0)
1172 #define ISCSI_NOP_OUT_REQUEST_INDEX_SHIFT 0
1173 #define ISCSI_NOP_OUT_REQUEST_TYPE (0x3<<14)
1174 #define ISCSI_NOP_OUT_REQUEST_TYPE_SHIFT 14
1175 #elif defined(__LITTLE_ENDIAN)
1177 #define ISCSI_NOP_OUT_REQUEST_INDEX (0x3FFF<<0)
1178 #define ISCSI_NOP_OUT_REQUEST_INDEX_SHIFT 0
1179 #define ISCSI_NOP_OUT_REQUEST_TYPE (0x3<<14)
1180 #define ISCSI_NOP_OUT_REQUEST_TYPE_SHIFT 14
1186 u32 resp_bd_list_addr_lo
;
1187 u32 resp_bd_list_addr_hi
;
1189 #define ISCSI_NOP_OUT_REQUEST_RESP_BUFFER_LENGTH (0xFFFFFF<<0)
1190 #define ISCSI_NOP_OUT_REQUEST_RESP_BUFFER_LENGTH_SHIFT 0
1191 #define ISCSI_NOP_OUT_REQUEST_NUM_RESP_BDS (0xFF<<24)
1192 #define ISCSI_NOP_OUT_REQUEST_NUM_RESP_BDS_SHIFT 24
1193 #if defined(__BIG_ENDIAN)
1197 #define ISCSI_NOP_OUT_REQUEST_RESERVED4 (0x1<<0)
1198 #define ISCSI_NOP_OUT_REQUEST_RESERVED4_SHIFT 0
1199 #define ISCSI_NOP_OUT_REQUEST_LOCAL_COMPLETION (0x1<<1)
1200 #define ISCSI_NOP_OUT_REQUEST_LOCAL_COMPLETION_SHIFT 1
1201 #define ISCSI_NOP_OUT_REQUEST_ZERO_FILL (0x3F<<2)
1202 #define ISCSI_NOP_OUT_REQUEST_ZERO_FILL_SHIFT 2
1203 #elif defined(__LITTLE_ENDIAN)
1205 #define ISCSI_NOP_OUT_REQUEST_RESERVED4 (0x1<<0)
1206 #define ISCSI_NOP_OUT_REQUEST_RESERVED4_SHIFT 0
1207 #define ISCSI_NOP_OUT_REQUEST_LOCAL_COMPLETION (0x1<<1)
1208 #define ISCSI_NOP_OUT_REQUEST_LOCAL_COMPLETION_SHIFT 1
1209 #define ISCSI_NOP_OUT_REQUEST_ZERO_FILL (0x3F<<2)
1210 #define ISCSI_NOP_OUT_REQUEST_ZERO_FILL_SHIFT 2
1214 u32 bd_list_addr_lo
;
1215 u32 bd_list_addr_hi
;
1216 #if defined(__BIG_ENDIAN)
1221 #elif defined(__LITTLE_ENDIAN)
1232 struct bnx2i_reject_msg
{
1233 #if defined(__BIG_ENDIAN)
1238 #elif defined(__LITTLE_ENDIAN)
1248 #if defined(__BIG_ENDIAN)
1252 #elif defined(__LITTLE_ENDIAN)
1262 * bnx2i iSCSI TMF SQ WQE
1264 struct bnx2i_tmf_request
{
1265 #if defined(__BIG_ENDIAN)
1268 #define ISCSI_TMF_REQUEST_FUNCTION (0x7F<<0)
1269 #define ISCSI_TMF_REQUEST_FUNCTION_SHIFT 0
1270 #define ISCSI_TMF_REQUEST_ALWAYS_ONE (0x1<<7)
1271 #define ISCSI_TMF_REQUEST_ALWAYS_ONE_SHIFT 7
1273 #elif defined(__LITTLE_ENDIAN)
1276 #define ISCSI_TMF_REQUEST_FUNCTION (0x7F<<0)
1277 #define ISCSI_TMF_REQUEST_FUNCTION_SHIFT 0
1278 #define ISCSI_TMF_REQUEST_ALWAYS_ONE (0x1<<7)
1279 #define ISCSI_TMF_REQUEST_ALWAYS_ONE_SHIFT 7
1284 #if defined(__BIG_ENDIAN)
1287 #define ISCSI_TMF_REQUEST_INDEX (0x3FFF<<0)
1288 #define ISCSI_TMF_REQUEST_INDEX_SHIFT 0
1289 #define ISCSI_TMF_REQUEST_TYPE (0x3<<14)
1290 #define ISCSI_TMF_REQUEST_TYPE_SHIFT 14
1291 #elif defined(__LITTLE_ENDIAN)
1293 #define ISCSI_TMF_REQUEST_INDEX (0x3FFF<<0)
1294 #define ISCSI_TMF_REQUEST_INDEX_SHIFT 0
1295 #define ISCSI_TMF_REQUEST_TYPE (0x3<<14)
1296 #define ISCSI_TMF_REQUEST_TYPE_SHIFT 14
1305 u32 bd_list_addr_lo
;
1306 u32 bd_list_addr_hi
;
1307 #if defined(__BIG_ENDIAN)
1312 #elif defined(__LITTLE_ENDIAN)
1323 struct bnx2i_text_request
{
1324 #if defined(__BIG_ENDIAN)
1327 #define ISCSI_TEXT_REQUEST_RESERVED1 (0x3F<<0)
1328 #define ISCSI_TEXT_REQUEST_RESERVED1_SHIFT 0
1329 #define ISCSI_TEXT_REQUEST_CONT (0x1<<6)
1330 #define ISCSI_TEXT_REQUEST_CONT_SHIFT 6
1331 #define ISCSI_TEXT_REQUEST_FINAL (0x1<<7)
1332 #define ISCSI_TEXT_REQUEST_FINAL_SHIFT 7
1334 #elif defined(__LITTLE_ENDIAN)
1337 #define ISCSI_TEXT_REQUEST_RESERVED1 (0x3F<<0)
1338 #define ISCSI_TEXT_REQUEST_RESERVED1_SHIFT 0
1339 #define ISCSI_TEXT_REQUEST_CONT (0x1<<6)
1340 #define ISCSI_TEXT_REQUEST_CONT_SHIFT 6
1341 #define ISCSI_TEXT_REQUEST_FINAL (0x1<<7)
1342 #define ISCSI_TEXT_REQUEST_FINAL_SHIFT 7
1347 #if defined(__BIG_ENDIAN)
1350 #define ISCSI_TEXT_REQUEST_INDEX (0x3FFF<<0)
1351 #define ISCSI_TEXT_REQUEST_INDEX_SHIFT 0
1352 #define ISCSI_TEXT_REQUEST_TYPE (0x3<<14)
1353 #define ISCSI_TEXT_REQUEST_TYPE_SHIFT 14
1354 #elif defined(__LITTLE_ENDIAN)
1356 #define ISCSI_TEXT_REQUEST_INDEX (0x3FFF<<0)
1357 #define ISCSI_TEXT_REQUEST_INDEX_SHIFT 0
1358 #define ISCSI_TEXT_REQUEST_TYPE (0x3<<14)
1359 #define ISCSI_TEXT_REQUEST_TYPE_SHIFT 14
1365 u32 resp_bd_list_addr_lo
;
1366 u32 resp_bd_list_addr_hi
;
1368 #define ISCSI_TEXT_REQUEST_RESP_BUFFER_LENGTH (0xFFFFFF<<0)
1369 #define ISCSI_TEXT_REQUEST_RESP_BUFFER_LENGTH_SHIFT 0
1370 #define ISCSI_TEXT_REQUEST_NUM_RESP_BDS (0xFF<<24)
1371 #define ISCSI_TEXT_REQUEST_NUM_RESP_BDS_SHIFT 24
1373 u32 bd_list_addr_lo
;
1374 u32 bd_list_addr_hi
;
1375 #if defined(__BIG_ENDIAN)
1380 #elif defined(__LITTLE_ENDIAN)
1391 union iscsi_request
{
1392 struct bnx2i_cmd_request cmd
;
1393 struct bnx2i_tmf_request tmf
;
1394 struct bnx2i_nop_out_request nop_out
;
1395 struct bnx2i_login_request login_req
;
1396 struct bnx2i_text_request text
;
1397 struct bnx2i_logout_request logout_req
;
1398 struct bnx2i_cleanup_request cleanup
;
1405 struct bnx2i_tmf_response
{
1406 #if defined(__BIG_ENDIAN)
1411 #elif defined(__LITTLE_ENDIAN)
1421 #if defined(__BIG_ENDIAN)
1425 #elif defined(__LITTLE_ENDIAN)
1431 #if defined(__BIG_ENDIAN)
1434 #define ISCSI_TMF_RESPONSE_INDEX (0x3FFF<<0)
1435 #define ISCSI_TMF_RESPONSE_INDEX_SHIFT 0
1436 #define ISCSI_TMF_RESPONSE_TYPE (0x3<<14)
1437 #define ISCSI_TMF_RESPONSE_TYPE_SHIFT 14
1438 #elif defined(__LITTLE_ENDIAN)
1440 #define ISCSI_TMF_RESPONSE_INDEX (0x3FFF<<0)
1441 #define ISCSI_TMF_RESPONSE_INDEX_SHIFT 0
1442 #define ISCSI_TMF_RESPONSE_TYPE (0x3<<14)
1443 #define ISCSI_TMF_RESPONSE_TYPE_SHIFT 14
1452 struct bnx2i_text_response
{
1453 #if defined(__BIG_ENDIAN)
1456 #define ISCSI_TEXT_RESPONSE_RESERVED1 (0x3F<<0)
1457 #define ISCSI_TEXT_RESPONSE_RESERVED1_SHIFT 0
1458 #define ISCSI_TEXT_RESPONSE_CONT (0x1<<6)
1459 #define ISCSI_TEXT_RESPONSE_CONT_SHIFT 6
1460 #define ISCSI_TEXT_RESPONSE_FINAL (0x1<<7)
1461 #define ISCSI_TEXT_RESPONSE_FINAL_SHIFT 7
1463 #elif defined(__LITTLE_ENDIAN)
1466 #define ISCSI_TEXT_RESPONSE_RESERVED1 (0x3F<<0)
1467 #define ISCSI_TEXT_RESPONSE_RESERVED1_SHIFT 0
1468 #define ISCSI_TEXT_RESPONSE_CONT (0x1<<6)
1469 #define ISCSI_TEXT_RESPONSE_CONT_SHIFT 6
1470 #define ISCSI_TEXT_RESPONSE_FINAL (0x1<<7)
1471 #define ISCSI_TEXT_RESPONSE_FINAL_SHIFT 7
1479 #if defined(__BIG_ENDIAN)
1483 #elif defined(__LITTLE_ENDIAN)
1491 #if defined(__BIG_ENDIAN)
1494 #define ISCSI_TEXT_RESPONSE_INDEX (0x3FFF<<0)
1495 #define ISCSI_TEXT_RESPONSE_INDEX_SHIFT 0
1496 #define ISCSI_TEXT_RESPONSE_TYPE (0x3<<14)
1497 #define ISCSI_TEXT_RESPONSE_TYPE_SHIFT 14
1498 #elif defined(__LITTLE_ENDIAN)
1500 #define ISCSI_TEXT_RESPONSE_INDEX (0x3FFF<<0)
1501 #define ISCSI_TEXT_RESPONSE_INDEX_SHIFT 0
1502 #define ISCSI_TEXT_RESPONSE_TYPE (0x3<<14)
1503 #define ISCSI_TEXT_RESPONSE_TYPE_SHIFT 14
1512 union iscsi_response
{
1513 struct bnx2i_cmd_response cmd
;
1514 struct bnx2i_tmf_response tmf
;
1515 struct bnx2i_login_response login_resp
;
1516 struct bnx2i_text_response text
;
1517 struct bnx2i_logout_response logout_resp
;
1518 struct bnx2i_cleanup_response cleanup
;
1519 struct bnx2i_reject_msg reject
;
1520 struct bnx2i_async_msg async
;
1521 struct bnx2i_nop_in_msg nop_in
;
1524 #endif /* __57XX_ISCSI_HSI_LINUX_LE__ */