1 /* 57xx_iscsi_hsi.h: Broadcom NetXtreme II iSCSI HSI.
3 * Copyright (c) 2006 - 2009 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)
11 #ifndef __57XX_ISCSI_HSI_LINUX_LE__
12 #define __57XX_ISCSI_HSI_LINUX_LE__
17 struct bnx2i_async_msg
{
18 #if defined(__BIG_ENDIAN)
22 #elif defined(__LITTLE_ENDIAN)
31 #if defined(__BIG_ENDIAN)
35 #elif defined(__LITTLE_ENDIAN)
42 #if defined(__BIG_ENDIAN)
46 #elif defined(__LITTLE_ENDIAN)
51 #if defined(__BIG_ENDIAN)
54 #elif defined(__LITTLE_ENDIAN)
64 * iSCSI Buffer Descriptor (BD)
69 #if defined(__BIG_ENDIAN)
72 #elif defined(__LITTLE_ENDIAN)
76 #if defined(__BIG_ENDIAN)
79 #define ISCSI_BD_RESERVED1 (0x3F<<0)
80 #define ISCSI_BD_RESERVED1_SHIFT 0
81 #define ISCSI_BD_LAST_IN_BD_CHAIN (0x1<<6)
82 #define ISCSI_BD_LAST_IN_BD_CHAIN_SHIFT 6
83 #define ISCSI_BD_FIRST_IN_BD_CHAIN (0x1<<7)
84 #define ISCSI_BD_FIRST_IN_BD_CHAIN_SHIFT 7
85 #define ISCSI_BD_RESERVED2 (0xFF<<8)
86 #define ISCSI_BD_RESERVED2_SHIFT 8
87 #elif defined(__LITTLE_ENDIAN)
89 #define ISCSI_BD_RESERVED1 (0x3F<<0)
90 #define ISCSI_BD_RESERVED1_SHIFT 0
91 #define ISCSI_BD_LAST_IN_BD_CHAIN (0x1<<6)
92 #define ISCSI_BD_LAST_IN_BD_CHAIN_SHIFT 6
93 #define ISCSI_BD_FIRST_IN_BD_CHAIN (0x1<<7)
94 #define ISCSI_BD_FIRST_IN_BD_CHAIN_SHIFT 7
95 #define ISCSI_BD_RESERVED2 (0xFF<<8)
96 #define ISCSI_BD_RESERVED2_SHIFT 8
103 * iSCSI Cleanup SQ WQE
105 struct bnx2i_cleanup_request
{
106 #if defined(__BIG_ENDIAN)
110 #elif defined(__LITTLE_ENDIAN)
116 #if defined(__BIG_ENDIAN)
119 #define ISCSI_CLEANUP_REQUEST_INDEX (0x3FFF<<0)
120 #define ISCSI_CLEANUP_REQUEST_INDEX_SHIFT 0
121 #define ISCSI_CLEANUP_REQUEST_TYPE (0x3<<14)
122 #define ISCSI_CLEANUP_REQUEST_TYPE_SHIFT 14
123 #elif defined(__LITTLE_ENDIAN)
125 #define ISCSI_CLEANUP_REQUEST_INDEX (0x3FFF<<0)
126 #define ISCSI_CLEANUP_REQUEST_INDEX_SHIFT 0
127 #define ISCSI_CLEANUP_REQUEST_TYPE (0x3<<14)
128 #define ISCSI_CLEANUP_REQUEST_TYPE_SHIFT 14
132 #if defined(__BIG_ENDIAN)
136 #elif defined(__LITTLE_ENDIAN)
147 struct bnx2i_cleanup_response
{
148 #if defined(__BIG_ENDIAN)
152 #elif defined(__LITTLE_ENDIAN)
159 #if defined(__BIG_ENDIAN)
163 #elif defined(__LITTLE_ENDIAN)
169 #if defined(__BIG_ENDIAN)
172 #define ISCSI_CLEANUP_RESPONSE_INDEX (0x3FFF<<0)
173 #define ISCSI_CLEANUP_RESPONSE_INDEX_SHIFT 0
174 #define ISCSI_CLEANUP_RESPONSE_TYPE (0x3<<14)
175 #define ISCSI_CLEANUP_RESPONSE_TYPE_SHIFT 14
176 #elif defined(__LITTLE_ENDIAN)
178 #define ISCSI_CLEANUP_RESPONSE_INDEX (0x3FFF<<0)
179 #define ISCSI_CLEANUP_RESPONSE_INDEX_SHIFT 0
180 #define ISCSI_CLEANUP_RESPONSE_TYPE (0x3<<14)
181 #define ISCSI_CLEANUP_RESPONSE_TYPE_SHIFT 14
189 * SCSI read/write SQ WQE
191 struct bnx2i_cmd_request
{
192 #if defined(__BIG_ENDIAN)
195 #define ISCSI_CMD_REQUEST_TASK_ATTR (0x7<<0)
196 #define ISCSI_CMD_REQUEST_TASK_ATTR_SHIFT 0
197 #define ISCSI_CMD_REQUEST_RESERVED1 (0x3<<3)
198 #define ISCSI_CMD_REQUEST_RESERVED1_SHIFT 3
199 #define ISCSI_CMD_REQUEST_WRITE (0x1<<5)
200 #define ISCSI_CMD_REQUEST_WRITE_SHIFT 5
201 #define ISCSI_CMD_REQUEST_READ (0x1<<6)
202 #define ISCSI_CMD_REQUEST_READ_SHIFT 6
203 #define ISCSI_CMD_REQUEST_FINAL (0x1<<7)
204 #define ISCSI_CMD_REQUEST_FINAL_SHIFT 7
206 #elif defined(__LITTLE_ENDIAN)
209 #define ISCSI_CMD_REQUEST_TASK_ATTR (0x7<<0)
210 #define ISCSI_CMD_REQUEST_TASK_ATTR_SHIFT 0
211 #define ISCSI_CMD_REQUEST_RESERVED1 (0x3<<3)
212 #define ISCSI_CMD_REQUEST_RESERVED1_SHIFT 3
213 #define ISCSI_CMD_REQUEST_WRITE (0x1<<5)
214 #define ISCSI_CMD_REQUEST_WRITE_SHIFT 5
215 #define ISCSI_CMD_REQUEST_READ (0x1<<6)
216 #define ISCSI_CMD_REQUEST_READ_SHIFT 6
217 #define ISCSI_CMD_REQUEST_FINAL (0x1<<7)
218 #define ISCSI_CMD_REQUEST_FINAL_SHIFT 7
221 #if defined(__BIG_ENDIAN)
222 u16 ud_buffer_offset
;
223 u16 sd_buffer_offset
;
224 #elif defined(__LITTLE_ENDIAN)
225 u16 sd_buffer_offset
;
226 u16 ud_buffer_offset
;
229 #if defined(__BIG_ENDIAN)
232 #define ISCSI_CMD_REQUEST_INDEX (0x3FFF<<0)
233 #define ISCSI_CMD_REQUEST_INDEX_SHIFT 0
234 #define ISCSI_CMD_REQUEST_TYPE (0x3<<14)
235 #define ISCSI_CMD_REQUEST_TYPE_SHIFT 14
236 #elif defined(__LITTLE_ENDIAN)
238 #define ISCSI_CMD_REQUEST_INDEX (0x3FFF<<0)
239 #define ISCSI_CMD_REQUEST_INDEX_SHIFT 0
240 #define ISCSI_CMD_REQUEST_TYPE (0x3<<14)
241 #define ISCSI_CMD_REQUEST_TYPE_SHIFT 14
244 u32 total_data_transfer_length
;
251 #if defined(__BIG_ENDIAN)
253 u8 sd_start_bd_index
;
254 u8 ud_start_bd_index
;
256 #elif defined(__LITTLE_ENDIAN)
258 u8 ud_start_bd_index
;
259 u8 sd_start_bd_index
;
266 * task statistics for write response
268 struct bnx2i_write_resp_task_stat
{
273 * task statistics for read response
275 struct bnx2i_read_resp_task_stat
{
276 #if defined(__BIG_ENDIAN)
279 #elif defined(__LITTLE_ENDIAN)
286 * task statistics for iSCSI cmd response
288 union bnx2i_cmd_resp_task_stat
{
289 struct bnx2i_write_resp_task_stat write_stat
;
290 struct bnx2i_read_resp_task_stat read_stat
;
296 struct bnx2i_cmd_response
{
297 #if defined(__BIG_ENDIAN)
300 #define ISCSI_CMD_RESPONSE_RESERVED0 (0x1<<0)
301 #define ISCSI_CMD_RESPONSE_RESERVED0_SHIFT 0
302 #define ISCSI_CMD_RESPONSE_RESIDUAL_UNDERFLOW (0x1<<1)
303 #define ISCSI_CMD_RESPONSE_RESIDUAL_UNDERFLOW_SHIFT 1
304 #define ISCSI_CMD_RESPONSE_RESIDUAL_OVERFLOW (0x1<<2)
305 #define ISCSI_CMD_RESPONSE_RESIDUAL_OVERFLOW_SHIFT 2
306 #define ISCSI_CMD_RESPONSE_BR_RESIDUAL_UNDERFLOW (0x1<<3)
307 #define ISCSI_CMD_RESPONSE_BR_RESIDUAL_UNDERFLOW_SHIFT 3
308 #define ISCSI_CMD_RESPONSE_BR_RESIDUAL_OVERFLOW (0x1<<4)
309 #define ISCSI_CMD_RESPONSE_BR_RESIDUAL_OVERFLOW_SHIFT 4
310 #define ISCSI_CMD_RESPONSE_RESERVED1 (0x7<<5)
311 #define ISCSI_CMD_RESPONSE_RESERVED1_SHIFT 5
314 #elif defined(__LITTLE_ENDIAN)
318 #define ISCSI_CMD_RESPONSE_RESERVED0 (0x1<<0)
319 #define ISCSI_CMD_RESPONSE_RESERVED0_SHIFT 0
320 #define ISCSI_CMD_RESPONSE_RESIDUAL_UNDERFLOW (0x1<<1)
321 #define ISCSI_CMD_RESPONSE_RESIDUAL_UNDERFLOW_SHIFT 1
322 #define ISCSI_CMD_RESPONSE_RESIDUAL_OVERFLOW (0x1<<2)
323 #define ISCSI_CMD_RESPONSE_RESIDUAL_OVERFLOW_SHIFT 2
324 #define ISCSI_CMD_RESPONSE_BR_RESIDUAL_UNDERFLOW (0x1<<3)
325 #define ISCSI_CMD_RESPONSE_BR_RESIDUAL_UNDERFLOW_SHIFT 3
326 #define ISCSI_CMD_RESPONSE_BR_RESIDUAL_OVERFLOW (0x1<<4)
327 #define ISCSI_CMD_RESPONSE_BR_RESIDUAL_OVERFLOW_SHIFT 4
328 #define ISCSI_CMD_RESPONSE_RESERVED1 (0x7<<5)
329 #define ISCSI_CMD_RESPONSE_RESERVED1_SHIFT 5
337 #if defined(__BIG_ENDIAN)
341 #elif defined(__LITTLE_ENDIAN)
347 union bnx2i_cmd_resp_task_stat task_stat
;
349 #if defined(__BIG_ENDIAN)
352 #define ISCSI_CMD_RESPONSE_INDEX (0x3FFF<<0)
353 #define ISCSI_CMD_RESPONSE_INDEX_SHIFT 0
354 #define ISCSI_CMD_RESPONSE_TYPE (0x3<<14)
355 #define ISCSI_CMD_RESPONSE_TYPE_SHIFT 14
356 #elif defined(__LITTLE_ENDIAN)
358 #define ISCSI_CMD_RESPONSE_INDEX (0x3FFF<<0)
359 #define ISCSI_CMD_RESPONSE_INDEX_SHIFT 0
360 #define ISCSI_CMD_RESPONSE_TYPE (0x3<<14)
361 #define ISCSI_CMD_RESPONSE_TYPE_SHIFT 14
370 * firmware middle-path request SQ WQE
372 struct bnx2i_fw_mp_request
{
373 #if defined(__BIG_ENDIAN)
377 #elif defined(__LITTLE_ENDIAN)
384 #if defined(__BIG_ENDIAN)
387 #define ISCSI_FW_MP_REQUEST_INDEX (0x3FFF<<0)
388 #define ISCSI_FW_MP_REQUEST_INDEX_SHIFT 0
389 #define ISCSI_FW_MP_REQUEST_TYPE (0x3<<14)
390 #define ISCSI_FW_MP_REQUEST_TYPE_SHIFT 14
391 #elif defined(__LITTLE_ENDIAN)
393 #define ISCSI_FW_MP_REQUEST_INDEX (0x3FFF<<0)
394 #define ISCSI_FW_MP_REQUEST_INDEX_SHIFT 0
395 #define ISCSI_FW_MP_REQUEST_TYPE (0x3<<14)
396 #define ISCSI_FW_MP_REQUEST_TYPE_SHIFT 14
400 u32 resp_bd_list_addr_lo
;
401 u32 resp_bd_list_addr_hi
;
403 #define ISCSI_FW_MP_REQUEST_RESP_BUFFER_LENGTH (0xFFFFFF<<0)
404 #define ISCSI_FW_MP_REQUEST_RESP_BUFFER_LENGTH_SHIFT 0
405 #define ISCSI_FW_MP_REQUEST_NUM_RESP_BDS (0xFF<<24)
406 #define ISCSI_FW_MP_REQUEST_NUM_RESP_BDS_SHIFT 24
407 #if defined(__BIG_ENDIAN)
411 #define ISCSI_FW_MP_REQUEST_RESERVED1 (0x1<<0)
412 #define ISCSI_FW_MP_REQUEST_RESERVED1_SHIFT 0
413 #define ISCSI_FW_MP_REQUEST_LOCAL_COMPLETION (0x1<<1)
414 #define ISCSI_FW_MP_REQUEST_LOCAL_COMPLETION_SHIFT 1
415 #define ISCSI_FW_MP_REQUEST_UPDATE_EXP_STAT_SN (0x1<<2)
416 #define ISCSI_FW_MP_REQUEST_UPDATE_EXP_STAT_SN_SHIFT 2
417 #define ISCSI_FW_MP_REQUEST_RESERVED2 (0x1F<<3)
418 #define ISCSI_FW_MP_REQUEST_RESERVED2_SHIFT 3
419 #elif defined(__LITTLE_ENDIAN)
421 #define ISCSI_FW_MP_REQUEST_RESERVED1 (0x1<<0)
422 #define ISCSI_FW_MP_REQUEST_RESERVED1_SHIFT 0
423 #define ISCSI_FW_MP_REQUEST_LOCAL_COMPLETION (0x1<<1)
424 #define ISCSI_FW_MP_REQUEST_LOCAL_COMPLETION_SHIFT 1
425 #define ISCSI_FW_MP_REQUEST_UPDATE_EXP_STAT_SN (0x1<<2)
426 #define ISCSI_FW_MP_REQUEST_UPDATE_EXP_STAT_SN_SHIFT 2
427 #define ISCSI_FW_MP_REQUEST_RESERVED2 (0x1F<<3)
428 #define ISCSI_FW_MP_REQUEST_RESERVED2_SHIFT 3
434 #if defined(__BIG_ENDIAN)
439 #elif defined(__LITTLE_ENDIAN)
449 * firmware response - CQE: used only by firmware
451 struct bnx2i_fw_response
{
458 #define ISCSI_FW_RESPONSE_RESERVED2 (0xFF<<0)
459 #define ISCSI_FW_RESPONSE_RESERVED2_SHIFT 0
460 #define ISCSI_FW_RESPONSE_ERR_CODE (0xFF<<8)
461 #define ISCSI_FW_RESPONSE_ERR_CODE_SHIFT 8
462 #define ISCSI_FW_RESPONSE_RESERVED3 (0xFFFF<<16)
463 #define ISCSI_FW_RESPONSE_RESERVED3_SHIFT 16
475 * iSCSI KCQ CQE parameters
477 union iscsi_kcqe_params
{
486 u32 completion_status
;
487 u32 iscsi_conn_context_id
;
488 union iscsi_kcqe_params params
;
489 #if defined(__BIG_ENDIAN)
491 #define ISCSI_KCQE_RESERVED0 (0xF<<0)
492 #define ISCSI_KCQE_RESERVED0_SHIFT 0
493 #define ISCSI_KCQE_LAYER_CODE (0x7<<4)
494 #define ISCSI_KCQE_LAYER_CODE_SHIFT 4
495 #define ISCSI_KCQE_RESERVED1 (0x1<<7)
496 #define ISCSI_KCQE_RESERVED1_SHIFT 7
499 #elif defined(__LITTLE_ENDIAN)
503 #define ISCSI_KCQE_RESERVED0 (0xF<<0)
504 #define ISCSI_KCQE_RESERVED0_SHIFT 0
505 #define ISCSI_KCQE_LAYER_CODE (0x7<<4)
506 #define ISCSI_KCQE_LAYER_CODE_SHIFT 4
507 #define ISCSI_KCQE_RESERVED1 (0x1<<7)
508 #define ISCSI_KCQE_RESERVED1_SHIFT 7
517 struct iscsi_kwqe_header
{
518 #if defined(__BIG_ENDIAN)
520 #define ISCSI_KWQE_HEADER_RESERVED0 (0xF<<0)
521 #define ISCSI_KWQE_HEADER_RESERVED0_SHIFT 0
522 #define ISCSI_KWQE_HEADER_LAYER_CODE (0x7<<4)
523 #define ISCSI_KWQE_HEADER_LAYER_CODE_SHIFT 4
524 #define ISCSI_KWQE_HEADER_RESERVED1 (0x1<<7)
525 #define ISCSI_KWQE_HEADER_RESERVED1_SHIFT 7
527 #elif defined(__LITTLE_ENDIAN)
530 #define ISCSI_KWQE_HEADER_RESERVED0 (0xF<<0)
531 #define ISCSI_KWQE_HEADER_RESERVED0_SHIFT 0
532 #define ISCSI_KWQE_HEADER_LAYER_CODE (0x7<<4)
533 #define ISCSI_KWQE_HEADER_LAYER_CODE_SHIFT 4
534 #define ISCSI_KWQE_HEADER_RESERVED1 (0x1<<7)
535 #define ISCSI_KWQE_HEADER_RESERVED1_SHIFT 7
540 * iSCSI firmware init request 1
542 struct iscsi_kwqe_init1
{
543 #if defined(__BIG_ENDIAN)
544 struct iscsi_kwqe_header hdr
;
547 #elif defined(__LITTLE_ENDIAN)
550 struct iscsi_kwqe_header hdr
;
552 u32 dummy_buffer_addr_lo
;
553 u32 dummy_buffer_addr_hi
;
554 #if defined(__BIG_ENDIAN)
555 u16 num_ccells_per_conn
;
556 u16 num_tasks_per_conn
;
557 #elif defined(__LITTLE_ENDIAN)
558 u16 num_tasks_per_conn
;
559 u16 num_ccells_per_conn
;
561 #if defined(__BIG_ENDIAN)
562 u16 sq_wqes_per_page
;
564 #elif defined(__LITTLE_ENDIAN)
566 u16 sq_wqes_per_page
;
568 #if defined(__BIG_ENDIAN)
569 u8 cq_log_wqes_per_page
;
571 #define ISCSI_KWQE_INIT1_PAGE_SIZE (0xF<<0)
572 #define ISCSI_KWQE_INIT1_PAGE_SIZE_SHIFT 0
573 #define ISCSI_KWQE_INIT1_DELAYED_ACK_ENABLE (0x1<<4)
574 #define ISCSI_KWQE_INIT1_DELAYED_ACK_ENABLE_SHIFT 4
575 #define ISCSI_KWQE_INIT1_KEEP_ALIVE_ENABLE (0x1<<5)
576 #define ISCSI_KWQE_INIT1_KEEP_ALIVE_ENABLE_SHIFT 5
577 #define ISCSI_KWQE_INIT1_RESERVED1 (0x3<<6)
578 #define ISCSI_KWQE_INIT1_RESERVED1_SHIFT 6
580 #elif defined(__LITTLE_ENDIAN)
583 #define ISCSI_KWQE_INIT1_PAGE_SIZE (0xF<<0)
584 #define ISCSI_KWQE_INIT1_PAGE_SIZE_SHIFT 0
585 #define ISCSI_KWQE_INIT1_DELAYED_ACK_ENABLE (0x1<<4)
586 #define ISCSI_KWQE_INIT1_DELAYED_ACK_ENABLE_SHIFT 4
587 #define ISCSI_KWQE_INIT1_KEEP_ALIVE_ENABLE (0x1<<5)
588 #define ISCSI_KWQE_INIT1_KEEP_ALIVE_ENABLE_SHIFT 5
589 #define ISCSI_KWQE_INIT1_RESERVED1 (0x3<<6)
590 #define ISCSI_KWQE_INIT1_RESERVED1_SHIFT 6
591 u8 cq_log_wqes_per_page
;
593 #if defined(__BIG_ENDIAN)
596 #elif defined(__LITTLE_ENDIAN)
600 #if defined(__BIG_ENDIAN)
603 #elif defined(__LITTLE_ENDIAN)
610 * iSCSI firmware init request 2
612 struct iscsi_kwqe_init2
{
613 #if defined(__BIG_ENDIAN)
614 struct iscsi_kwqe_header hdr
;
616 #elif defined(__LITTLE_ENDIAN)
618 struct iscsi_kwqe_header hdr
;
620 u32 error_bit_map
[2];
625 * Initial iSCSI connection offload request 1
627 struct iscsi_kwqe_conn_offload1
{
628 #if defined(__BIG_ENDIAN)
629 struct iscsi_kwqe_header hdr
;
631 #elif defined(__LITTLE_ENDIAN)
633 struct iscsi_kwqe_header hdr
;
635 u32 sq_page_table_addr_lo
;
636 u32 sq_page_table_addr_hi
;
637 u32 cq_page_table_addr_lo
;
638 u32 cq_page_table_addr_hi
;
643 * iSCSI Page Table Entry (PTE)
651 * Initial iSCSI connection offload request 2
653 struct iscsi_kwqe_conn_offload2
{
654 #if defined(__BIG_ENDIAN)
655 struct iscsi_kwqe_header hdr
;
657 #elif defined(__LITTLE_ENDIAN)
659 struct iscsi_kwqe_header hdr
;
661 u32 rq_page_table_addr_lo
;
662 u32 rq_page_table_addr_hi
;
663 struct iscsi_pte sq_first_pte
;
664 struct iscsi_pte cq_first_pte
;
665 u32 num_additional_wqes
;
670 * Initial iSCSI connection offload request 3
672 struct iscsi_kwqe_conn_offload3
{
673 #if defined(__BIG_ENDIAN)
674 struct iscsi_kwqe_header hdr
;
676 #elif defined(__LITTLE_ENDIAN)
678 struct iscsi_kwqe_header hdr
;
681 struct iscsi_pte qp_first_pte
[3];
686 * iSCSI connection update request
688 struct iscsi_kwqe_conn_update
{
689 #if defined(__BIG_ENDIAN)
690 struct iscsi_kwqe_header hdr
;
692 #elif defined(__LITTLE_ENDIAN)
694 struct iscsi_kwqe_header hdr
;
696 #if defined(__BIG_ENDIAN)
697 u8 session_error_recovery_level
;
698 u8 max_outstanding_r2ts
;
701 #define ISCSI_KWQE_CONN_UPDATE_HEADER_DIGEST (0x1<<0)
702 #define ISCSI_KWQE_CONN_UPDATE_HEADER_DIGEST_SHIFT 0
703 #define ISCSI_KWQE_CONN_UPDATE_DATA_DIGEST (0x1<<1)
704 #define ISCSI_KWQE_CONN_UPDATE_DATA_DIGEST_SHIFT 1
705 #define ISCSI_KWQE_CONN_UPDATE_INITIAL_R2T (0x1<<2)
706 #define ISCSI_KWQE_CONN_UPDATE_INITIAL_R2T_SHIFT 2
707 #define ISCSI_KWQE_CONN_UPDATE_IMMEDIATE_DATA (0x1<<3)
708 #define ISCSI_KWQE_CONN_UPDATE_IMMEDIATE_DATA_SHIFT 3
709 #define ISCSI_KWQE_CONN_UPDATE_RESERVED1 (0xF<<4)
710 #define ISCSI_KWQE_CONN_UPDATE_RESERVED1_SHIFT 4
711 #elif defined(__LITTLE_ENDIAN)
713 #define ISCSI_KWQE_CONN_UPDATE_HEADER_DIGEST (0x1<<0)
714 #define ISCSI_KWQE_CONN_UPDATE_HEADER_DIGEST_SHIFT 0
715 #define ISCSI_KWQE_CONN_UPDATE_DATA_DIGEST (0x1<<1)
716 #define ISCSI_KWQE_CONN_UPDATE_DATA_DIGEST_SHIFT 1
717 #define ISCSI_KWQE_CONN_UPDATE_INITIAL_R2T (0x1<<2)
718 #define ISCSI_KWQE_CONN_UPDATE_INITIAL_R2T_SHIFT 2
719 #define ISCSI_KWQE_CONN_UPDATE_IMMEDIATE_DATA (0x1<<3)
720 #define ISCSI_KWQE_CONN_UPDATE_IMMEDIATE_DATA_SHIFT 3
721 #define ISCSI_KWQE_CONN_UPDATE_RESERVED1 (0xF<<4)
722 #define ISCSI_KWQE_CONN_UPDATE_RESERVED1_SHIFT 4
724 u8 max_outstanding_r2ts
;
725 u8 session_error_recovery_level
;
728 u32 max_send_pdu_length
;
729 u32 max_recv_pdu_length
;
730 u32 first_burst_length
;
731 u32 max_burst_length
;
736 * iSCSI destroy connection request
738 struct iscsi_kwqe_conn_destroy
{
739 #if defined(__BIG_ENDIAN)
740 struct iscsi_kwqe_header hdr
;
742 #elif defined(__LITTLE_ENDIAN)
744 struct iscsi_kwqe_header hdr
;
754 struct iscsi_kwqe_init1 init1
;
755 struct iscsi_kwqe_init2 init2
;
756 struct iscsi_kwqe_conn_offload1 conn_offload1
;
757 struct iscsi_kwqe_conn_offload2 conn_offload2
;
758 struct iscsi_kwqe_conn_update conn_update
;
759 struct iscsi_kwqe_conn_destroy conn_destroy
;
765 struct bnx2i_login_request
{
766 #if defined(__BIG_ENDIAN)
769 #define ISCSI_LOGIN_REQUEST_NEXT_STAGE (0x3<<0)
770 #define ISCSI_LOGIN_REQUEST_NEXT_STAGE_SHIFT 0
771 #define ISCSI_LOGIN_REQUEST_CURRENT_STAGE (0x3<<2)
772 #define ISCSI_LOGIN_REQUEST_CURRENT_STAGE_SHIFT 2
773 #define ISCSI_LOGIN_REQUEST_RESERVED0 (0x3<<4)
774 #define ISCSI_LOGIN_REQUEST_RESERVED0_SHIFT 4
775 #define ISCSI_LOGIN_REQUEST_CONT (0x1<<6)
776 #define ISCSI_LOGIN_REQUEST_CONT_SHIFT 6
777 #define ISCSI_LOGIN_REQUEST_TRANSIT (0x1<<7)
778 #define ISCSI_LOGIN_REQUEST_TRANSIT_SHIFT 7
781 #elif defined(__LITTLE_ENDIAN)
785 #define ISCSI_LOGIN_REQUEST_NEXT_STAGE (0x3<<0)
786 #define ISCSI_LOGIN_REQUEST_NEXT_STAGE_SHIFT 0
787 #define ISCSI_LOGIN_REQUEST_CURRENT_STAGE (0x3<<2)
788 #define ISCSI_LOGIN_REQUEST_CURRENT_STAGE_SHIFT 2
789 #define ISCSI_LOGIN_REQUEST_RESERVED0 (0x3<<4)
790 #define ISCSI_LOGIN_REQUEST_RESERVED0_SHIFT 4
791 #define ISCSI_LOGIN_REQUEST_CONT (0x1<<6)
792 #define ISCSI_LOGIN_REQUEST_CONT_SHIFT 6
793 #define ISCSI_LOGIN_REQUEST_TRANSIT (0x1<<7)
794 #define ISCSI_LOGIN_REQUEST_TRANSIT_SHIFT 7
799 #if defined(__BIG_ENDIAN)
802 #elif defined(__LITTLE_ENDIAN)
806 #if defined(__BIG_ENDIAN)
809 #define ISCSI_LOGIN_REQUEST_INDEX (0x3FFF<<0)
810 #define ISCSI_LOGIN_REQUEST_INDEX_SHIFT 0
811 #define ISCSI_LOGIN_REQUEST_TYPE (0x3<<14)
812 #define ISCSI_LOGIN_REQUEST_TYPE_SHIFT 14
813 #elif defined(__LITTLE_ENDIAN)
815 #define ISCSI_LOGIN_REQUEST_INDEX (0x3FFF<<0)
816 #define ISCSI_LOGIN_REQUEST_INDEX_SHIFT 0
817 #define ISCSI_LOGIN_REQUEST_TYPE (0x3<<14)
818 #define ISCSI_LOGIN_REQUEST_TYPE_SHIFT 14
821 #if defined(__BIG_ENDIAN)
824 #elif defined(__LITTLE_ENDIAN)
831 u32 resp_bd_list_addr_lo
;
832 u32 resp_bd_list_addr_hi
;
834 #define ISCSI_LOGIN_REQUEST_RESP_BUFFER_LENGTH (0xFFFFFF<<0)
835 #define ISCSI_LOGIN_REQUEST_RESP_BUFFER_LENGTH_SHIFT 0
836 #define ISCSI_LOGIN_REQUEST_NUM_RESP_BDS (0xFF<<24)
837 #define ISCSI_LOGIN_REQUEST_NUM_RESP_BDS_SHIFT 24
838 #if defined(__BIG_ENDIAN)
842 #define ISCSI_LOGIN_REQUEST_RESERVED5 (0x3<<0)
843 #define ISCSI_LOGIN_REQUEST_RESERVED5_SHIFT 0
844 #define ISCSI_LOGIN_REQUEST_UPDATE_EXP_STAT_SN (0x1<<2)
845 #define ISCSI_LOGIN_REQUEST_UPDATE_EXP_STAT_SN_SHIFT 2
846 #define ISCSI_LOGIN_REQUEST_RESERVED6 (0x1F<<3)
847 #define ISCSI_LOGIN_REQUEST_RESERVED6_SHIFT 3
848 #elif defined(__LITTLE_ENDIAN)
850 #define ISCSI_LOGIN_REQUEST_RESERVED5 (0x3<<0)
851 #define ISCSI_LOGIN_REQUEST_RESERVED5_SHIFT 0
852 #define ISCSI_LOGIN_REQUEST_UPDATE_EXP_STAT_SN (0x1<<2)
853 #define ISCSI_LOGIN_REQUEST_UPDATE_EXP_STAT_SN_SHIFT 2
854 #define ISCSI_LOGIN_REQUEST_RESERVED6 (0x1F<<3)
855 #define ISCSI_LOGIN_REQUEST_RESERVED6_SHIFT 3
861 #if defined(__BIG_ENDIAN)
866 #elif defined(__LITTLE_ENDIAN)
878 struct bnx2i_login_response
{
879 #if defined(__BIG_ENDIAN)
882 #define ISCSI_LOGIN_RESPONSE_NEXT_STAGE (0x3<<0)
883 #define ISCSI_LOGIN_RESPONSE_NEXT_STAGE_SHIFT 0
884 #define ISCSI_LOGIN_RESPONSE_CURRENT_STAGE (0x3<<2)
885 #define ISCSI_LOGIN_RESPONSE_CURRENT_STAGE_SHIFT 2
886 #define ISCSI_LOGIN_RESPONSE_RESERVED0 (0x3<<4)
887 #define ISCSI_LOGIN_RESPONSE_RESERVED0_SHIFT 4
888 #define ISCSI_LOGIN_RESPONSE_CONT (0x1<<6)
889 #define ISCSI_LOGIN_RESPONSE_CONT_SHIFT 6
890 #define ISCSI_LOGIN_RESPONSE_TRANSIT (0x1<<7)
891 #define ISCSI_LOGIN_RESPONSE_TRANSIT_SHIFT 7
894 #elif defined(__LITTLE_ENDIAN)
898 #define ISCSI_LOGIN_RESPONSE_NEXT_STAGE (0x3<<0)
899 #define ISCSI_LOGIN_RESPONSE_NEXT_STAGE_SHIFT 0
900 #define ISCSI_LOGIN_RESPONSE_CURRENT_STAGE (0x3<<2)
901 #define ISCSI_LOGIN_RESPONSE_CURRENT_STAGE_SHIFT 2
902 #define ISCSI_LOGIN_RESPONSE_RESERVED0 (0x3<<4)
903 #define ISCSI_LOGIN_RESPONSE_RESERVED0_SHIFT 4
904 #define ISCSI_LOGIN_RESPONSE_CONT (0x1<<6)
905 #define ISCSI_LOGIN_RESPONSE_CONT_SHIFT 6
906 #define ISCSI_LOGIN_RESPONSE_TRANSIT (0x1<<7)
907 #define ISCSI_LOGIN_RESPONSE_TRANSIT_SHIFT 7
914 #if defined(__BIG_ENDIAN)
918 #elif defined(__LITTLE_ENDIAN)
925 #if defined(__BIG_ENDIAN)
928 #elif defined(__LITTLE_ENDIAN)
932 #if defined(__BIG_ENDIAN)
936 #elif defined(__LITTLE_ENDIAN)
942 #if defined(__BIG_ENDIAN)
945 #define ISCSI_LOGIN_RESPONSE_INDEX (0x3FFF<<0)
946 #define ISCSI_LOGIN_RESPONSE_INDEX_SHIFT 0
947 #define ISCSI_LOGIN_RESPONSE_TYPE (0x3<<14)
948 #define ISCSI_LOGIN_RESPONSE_TYPE_SHIFT 14
949 #elif defined(__LITTLE_ENDIAN)
951 #define ISCSI_LOGIN_RESPONSE_INDEX (0x3FFF<<0)
952 #define ISCSI_LOGIN_RESPONSE_INDEX_SHIFT 0
953 #define ISCSI_LOGIN_RESPONSE_TYPE (0x3<<14)
954 #define ISCSI_LOGIN_RESPONSE_TYPE_SHIFT 14
962 * iSCSI Logout SQ WQE
964 struct bnx2i_logout_request
{
965 #if defined(__BIG_ENDIAN)
968 #define ISCSI_LOGOUT_REQUEST_REASON (0x7F<<0)
969 #define ISCSI_LOGOUT_REQUEST_REASON_SHIFT 0
970 #define ISCSI_LOGOUT_REQUEST_ALWAYS_ONE (0x1<<7)
971 #define ISCSI_LOGOUT_REQUEST_ALWAYS_ONE_SHIFT 7
973 #elif defined(__LITTLE_ENDIAN)
976 #define ISCSI_LOGOUT_REQUEST_REASON (0x7F<<0)
977 #define ISCSI_LOGOUT_REQUEST_REASON_SHIFT 0
978 #define ISCSI_LOGOUT_REQUEST_ALWAYS_ONE (0x1<<7)
979 #define ISCSI_LOGOUT_REQUEST_ALWAYS_ONE_SHIFT 7
984 #if defined(__BIG_ENDIAN)
987 #define ISCSI_LOGOUT_REQUEST_INDEX (0x3FFF<<0)
988 #define ISCSI_LOGOUT_REQUEST_INDEX_SHIFT 0
989 #define ISCSI_LOGOUT_REQUEST_TYPE (0x3<<14)
990 #define ISCSI_LOGOUT_REQUEST_TYPE_SHIFT 14
991 #elif defined(__LITTLE_ENDIAN)
993 #define ISCSI_LOGOUT_REQUEST_INDEX (0x3FFF<<0)
994 #define ISCSI_LOGOUT_REQUEST_INDEX_SHIFT 0
995 #define ISCSI_LOGOUT_REQUEST_TYPE (0x3<<14)
996 #define ISCSI_LOGOUT_REQUEST_TYPE_SHIFT 14
999 #if defined(__BIG_ENDIAN)
1002 #elif defined(__LITTLE_ENDIAN)
1009 u32 bd_list_addr_lo
;
1010 u32 bd_list_addr_hi
;
1011 #if defined(__BIG_ENDIAN)
1016 #elif defined(__LITTLE_ENDIAN)
1028 struct bnx2i_logout_response
{
1029 #if defined(__BIG_ENDIAN)
1034 #elif defined(__LITTLE_ENDIAN)
1044 #if defined(__BIG_ENDIAN)
1048 #elif defined(__LITTLE_ENDIAN)
1054 #if defined(__BIG_ENDIAN)
1057 #elif defined(__LITTLE_ENDIAN)
1062 #if defined(__BIG_ENDIAN)
1065 #define ISCSI_LOGOUT_RESPONSE_INDEX (0x3FFF<<0)
1066 #define ISCSI_LOGOUT_RESPONSE_INDEX_SHIFT 0
1067 #define ISCSI_LOGOUT_RESPONSE_TYPE (0x3<<14)
1068 #define ISCSI_LOGOUT_RESPONSE_TYPE_SHIFT 14
1069 #elif defined(__LITTLE_ENDIAN)
1071 #define ISCSI_LOGOUT_RESPONSE_INDEX (0x3FFF<<0)
1072 #define ISCSI_LOGOUT_RESPONSE_INDEX_SHIFT 0
1073 #define ISCSI_LOGOUT_RESPONSE_TYPE (0x3<<14)
1074 #define ISCSI_LOGOUT_RESPONSE_TYPE_SHIFT 14
1084 struct bnx2i_nop_in_msg
{
1085 #if defined(__BIG_ENDIAN)
1089 #elif defined(__LITTLE_ENDIAN)
1099 #if defined(__BIG_ENDIAN)
1103 #elif defined(__LITTLE_ENDIAN)
1111 #if defined(__BIG_ENDIAN)
1114 #define ISCSI_NOP_IN_MSG_INDEX (0x3FFF<<0)
1115 #define ISCSI_NOP_IN_MSG_INDEX_SHIFT 0
1116 #define ISCSI_NOP_IN_MSG_TYPE (0x3<<14)
1117 #define ISCSI_NOP_IN_MSG_TYPE_SHIFT 14
1118 #elif defined(__LITTLE_ENDIAN)
1120 #define ISCSI_NOP_IN_MSG_INDEX (0x3FFF<<0)
1121 #define ISCSI_NOP_IN_MSG_INDEX_SHIFT 0
1122 #define ISCSI_NOP_IN_MSG_TYPE (0x3<<14)
1123 #define ISCSI_NOP_IN_MSG_TYPE_SHIFT 14
1131 * iSCSI NOP-OUT SQ WQE
1133 struct bnx2i_nop_out_request
{
1134 #if defined(__BIG_ENDIAN)
1137 #define ISCSI_NOP_OUT_REQUEST_RESERVED1 (0x7F<<0)
1138 #define ISCSI_NOP_OUT_REQUEST_RESERVED1_SHIFT 0
1139 #define ISCSI_NOP_OUT_REQUEST_ALWAYS_ONE (0x1<<7)
1140 #define ISCSI_NOP_OUT_REQUEST_ALWAYS_ONE_SHIFT 7
1142 #elif defined(__LITTLE_ENDIAN)
1145 #define ISCSI_NOP_OUT_REQUEST_RESERVED1 (0x7F<<0)
1146 #define ISCSI_NOP_OUT_REQUEST_RESERVED1_SHIFT 0
1147 #define ISCSI_NOP_OUT_REQUEST_ALWAYS_ONE (0x1<<7)
1148 #define ISCSI_NOP_OUT_REQUEST_ALWAYS_ONE_SHIFT 7
1153 #if defined(__BIG_ENDIAN)
1156 #define ISCSI_NOP_OUT_REQUEST_INDEX (0x3FFF<<0)
1157 #define ISCSI_NOP_OUT_REQUEST_INDEX_SHIFT 0
1158 #define ISCSI_NOP_OUT_REQUEST_TYPE (0x3<<14)
1159 #define ISCSI_NOP_OUT_REQUEST_TYPE_SHIFT 14
1160 #elif defined(__LITTLE_ENDIAN)
1162 #define ISCSI_NOP_OUT_REQUEST_INDEX (0x3FFF<<0)
1163 #define ISCSI_NOP_OUT_REQUEST_INDEX_SHIFT 0
1164 #define ISCSI_NOP_OUT_REQUEST_TYPE (0x3<<14)
1165 #define ISCSI_NOP_OUT_REQUEST_TYPE_SHIFT 14
1171 u32 resp_bd_list_addr_lo
;
1172 u32 resp_bd_list_addr_hi
;
1174 #define ISCSI_NOP_OUT_REQUEST_RESP_BUFFER_LENGTH (0xFFFFFF<<0)
1175 #define ISCSI_NOP_OUT_REQUEST_RESP_BUFFER_LENGTH_SHIFT 0
1176 #define ISCSI_NOP_OUT_REQUEST_NUM_RESP_BDS (0xFF<<24)
1177 #define ISCSI_NOP_OUT_REQUEST_NUM_RESP_BDS_SHIFT 24
1178 #if defined(__BIG_ENDIAN)
1182 #define ISCSI_NOP_OUT_REQUEST_RESERVED4 (0x1<<0)
1183 #define ISCSI_NOP_OUT_REQUEST_RESERVED4_SHIFT 0
1184 #define ISCSI_NOP_OUT_REQUEST_LOCAL_COMPLETION (0x1<<1)
1185 #define ISCSI_NOP_OUT_REQUEST_LOCAL_COMPLETION_SHIFT 1
1186 #define ISCSI_NOP_OUT_REQUEST_ZERO_FILL (0x3F<<2)
1187 #define ISCSI_NOP_OUT_REQUEST_ZERO_FILL_SHIFT 2
1188 #elif defined(__LITTLE_ENDIAN)
1190 #define ISCSI_NOP_OUT_REQUEST_RESERVED4 (0x1<<0)
1191 #define ISCSI_NOP_OUT_REQUEST_RESERVED4_SHIFT 0
1192 #define ISCSI_NOP_OUT_REQUEST_LOCAL_COMPLETION (0x1<<1)
1193 #define ISCSI_NOP_OUT_REQUEST_LOCAL_COMPLETION_SHIFT 1
1194 #define ISCSI_NOP_OUT_REQUEST_ZERO_FILL (0x3F<<2)
1195 #define ISCSI_NOP_OUT_REQUEST_ZERO_FILL_SHIFT 2
1199 u32 bd_list_addr_lo
;
1200 u32 bd_list_addr_hi
;
1201 #if defined(__BIG_ENDIAN)
1206 #elif defined(__LITTLE_ENDIAN)
1217 struct bnx2i_reject_msg
{
1218 #if defined(__BIG_ENDIAN)
1223 #elif defined(__LITTLE_ENDIAN)
1233 #if defined(__BIG_ENDIAN)
1237 #elif defined(__LITTLE_ENDIAN)
1247 * bnx2i iSCSI TMF SQ WQE
1249 struct bnx2i_tmf_request
{
1250 #if defined(__BIG_ENDIAN)
1253 #define ISCSI_TMF_REQUEST_FUNCTION (0x7F<<0)
1254 #define ISCSI_TMF_REQUEST_FUNCTION_SHIFT 0
1255 #define ISCSI_TMF_REQUEST_ALWAYS_ONE (0x1<<7)
1256 #define ISCSI_TMF_REQUEST_ALWAYS_ONE_SHIFT 7
1258 #elif defined(__LITTLE_ENDIAN)
1261 #define ISCSI_TMF_REQUEST_FUNCTION (0x7F<<0)
1262 #define ISCSI_TMF_REQUEST_FUNCTION_SHIFT 0
1263 #define ISCSI_TMF_REQUEST_ALWAYS_ONE (0x1<<7)
1264 #define ISCSI_TMF_REQUEST_ALWAYS_ONE_SHIFT 7
1269 #if defined(__BIG_ENDIAN)
1272 #define ISCSI_TMF_REQUEST_INDEX (0x3FFF<<0)
1273 #define ISCSI_TMF_REQUEST_INDEX_SHIFT 0
1274 #define ISCSI_TMF_REQUEST_TYPE (0x3<<14)
1275 #define ISCSI_TMF_REQUEST_TYPE_SHIFT 14
1276 #elif defined(__LITTLE_ENDIAN)
1278 #define ISCSI_TMF_REQUEST_INDEX (0x3FFF<<0)
1279 #define ISCSI_TMF_REQUEST_INDEX_SHIFT 0
1280 #define ISCSI_TMF_REQUEST_TYPE (0x3<<14)
1281 #define ISCSI_TMF_REQUEST_TYPE_SHIFT 14
1290 u32 bd_list_addr_lo
;
1291 u32 bd_list_addr_hi
;
1292 #if defined(__BIG_ENDIAN)
1297 #elif defined(__LITTLE_ENDIAN)
1308 struct bnx2i_text_request
{
1309 #if defined(__BIG_ENDIAN)
1312 #define ISCSI_TEXT_REQUEST_RESERVED1 (0x3F<<0)
1313 #define ISCSI_TEXT_REQUEST_RESERVED1_SHIFT 0
1314 #define ISCSI_TEXT_REQUEST_CONT (0x1<<6)
1315 #define ISCSI_TEXT_REQUEST_CONT_SHIFT 6
1316 #define ISCSI_TEXT_REQUEST_FINAL (0x1<<7)
1317 #define ISCSI_TEXT_REQUEST_FINAL_SHIFT 7
1319 #elif defined(__LITTLE_ENDIAN)
1322 #define ISCSI_TEXT_REQUEST_RESERVED1 (0x3F<<0)
1323 #define ISCSI_TEXT_REQUEST_RESERVED1_SHIFT 0
1324 #define ISCSI_TEXT_REQUEST_CONT (0x1<<6)
1325 #define ISCSI_TEXT_REQUEST_CONT_SHIFT 6
1326 #define ISCSI_TEXT_REQUEST_FINAL (0x1<<7)
1327 #define ISCSI_TEXT_REQUEST_FINAL_SHIFT 7
1332 #if defined(__BIG_ENDIAN)
1335 #define ISCSI_TEXT_REQUEST_INDEX (0x3FFF<<0)
1336 #define ISCSI_TEXT_REQUEST_INDEX_SHIFT 0
1337 #define ISCSI_TEXT_REQUEST_TYPE (0x3<<14)
1338 #define ISCSI_TEXT_REQUEST_TYPE_SHIFT 14
1339 #elif defined(__LITTLE_ENDIAN)
1341 #define ISCSI_TEXT_REQUEST_INDEX (0x3FFF<<0)
1342 #define ISCSI_TEXT_REQUEST_INDEX_SHIFT 0
1343 #define ISCSI_TEXT_REQUEST_TYPE (0x3<<14)
1344 #define ISCSI_TEXT_REQUEST_TYPE_SHIFT 14
1350 u32 resp_bd_list_addr_lo
;
1351 u32 resp_bd_list_addr_hi
;
1353 #define ISCSI_TEXT_REQUEST_RESP_BUFFER_LENGTH (0xFFFFFF<<0)
1354 #define ISCSI_TEXT_REQUEST_RESP_BUFFER_LENGTH_SHIFT 0
1355 #define ISCSI_TEXT_REQUEST_NUM_RESP_BDS (0xFF<<24)
1356 #define ISCSI_TEXT_REQUEST_NUM_RESP_BDS_SHIFT 24
1358 u32 bd_list_addr_lo
;
1359 u32 bd_list_addr_hi
;
1360 #if defined(__BIG_ENDIAN)
1365 #elif defined(__LITTLE_ENDIAN)
1376 union iscsi_request
{
1377 struct bnx2i_cmd_request cmd
;
1378 struct bnx2i_tmf_request tmf
;
1379 struct bnx2i_nop_out_request nop_out
;
1380 struct bnx2i_login_request login_req
;
1381 struct bnx2i_text_request text
;
1382 struct bnx2i_logout_request logout_req
;
1383 struct bnx2i_cleanup_request cleanup
;
1390 struct bnx2i_tmf_response
{
1391 #if defined(__BIG_ENDIAN)
1396 #elif defined(__LITTLE_ENDIAN)
1406 #if defined(__BIG_ENDIAN)
1410 #elif defined(__LITTLE_ENDIAN)
1416 #if defined(__BIG_ENDIAN)
1419 #define ISCSI_TMF_RESPONSE_INDEX (0x3FFF<<0)
1420 #define ISCSI_TMF_RESPONSE_INDEX_SHIFT 0
1421 #define ISCSI_TMF_RESPONSE_TYPE (0x3<<14)
1422 #define ISCSI_TMF_RESPONSE_TYPE_SHIFT 14
1423 #elif defined(__LITTLE_ENDIAN)
1425 #define ISCSI_TMF_RESPONSE_INDEX (0x3FFF<<0)
1426 #define ISCSI_TMF_RESPONSE_INDEX_SHIFT 0
1427 #define ISCSI_TMF_RESPONSE_TYPE (0x3<<14)
1428 #define ISCSI_TMF_RESPONSE_TYPE_SHIFT 14
1437 struct bnx2i_text_response
{
1438 #if defined(__BIG_ENDIAN)
1441 #define ISCSI_TEXT_RESPONSE_RESERVED1 (0x3F<<0)
1442 #define ISCSI_TEXT_RESPONSE_RESERVED1_SHIFT 0
1443 #define ISCSI_TEXT_RESPONSE_CONT (0x1<<6)
1444 #define ISCSI_TEXT_RESPONSE_CONT_SHIFT 6
1445 #define ISCSI_TEXT_RESPONSE_FINAL (0x1<<7)
1446 #define ISCSI_TEXT_RESPONSE_FINAL_SHIFT 7
1448 #elif defined(__LITTLE_ENDIAN)
1451 #define ISCSI_TEXT_RESPONSE_RESERVED1 (0x3F<<0)
1452 #define ISCSI_TEXT_RESPONSE_RESERVED1_SHIFT 0
1453 #define ISCSI_TEXT_RESPONSE_CONT (0x1<<6)
1454 #define ISCSI_TEXT_RESPONSE_CONT_SHIFT 6
1455 #define ISCSI_TEXT_RESPONSE_FINAL (0x1<<7)
1456 #define ISCSI_TEXT_RESPONSE_FINAL_SHIFT 7
1464 #if defined(__BIG_ENDIAN)
1468 #elif defined(__LITTLE_ENDIAN)
1476 #if defined(__BIG_ENDIAN)
1479 #define ISCSI_TEXT_RESPONSE_INDEX (0x3FFF<<0)
1480 #define ISCSI_TEXT_RESPONSE_INDEX_SHIFT 0
1481 #define ISCSI_TEXT_RESPONSE_TYPE (0x3<<14)
1482 #define ISCSI_TEXT_RESPONSE_TYPE_SHIFT 14
1483 #elif defined(__LITTLE_ENDIAN)
1485 #define ISCSI_TEXT_RESPONSE_INDEX (0x3FFF<<0)
1486 #define ISCSI_TEXT_RESPONSE_INDEX_SHIFT 0
1487 #define ISCSI_TEXT_RESPONSE_TYPE (0x3<<14)
1488 #define ISCSI_TEXT_RESPONSE_TYPE_SHIFT 14
1497 union iscsi_response
{
1498 struct bnx2i_cmd_response cmd
;
1499 struct bnx2i_tmf_response tmf
;
1500 struct bnx2i_login_response login_resp
;
1501 struct bnx2i_text_response text
;
1502 struct bnx2i_logout_response logout_resp
;
1503 struct bnx2i_cleanup_response cleanup
;
1504 struct bnx2i_reject_msg reject
;
1505 struct bnx2i_async_msg async
;
1506 struct bnx2i_nop_in_msg nop_in
;
1509 #endif /* __57XX_ISCSI_HSI_LINUX_LE__ */