18c2ecf20Sopenharmony_ci/* 57xx_iscsi_hsi.h: QLogic NetXtreme II iSCSI HSI. 28c2ecf20Sopenharmony_ci * 38c2ecf20Sopenharmony_ci * Copyright (c) 2006 - 2013 Broadcom Corporation 48c2ecf20Sopenharmony_ci * Copyright (c) 2014, QLogic Corporation 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * This program is free software; you can redistribute it and/or modify 78c2ecf20Sopenharmony_ci * it under the terms of the GNU General Public License as published by 88c2ecf20Sopenharmony_ci * the Free Software Foundation. 98c2ecf20Sopenharmony_ci * 108c2ecf20Sopenharmony_ci * Written by: Anil Veerabhadrappa (anilgv@broadcom.com) 118c2ecf20Sopenharmony_ci * Previously Maintained by: Eddie Wai (eddie.wai@broadcom.com) 128c2ecf20Sopenharmony_ci * Maintained by: QLogic-Storage-Upstream@qlogic.com 138c2ecf20Sopenharmony_ci */ 148c2ecf20Sopenharmony_ci#ifndef __57XX_ISCSI_HSI_LINUX_LE__ 158c2ecf20Sopenharmony_ci#define __57XX_ISCSI_HSI_LINUX_LE__ 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci/* 188c2ecf20Sopenharmony_ci * iSCSI Async CQE 198c2ecf20Sopenharmony_ci */ 208c2ecf20Sopenharmony_cistruct bnx2i_async_msg { 218c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 228c2ecf20Sopenharmony_ci u8 op_code; 238c2ecf20Sopenharmony_ci u8 reserved1; 248c2ecf20Sopenharmony_ci u16 reserved0; 258c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 268c2ecf20Sopenharmony_ci u16 reserved0; 278c2ecf20Sopenharmony_ci u8 reserved1; 288c2ecf20Sopenharmony_ci u8 op_code; 298c2ecf20Sopenharmony_ci#endif 308c2ecf20Sopenharmony_ci u32 reserved2; 318c2ecf20Sopenharmony_ci u32 exp_cmd_sn; 328c2ecf20Sopenharmony_ci u32 max_cmd_sn; 338c2ecf20Sopenharmony_ci u32 reserved3[2]; 348c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 358c2ecf20Sopenharmony_ci u16 reserved5; 368c2ecf20Sopenharmony_ci u8 err_code; 378c2ecf20Sopenharmony_ci u8 reserved4; 388c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 398c2ecf20Sopenharmony_ci u8 reserved4; 408c2ecf20Sopenharmony_ci u8 err_code; 418c2ecf20Sopenharmony_ci u16 reserved5; 428c2ecf20Sopenharmony_ci#endif 438c2ecf20Sopenharmony_ci u32 reserved6; 448c2ecf20Sopenharmony_ci u32 lun[2]; 458c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 468c2ecf20Sopenharmony_ci u8 async_event; 478c2ecf20Sopenharmony_ci u8 async_vcode; 488c2ecf20Sopenharmony_ci u16 param1; 498c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 508c2ecf20Sopenharmony_ci u16 param1; 518c2ecf20Sopenharmony_ci u8 async_vcode; 528c2ecf20Sopenharmony_ci u8 async_event; 538c2ecf20Sopenharmony_ci#endif 548c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 558c2ecf20Sopenharmony_ci u16 param2; 568c2ecf20Sopenharmony_ci u16 param3; 578c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 588c2ecf20Sopenharmony_ci u16 param3; 598c2ecf20Sopenharmony_ci u16 param2; 608c2ecf20Sopenharmony_ci#endif 618c2ecf20Sopenharmony_ci u32 reserved7[3]; 628c2ecf20Sopenharmony_ci u32 cq_req_sn; 638c2ecf20Sopenharmony_ci}; 648c2ecf20Sopenharmony_ci 658c2ecf20Sopenharmony_ci 668c2ecf20Sopenharmony_ci/* 678c2ecf20Sopenharmony_ci * iSCSI Buffer Descriptor (BD) 688c2ecf20Sopenharmony_ci */ 698c2ecf20Sopenharmony_cistruct iscsi_bd { 708c2ecf20Sopenharmony_ci u32 buffer_addr_hi; 718c2ecf20Sopenharmony_ci u32 buffer_addr_lo; 728c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 738c2ecf20Sopenharmony_ci u16 reserved0; 748c2ecf20Sopenharmony_ci u16 buffer_length; 758c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 768c2ecf20Sopenharmony_ci u16 buffer_length; 778c2ecf20Sopenharmony_ci u16 reserved0; 788c2ecf20Sopenharmony_ci#endif 798c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 808c2ecf20Sopenharmony_ci u16 reserved3; 818c2ecf20Sopenharmony_ci u16 flags; 828c2ecf20Sopenharmony_ci#define ISCSI_BD_RESERVED1 (0x3F<<0) 838c2ecf20Sopenharmony_ci#define ISCSI_BD_RESERVED1_SHIFT 0 848c2ecf20Sopenharmony_ci#define ISCSI_BD_LAST_IN_BD_CHAIN (0x1<<6) 858c2ecf20Sopenharmony_ci#define ISCSI_BD_LAST_IN_BD_CHAIN_SHIFT 6 868c2ecf20Sopenharmony_ci#define ISCSI_BD_FIRST_IN_BD_CHAIN (0x1<<7) 878c2ecf20Sopenharmony_ci#define ISCSI_BD_FIRST_IN_BD_CHAIN_SHIFT 7 888c2ecf20Sopenharmony_ci#define ISCSI_BD_RESERVED2 (0xFF<<8) 898c2ecf20Sopenharmony_ci#define ISCSI_BD_RESERVED2_SHIFT 8 908c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 918c2ecf20Sopenharmony_ci u16 flags; 928c2ecf20Sopenharmony_ci#define ISCSI_BD_RESERVED1 (0x3F<<0) 938c2ecf20Sopenharmony_ci#define ISCSI_BD_RESERVED1_SHIFT 0 948c2ecf20Sopenharmony_ci#define ISCSI_BD_LAST_IN_BD_CHAIN (0x1<<6) 958c2ecf20Sopenharmony_ci#define ISCSI_BD_LAST_IN_BD_CHAIN_SHIFT 6 968c2ecf20Sopenharmony_ci#define ISCSI_BD_FIRST_IN_BD_CHAIN (0x1<<7) 978c2ecf20Sopenharmony_ci#define ISCSI_BD_FIRST_IN_BD_CHAIN_SHIFT 7 988c2ecf20Sopenharmony_ci#define ISCSI_BD_RESERVED2 (0xFF<<8) 998c2ecf20Sopenharmony_ci#define ISCSI_BD_RESERVED2_SHIFT 8 1008c2ecf20Sopenharmony_ci u16 reserved3; 1018c2ecf20Sopenharmony_ci#endif 1028c2ecf20Sopenharmony_ci}; 1038c2ecf20Sopenharmony_ci 1048c2ecf20Sopenharmony_ci 1058c2ecf20Sopenharmony_ci/* 1068c2ecf20Sopenharmony_ci * iSCSI Cleanup SQ WQE 1078c2ecf20Sopenharmony_ci */ 1088c2ecf20Sopenharmony_cistruct bnx2i_cleanup_request { 1098c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 1108c2ecf20Sopenharmony_ci u8 op_code; 1118c2ecf20Sopenharmony_ci u8 reserved1; 1128c2ecf20Sopenharmony_ci u16 reserved0; 1138c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 1148c2ecf20Sopenharmony_ci u16 reserved0; 1158c2ecf20Sopenharmony_ci u8 reserved1; 1168c2ecf20Sopenharmony_ci u8 op_code; 1178c2ecf20Sopenharmony_ci#endif 1188c2ecf20Sopenharmony_ci u32 reserved2[3]; 1198c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 1208c2ecf20Sopenharmony_ci u16 reserved3; 1218c2ecf20Sopenharmony_ci u16 itt; 1228c2ecf20Sopenharmony_ci#define ISCSI_CLEANUP_REQUEST_INDEX (0x3FFF<<0) 1238c2ecf20Sopenharmony_ci#define ISCSI_CLEANUP_REQUEST_INDEX_SHIFT 0 1248c2ecf20Sopenharmony_ci#define ISCSI_CLEANUP_REQUEST_TYPE (0x3<<14) 1258c2ecf20Sopenharmony_ci#define ISCSI_CLEANUP_REQUEST_TYPE_SHIFT 14 1268c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 1278c2ecf20Sopenharmony_ci u16 itt; 1288c2ecf20Sopenharmony_ci#define ISCSI_CLEANUP_REQUEST_INDEX (0x3FFF<<0) 1298c2ecf20Sopenharmony_ci#define ISCSI_CLEANUP_REQUEST_INDEX_SHIFT 0 1308c2ecf20Sopenharmony_ci#define ISCSI_CLEANUP_REQUEST_TYPE (0x3<<14) 1318c2ecf20Sopenharmony_ci#define ISCSI_CLEANUP_REQUEST_TYPE_SHIFT 14 1328c2ecf20Sopenharmony_ci u16 reserved3; 1338c2ecf20Sopenharmony_ci#endif 1348c2ecf20Sopenharmony_ci u32 reserved4[10]; 1358c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 1368c2ecf20Sopenharmony_ci u8 cq_index; 1378c2ecf20Sopenharmony_ci u8 reserved6; 1388c2ecf20Sopenharmony_ci u16 reserved5; 1398c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 1408c2ecf20Sopenharmony_ci u16 reserved5; 1418c2ecf20Sopenharmony_ci u8 reserved6; 1428c2ecf20Sopenharmony_ci u8 cq_index; 1438c2ecf20Sopenharmony_ci#endif 1448c2ecf20Sopenharmony_ci}; 1458c2ecf20Sopenharmony_ci 1468c2ecf20Sopenharmony_ci 1478c2ecf20Sopenharmony_ci/* 1488c2ecf20Sopenharmony_ci * iSCSI Cleanup CQE 1498c2ecf20Sopenharmony_ci */ 1508c2ecf20Sopenharmony_cistruct bnx2i_cleanup_response { 1518c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 1528c2ecf20Sopenharmony_ci u8 op_code; 1538c2ecf20Sopenharmony_ci u8 status; 1548c2ecf20Sopenharmony_ci u16 reserved0; 1558c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 1568c2ecf20Sopenharmony_ci u16 reserved0; 1578c2ecf20Sopenharmony_ci u8 status; 1588c2ecf20Sopenharmony_ci u8 op_code; 1598c2ecf20Sopenharmony_ci#endif 1608c2ecf20Sopenharmony_ci u32 reserved1[3]; 1618c2ecf20Sopenharmony_ci u32 reserved2[2]; 1628c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 1638c2ecf20Sopenharmony_ci u16 reserved4; 1648c2ecf20Sopenharmony_ci u8 err_code; 1658c2ecf20Sopenharmony_ci u8 reserved3; 1668c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 1678c2ecf20Sopenharmony_ci u8 reserved3; 1688c2ecf20Sopenharmony_ci u8 err_code; 1698c2ecf20Sopenharmony_ci u16 reserved4; 1708c2ecf20Sopenharmony_ci#endif 1718c2ecf20Sopenharmony_ci u32 reserved5[7]; 1728c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 1738c2ecf20Sopenharmony_ci u16 reserved6; 1748c2ecf20Sopenharmony_ci u16 itt; 1758c2ecf20Sopenharmony_ci#define ISCSI_CLEANUP_RESPONSE_INDEX (0x3FFF<<0) 1768c2ecf20Sopenharmony_ci#define ISCSI_CLEANUP_RESPONSE_INDEX_SHIFT 0 1778c2ecf20Sopenharmony_ci#define ISCSI_CLEANUP_RESPONSE_TYPE (0x3<<14) 1788c2ecf20Sopenharmony_ci#define ISCSI_CLEANUP_RESPONSE_TYPE_SHIFT 14 1798c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 1808c2ecf20Sopenharmony_ci u16 itt; 1818c2ecf20Sopenharmony_ci#define ISCSI_CLEANUP_RESPONSE_INDEX (0x3FFF<<0) 1828c2ecf20Sopenharmony_ci#define ISCSI_CLEANUP_RESPONSE_INDEX_SHIFT 0 1838c2ecf20Sopenharmony_ci#define ISCSI_CLEANUP_RESPONSE_TYPE (0x3<<14) 1848c2ecf20Sopenharmony_ci#define ISCSI_CLEANUP_RESPONSE_TYPE_SHIFT 14 1858c2ecf20Sopenharmony_ci u16 reserved6; 1868c2ecf20Sopenharmony_ci#endif 1878c2ecf20Sopenharmony_ci u32 cq_req_sn; 1888c2ecf20Sopenharmony_ci}; 1898c2ecf20Sopenharmony_ci 1908c2ecf20Sopenharmony_ci 1918c2ecf20Sopenharmony_ci/* 1928c2ecf20Sopenharmony_ci * SCSI read/write SQ WQE 1938c2ecf20Sopenharmony_ci */ 1948c2ecf20Sopenharmony_cistruct bnx2i_cmd_request { 1958c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 1968c2ecf20Sopenharmony_ci u8 op_code; 1978c2ecf20Sopenharmony_ci u8 op_attr; 1988c2ecf20Sopenharmony_ci#define ISCSI_CMD_REQUEST_TASK_ATTR (0x7<<0) 1998c2ecf20Sopenharmony_ci#define ISCSI_CMD_REQUEST_TASK_ATTR_SHIFT 0 2008c2ecf20Sopenharmony_ci#define ISCSI_CMD_REQUEST_RESERVED1 (0x3<<3) 2018c2ecf20Sopenharmony_ci#define ISCSI_CMD_REQUEST_RESERVED1_SHIFT 3 2028c2ecf20Sopenharmony_ci#define ISCSI_CMD_REQUEST_WRITE (0x1<<5) 2038c2ecf20Sopenharmony_ci#define ISCSI_CMD_REQUEST_WRITE_SHIFT 5 2048c2ecf20Sopenharmony_ci#define ISCSI_CMD_REQUEST_READ (0x1<<6) 2058c2ecf20Sopenharmony_ci#define ISCSI_CMD_REQUEST_READ_SHIFT 6 2068c2ecf20Sopenharmony_ci#define ISCSI_CMD_REQUEST_FINAL (0x1<<7) 2078c2ecf20Sopenharmony_ci#define ISCSI_CMD_REQUEST_FINAL_SHIFT 7 2088c2ecf20Sopenharmony_ci u16 reserved0; 2098c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 2108c2ecf20Sopenharmony_ci u16 reserved0; 2118c2ecf20Sopenharmony_ci u8 op_attr; 2128c2ecf20Sopenharmony_ci#define ISCSI_CMD_REQUEST_TASK_ATTR (0x7<<0) 2138c2ecf20Sopenharmony_ci#define ISCSI_CMD_REQUEST_TASK_ATTR_SHIFT 0 2148c2ecf20Sopenharmony_ci#define ISCSI_CMD_REQUEST_RESERVED1 (0x3<<3) 2158c2ecf20Sopenharmony_ci#define ISCSI_CMD_REQUEST_RESERVED1_SHIFT 3 2168c2ecf20Sopenharmony_ci#define ISCSI_CMD_REQUEST_WRITE (0x1<<5) 2178c2ecf20Sopenharmony_ci#define ISCSI_CMD_REQUEST_WRITE_SHIFT 5 2188c2ecf20Sopenharmony_ci#define ISCSI_CMD_REQUEST_READ (0x1<<6) 2198c2ecf20Sopenharmony_ci#define ISCSI_CMD_REQUEST_READ_SHIFT 6 2208c2ecf20Sopenharmony_ci#define ISCSI_CMD_REQUEST_FINAL (0x1<<7) 2218c2ecf20Sopenharmony_ci#define ISCSI_CMD_REQUEST_FINAL_SHIFT 7 2228c2ecf20Sopenharmony_ci u8 op_code; 2238c2ecf20Sopenharmony_ci#endif 2248c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 2258c2ecf20Sopenharmony_ci u16 ud_buffer_offset; 2268c2ecf20Sopenharmony_ci u16 sd_buffer_offset; 2278c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 2288c2ecf20Sopenharmony_ci u16 sd_buffer_offset; 2298c2ecf20Sopenharmony_ci u16 ud_buffer_offset; 2308c2ecf20Sopenharmony_ci#endif 2318c2ecf20Sopenharmony_ci u32 lun[2]; 2328c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 2338c2ecf20Sopenharmony_ci u16 reserved2; 2348c2ecf20Sopenharmony_ci u16 itt; 2358c2ecf20Sopenharmony_ci#define ISCSI_CMD_REQUEST_INDEX (0x3FFF<<0) 2368c2ecf20Sopenharmony_ci#define ISCSI_CMD_REQUEST_INDEX_SHIFT 0 2378c2ecf20Sopenharmony_ci#define ISCSI_CMD_REQUEST_TYPE (0x3<<14) 2388c2ecf20Sopenharmony_ci#define ISCSI_CMD_REQUEST_TYPE_SHIFT 14 2398c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 2408c2ecf20Sopenharmony_ci u16 itt; 2418c2ecf20Sopenharmony_ci#define ISCSI_CMD_REQUEST_INDEX (0x3FFF<<0) 2428c2ecf20Sopenharmony_ci#define ISCSI_CMD_REQUEST_INDEX_SHIFT 0 2438c2ecf20Sopenharmony_ci#define ISCSI_CMD_REQUEST_TYPE (0x3<<14) 2448c2ecf20Sopenharmony_ci#define ISCSI_CMD_REQUEST_TYPE_SHIFT 14 2458c2ecf20Sopenharmony_ci u16 reserved2; 2468c2ecf20Sopenharmony_ci#endif 2478c2ecf20Sopenharmony_ci u32 total_data_transfer_length; 2488c2ecf20Sopenharmony_ci u32 cmd_sn; 2498c2ecf20Sopenharmony_ci u32 reserved3; 2508c2ecf20Sopenharmony_ci u32 cdb[4]; 2518c2ecf20Sopenharmony_ci u32 zero_fill; 2528c2ecf20Sopenharmony_ci u32 bd_list_addr_lo; 2538c2ecf20Sopenharmony_ci u32 bd_list_addr_hi; 2548c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 2558c2ecf20Sopenharmony_ci u8 cq_index; 2568c2ecf20Sopenharmony_ci u8 sd_start_bd_index; 2578c2ecf20Sopenharmony_ci u8 ud_start_bd_index; 2588c2ecf20Sopenharmony_ci u8 num_bds; 2598c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 2608c2ecf20Sopenharmony_ci u8 num_bds; 2618c2ecf20Sopenharmony_ci u8 ud_start_bd_index; 2628c2ecf20Sopenharmony_ci u8 sd_start_bd_index; 2638c2ecf20Sopenharmony_ci u8 cq_index; 2648c2ecf20Sopenharmony_ci#endif 2658c2ecf20Sopenharmony_ci}; 2668c2ecf20Sopenharmony_ci 2678c2ecf20Sopenharmony_ci 2688c2ecf20Sopenharmony_ci/* 2698c2ecf20Sopenharmony_ci * task statistics for write response 2708c2ecf20Sopenharmony_ci */ 2718c2ecf20Sopenharmony_cistruct bnx2i_write_resp_task_stat { 2728c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 2738c2ecf20Sopenharmony_ci u16 num_r2ts; 2748c2ecf20Sopenharmony_ci u16 num_data_outs; 2758c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 2768c2ecf20Sopenharmony_ci u16 num_data_outs; 2778c2ecf20Sopenharmony_ci u16 num_r2ts; 2788c2ecf20Sopenharmony_ci#endif 2798c2ecf20Sopenharmony_ci}; 2808c2ecf20Sopenharmony_ci 2818c2ecf20Sopenharmony_ci/* 2828c2ecf20Sopenharmony_ci * task statistics for read response 2838c2ecf20Sopenharmony_ci */ 2848c2ecf20Sopenharmony_cistruct bnx2i_read_resp_task_stat { 2858c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 2868c2ecf20Sopenharmony_ci u16 reserved; 2878c2ecf20Sopenharmony_ci u16 num_data_ins; 2888c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 2898c2ecf20Sopenharmony_ci u16 num_data_ins; 2908c2ecf20Sopenharmony_ci u16 reserved; 2918c2ecf20Sopenharmony_ci#endif 2928c2ecf20Sopenharmony_ci}; 2938c2ecf20Sopenharmony_ci 2948c2ecf20Sopenharmony_ci/* 2958c2ecf20Sopenharmony_ci * task statistics for iSCSI cmd response 2968c2ecf20Sopenharmony_ci */ 2978c2ecf20Sopenharmony_ciunion bnx2i_cmd_resp_task_stat { 2988c2ecf20Sopenharmony_ci struct bnx2i_write_resp_task_stat write_stat; 2998c2ecf20Sopenharmony_ci struct bnx2i_read_resp_task_stat read_stat; 3008c2ecf20Sopenharmony_ci}; 3018c2ecf20Sopenharmony_ci 3028c2ecf20Sopenharmony_ci/* 3038c2ecf20Sopenharmony_ci * SCSI Command CQE 3048c2ecf20Sopenharmony_ci */ 3058c2ecf20Sopenharmony_cistruct bnx2i_cmd_response { 3068c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 3078c2ecf20Sopenharmony_ci u8 op_code; 3088c2ecf20Sopenharmony_ci u8 response_flags; 3098c2ecf20Sopenharmony_ci#define ISCSI_CMD_RESPONSE_RESERVED0 (0x1<<0) 3108c2ecf20Sopenharmony_ci#define ISCSI_CMD_RESPONSE_RESERVED0_SHIFT 0 3118c2ecf20Sopenharmony_ci#define ISCSI_CMD_RESPONSE_RESIDUAL_UNDERFLOW (0x1<<1) 3128c2ecf20Sopenharmony_ci#define ISCSI_CMD_RESPONSE_RESIDUAL_UNDERFLOW_SHIFT 1 3138c2ecf20Sopenharmony_ci#define ISCSI_CMD_RESPONSE_RESIDUAL_OVERFLOW (0x1<<2) 3148c2ecf20Sopenharmony_ci#define ISCSI_CMD_RESPONSE_RESIDUAL_OVERFLOW_SHIFT 2 3158c2ecf20Sopenharmony_ci#define ISCSI_CMD_RESPONSE_BR_RESIDUAL_UNDERFLOW (0x1<<3) 3168c2ecf20Sopenharmony_ci#define ISCSI_CMD_RESPONSE_BR_RESIDUAL_UNDERFLOW_SHIFT 3 3178c2ecf20Sopenharmony_ci#define ISCSI_CMD_RESPONSE_BR_RESIDUAL_OVERFLOW (0x1<<4) 3188c2ecf20Sopenharmony_ci#define ISCSI_CMD_RESPONSE_BR_RESIDUAL_OVERFLOW_SHIFT 4 3198c2ecf20Sopenharmony_ci#define ISCSI_CMD_RESPONSE_RESERVED1 (0x7<<5) 3208c2ecf20Sopenharmony_ci#define ISCSI_CMD_RESPONSE_RESERVED1_SHIFT 5 3218c2ecf20Sopenharmony_ci u8 response; 3228c2ecf20Sopenharmony_ci u8 status; 3238c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 3248c2ecf20Sopenharmony_ci u8 status; 3258c2ecf20Sopenharmony_ci u8 response; 3268c2ecf20Sopenharmony_ci u8 response_flags; 3278c2ecf20Sopenharmony_ci#define ISCSI_CMD_RESPONSE_RESERVED0 (0x1<<0) 3288c2ecf20Sopenharmony_ci#define ISCSI_CMD_RESPONSE_RESERVED0_SHIFT 0 3298c2ecf20Sopenharmony_ci#define ISCSI_CMD_RESPONSE_RESIDUAL_UNDERFLOW (0x1<<1) 3308c2ecf20Sopenharmony_ci#define ISCSI_CMD_RESPONSE_RESIDUAL_UNDERFLOW_SHIFT 1 3318c2ecf20Sopenharmony_ci#define ISCSI_CMD_RESPONSE_RESIDUAL_OVERFLOW (0x1<<2) 3328c2ecf20Sopenharmony_ci#define ISCSI_CMD_RESPONSE_RESIDUAL_OVERFLOW_SHIFT 2 3338c2ecf20Sopenharmony_ci#define ISCSI_CMD_RESPONSE_BR_RESIDUAL_UNDERFLOW (0x1<<3) 3348c2ecf20Sopenharmony_ci#define ISCSI_CMD_RESPONSE_BR_RESIDUAL_UNDERFLOW_SHIFT 3 3358c2ecf20Sopenharmony_ci#define ISCSI_CMD_RESPONSE_BR_RESIDUAL_OVERFLOW (0x1<<4) 3368c2ecf20Sopenharmony_ci#define ISCSI_CMD_RESPONSE_BR_RESIDUAL_OVERFLOW_SHIFT 4 3378c2ecf20Sopenharmony_ci#define ISCSI_CMD_RESPONSE_RESERVED1 (0x7<<5) 3388c2ecf20Sopenharmony_ci#define ISCSI_CMD_RESPONSE_RESERVED1_SHIFT 5 3398c2ecf20Sopenharmony_ci u8 op_code; 3408c2ecf20Sopenharmony_ci#endif 3418c2ecf20Sopenharmony_ci u32 data_length; 3428c2ecf20Sopenharmony_ci u32 exp_cmd_sn; 3438c2ecf20Sopenharmony_ci u32 max_cmd_sn; 3448c2ecf20Sopenharmony_ci u32 reserved2; 3458c2ecf20Sopenharmony_ci u32 residual_count; 3468c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 3478c2ecf20Sopenharmony_ci u16 reserved4; 3488c2ecf20Sopenharmony_ci u8 err_code; 3498c2ecf20Sopenharmony_ci u8 reserved3; 3508c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 3518c2ecf20Sopenharmony_ci u8 reserved3; 3528c2ecf20Sopenharmony_ci u8 err_code; 3538c2ecf20Sopenharmony_ci u16 reserved4; 3548c2ecf20Sopenharmony_ci#endif 3558c2ecf20Sopenharmony_ci u32 reserved5[5]; 3568c2ecf20Sopenharmony_ci union bnx2i_cmd_resp_task_stat task_stat; 3578c2ecf20Sopenharmony_ci u32 reserved6; 3588c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 3598c2ecf20Sopenharmony_ci u16 reserved7; 3608c2ecf20Sopenharmony_ci u16 itt; 3618c2ecf20Sopenharmony_ci#define ISCSI_CMD_RESPONSE_INDEX (0x3FFF<<0) 3628c2ecf20Sopenharmony_ci#define ISCSI_CMD_RESPONSE_INDEX_SHIFT 0 3638c2ecf20Sopenharmony_ci#define ISCSI_CMD_RESPONSE_TYPE (0x3<<14) 3648c2ecf20Sopenharmony_ci#define ISCSI_CMD_RESPONSE_TYPE_SHIFT 14 3658c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 3668c2ecf20Sopenharmony_ci u16 itt; 3678c2ecf20Sopenharmony_ci#define ISCSI_CMD_RESPONSE_INDEX (0x3FFF<<0) 3688c2ecf20Sopenharmony_ci#define ISCSI_CMD_RESPONSE_INDEX_SHIFT 0 3698c2ecf20Sopenharmony_ci#define ISCSI_CMD_RESPONSE_TYPE (0x3<<14) 3708c2ecf20Sopenharmony_ci#define ISCSI_CMD_RESPONSE_TYPE_SHIFT 14 3718c2ecf20Sopenharmony_ci u16 reserved7; 3728c2ecf20Sopenharmony_ci#endif 3738c2ecf20Sopenharmony_ci u32 cq_req_sn; 3748c2ecf20Sopenharmony_ci}; 3758c2ecf20Sopenharmony_ci 3768c2ecf20Sopenharmony_ci 3778c2ecf20Sopenharmony_ci 3788c2ecf20Sopenharmony_ci/* 3798c2ecf20Sopenharmony_ci * firmware middle-path request SQ WQE 3808c2ecf20Sopenharmony_ci */ 3818c2ecf20Sopenharmony_cistruct bnx2i_fw_mp_request { 3828c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 3838c2ecf20Sopenharmony_ci u8 op_code; 3848c2ecf20Sopenharmony_ci u8 op_attr; 3858c2ecf20Sopenharmony_ci u16 hdr_opaque1; 3868c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 3878c2ecf20Sopenharmony_ci u16 hdr_opaque1; 3888c2ecf20Sopenharmony_ci u8 op_attr; 3898c2ecf20Sopenharmony_ci u8 op_code; 3908c2ecf20Sopenharmony_ci#endif 3918c2ecf20Sopenharmony_ci u32 data_length; 3928c2ecf20Sopenharmony_ci u32 hdr_opaque2[2]; 3938c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 3948c2ecf20Sopenharmony_ci u16 reserved0; 3958c2ecf20Sopenharmony_ci u16 itt; 3968c2ecf20Sopenharmony_ci#define ISCSI_FW_MP_REQUEST_INDEX (0x3FFF<<0) 3978c2ecf20Sopenharmony_ci#define ISCSI_FW_MP_REQUEST_INDEX_SHIFT 0 3988c2ecf20Sopenharmony_ci#define ISCSI_FW_MP_REQUEST_TYPE (0x3<<14) 3998c2ecf20Sopenharmony_ci#define ISCSI_FW_MP_REQUEST_TYPE_SHIFT 14 4008c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 4018c2ecf20Sopenharmony_ci u16 itt; 4028c2ecf20Sopenharmony_ci#define ISCSI_FW_MP_REQUEST_INDEX (0x3FFF<<0) 4038c2ecf20Sopenharmony_ci#define ISCSI_FW_MP_REQUEST_INDEX_SHIFT 0 4048c2ecf20Sopenharmony_ci#define ISCSI_FW_MP_REQUEST_TYPE (0x3<<14) 4058c2ecf20Sopenharmony_ci#define ISCSI_FW_MP_REQUEST_TYPE_SHIFT 14 4068c2ecf20Sopenharmony_ci u16 reserved0; 4078c2ecf20Sopenharmony_ci#endif 4088c2ecf20Sopenharmony_ci u32 hdr_opaque3[4]; 4098c2ecf20Sopenharmony_ci u32 resp_bd_list_addr_lo; 4108c2ecf20Sopenharmony_ci u32 resp_bd_list_addr_hi; 4118c2ecf20Sopenharmony_ci u32 resp_buffer; 4128c2ecf20Sopenharmony_ci#define ISCSI_FW_MP_REQUEST_RESP_BUFFER_LENGTH (0xFFFFFF<<0) 4138c2ecf20Sopenharmony_ci#define ISCSI_FW_MP_REQUEST_RESP_BUFFER_LENGTH_SHIFT 0 4148c2ecf20Sopenharmony_ci#define ISCSI_FW_MP_REQUEST_NUM_RESP_BDS (0xFF<<24) 4158c2ecf20Sopenharmony_ci#define ISCSI_FW_MP_REQUEST_NUM_RESP_BDS_SHIFT 24 4168c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 4178c2ecf20Sopenharmony_ci u16 reserved4; 4188c2ecf20Sopenharmony_ci u8 reserved3; 4198c2ecf20Sopenharmony_ci u8 flags; 4208c2ecf20Sopenharmony_ci#define ISCSI_FW_MP_REQUEST_RESERVED1 (0x1<<0) 4218c2ecf20Sopenharmony_ci#define ISCSI_FW_MP_REQUEST_RESERVED1_SHIFT 0 4228c2ecf20Sopenharmony_ci#define ISCSI_FW_MP_REQUEST_LOCAL_COMPLETION (0x1<<1) 4238c2ecf20Sopenharmony_ci#define ISCSI_FW_MP_REQUEST_LOCAL_COMPLETION_SHIFT 1 4248c2ecf20Sopenharmony_ci#define ISCSI_FW_MP_REQUEST_UPDATE_EXP_STAT_SN (0x1<<2) 4258c2ecf20Sopenharmony_ci#define ISCSI_FW_MP_REQUEST_UPDATE_EXP_STAT_SN_SHIFT 2 4268c2ecf20Sopenharmony_ci#define ISCSI_FW_MP_REQUEST_RESERVED2 (0x1F<<3) 4278c2ecf20Sopenharmony_ci#define ISCSI_FW_MP_REQUEST_RESERVED2_SHIFT 3 4288c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 4298c2ecf20Sopenharmony_ci u8 flags; 4308c2ecf20Sopenharmony_ci#define ISCSI_FW_MP_REQUEST_RESERVED1 (0x1<<0) 4318c2ecf20Sopenharmony_ci#define ISCSI_FW_MP_REQUEST_RESERVED1_SHIFT 0 4328c2ecf20Sopenharmony_ci#define ISCSI_FW_MP_REQUEST_LOCAL_COMPLETION (0x1<<1) 4338c2ecf20Sopenharmony_ci#define ISCSI_FW_MP_REQUEST_LOCAL_COMPLETION_SHIFT 1 4348c2ecf20Sopenharmony_ci#define ISCSI_FW_MP_REQUEST_UPDATE_EXP_STAT_SN (0x1<<2) 4358c2ecf20Sopenharmony_ci#define ISCSI_FW_MP_REQUEST_UPDATE_EXP_STAT_SN_SHIFT 2 4368c2ecf20Sopenharmony_ci#define ISCSI_FW_MP_REQUEST_RESERVED2 (0x1F<<3) 4378c2ecf20Sopenharmony_ci#define ISCSI_FW_MP_REQUEST_RESERVED2_SHIFT 3 4388c2ecf20Sopenharmony_ci u8 reserved3; 4398c2ecf20Sopenharmony_ci u16 reserved4; 4408c2ecf20Sopenharmony_ci#endif 4418c2ecf20Sopenharmony_ci u32 bd_list_addr_lo; 4428c2ecf20Sopenharmony_ci u32 bd_list_addr_hi; 4438c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 4448c2ecf20Sopenharmony_ci u8 cq_index; 4458c2ecf20Sopenharmony_ci u8 reserved6; 4468c2ecf20Sopenharmony_ci u8 reserved5; 4478c2ecf20Sopenharmony_ci u8 num_bds; 4488c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 4498c2ecf20Sopenharmony_ci u8 num_bds; 4508c2ecf20Sopenharmony_ci u8 reserved5; 4518c2ecf20Sopenharmony_ci u8 reserved6; 4528c2ecf20Sopenharmony_ci u8 cq_index; 4538c2ecf20Sopenharmony_ci#endif 4548c2ecf20Sopenharmony_ci}; 4558c2ecf20Sopenharmony_ci 4568c2ecf20Sopenharmony_ci 4578c2ecf20Sopenharmony_ci/* 4588c2ecf20Sopenharmony_ci * firmware response - CQE: used only by firmware 4598c2ecf20Sopenharmony_ci */ 4608c2ecf20Sopenharmony_cistruct bnx2i_fw_response { 4618c2ecf20Sopenharmony_ci u32 hdr_dword1[2]; 4628c2ecf20Sopenharmony_ci u32 hdr_exp_cmd_sn; 4638c2ecf20Sopenharmony_ci u32 hdr_max_cmd_sn; 4648c2ecf20Sopenharmony_ci u32 hdr_ttt; 4658c2ecf20Sopenharmony_ci u32 hdr_res_cnt; 4668c2ecf20Sopenharmony_ci u32 cqe_flags; 4678c2ecf20Sopenharmony_ci#define ISCSI_FW_RESPONSE_RESERVED2 (0xFF<<0) 4688c2ecf20Sopenharmony_ci#define ISCSI_FW_RESPONSE_RESERVED2_SHIFT 0 4698c2ecf20Sopenharmony_ci#define ISCSI_FW_RESPONSE_ERR_CODE (0xFF<<8) 4708c2ecf20Sopenharmony_ci#define ISCSI_FW_RESPONSE_ERR_CODE_SHIFT 8 4718c2ecf20Sopenharmony_ci#define ISCSI_FW_RESPONSE_RESERVED3 (0xFFFF<<16) 4728c2ecf20Sopenharmony_ci#define ISCSI_FW_RESPONSE_RESERVED3_SHIFT 16 4738c2ecf20Sopenharmony_ci u32 stat_sn; 4748c2ecf20Sopenharmony_ci u32 hdr_dword2[2]; 4758c2ecf20Sopenharmony_ci u32 hdr_dword3[2]; 4768c2ecf20Sopenharmony_ci u32 task_stat; 4778c2ecf20Sopenharmony_ci u32 reserved0; 4788c2ecf20Sopenharmony_ci u32 hdr_itt; 4798c2ecf20Sopenharmony_ci u32 cq_req_sn; 4808c2ecf20Sopenharmony_ci}; 4818c2ecf20Sopenharmony_ci 4828c2ecf20Sopenharmony_ci 4838c2ecf20Sopenharmony_ci/* 4848c2ecf20Sopenharmony_ci * iSCSI KCQ CQE parameters 4858c2ecf20Sopenharmony_ci */ 4868c2ecf20Sopenharmony_ciunion iscsi_kcqe_params { 4878c2ecf20Sopenharmony_ci u32 reserved0[4]; 4888c2ecf20Sopenharmony_ci}; 4898c2ecf20Sopenharmony_ci 4908c2ecf20Sopenharmony_ci/* 4918c2ecf20Sopenharmony_ci * iSCSI KCQ CQE 4928c2ecf20Sopenharmony_ci */ 4938c2ecf20Sopenharmony_cistruct iscsi_kcqe { 4948c2ecf20Sopenharmony_ci u32 iscsi_conn_id; 4958c2ecf20Sopenharmony_ci u32 completion_status; 4968c2ecf20Sopenharmony_ci u32 iscsi_conn_context_id; 4978c2ecf20Sopenharmony_ci union iscsi_kcqe_params params; 4988c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 4998c2ecf20Sopenharmony_ci u8 flags; 5008c2ecf20Sopenharmony_ci#define ISCSI_KCQE_RESERVED0 (0xF<<0) 5018c2ecf20Sopenharmony_ci#define ISCSI_KCQE_RESERVED0_SHIFT 0 5028c2ecf20Sopenharmony_ci#define ISCSI_KCQE_LAYER_CODE (0x7<<4) 5038c2ecf20Sopenharmony_ci#define ISCSI_KCQE_LAYER_CODE_SHIFT 4 5048c2ecf20Sopenharmony_ci#define ISCSI_KCQE_RESERVED1 (0x1<<7) 5058c2ecf20Sopenharmony_ci#define ISCSI_KCQE_RESERVED1_SHIFT 7 5068c2ecf20Sopenharmony_ci u8 op_code; 5078c2ecf20Sopenharmony_ci u16 qe_self_seq; 5088c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 5098c2ecf20Sopenharmony_ci u16 qe_self_seq; 5108c2ecf20Sopenharmony_ci u8 op_code; 5118c2ecf20Sopenharmony_ci u8 flags; 5128c2ecf20Sopenharmony_ci#define ISCSI_KCQE_RESERVED0 (0xF<<0) 5138c2ecf20Sopenharmony_ci#define ISCSI_KCQE_RESERVED0_SHIFT 0 5148c2ecf20Sopenharmony_ci#define ISCSI_KCQE_LAYER_CODE (0x7<<4) 5158c2ecf20Sopenharmony_ci#define ISCSI_KCQE_LAYER_CODE_SHIFT 4 5168c2ecf20Sopenharmony_ci#define ISCSI_KCQE_RESERVED1 (0x1<<7) 5178c2ecf20Sopenharmony_ci#define ISCSI_KCQE_RESERVED1_SHIFT 7 5188c2ecf20Sopenharmony_ci#endif 5198c2ecf20Sopenharmony_ci}; 5208c2ecf20Sopenharmony_ci 5218c2ecf20Sopenharmony_ci 5228c2ecf20Sopenharmony_ci 5238c2ecf20Sopenharmony_ci/* 5248c2ecf20Sopenharmony_ci * iSCSI KWQE header 5258c2ecf20Sopenharmony_ci */ 5268c2ecf20Sopenharmony_cistruct iscsi_kwqe_header { 5278c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 5288c2ecf20Sopenharmony_ci u8 flags; 5298c2ecf20Sopenharmony_ci#define ISCSI_KWQE_HEADER_RESERVED0 (0xF<<0) 5308c2ecf20Sopenharmony_ci#define ISCSI_KWQE_HEADER_RESERVED0_SHIFT 0 5318c2ecf20Sopenharmony_ci#define ISCSI_KWQE_HEADER_LAYER_CODE (0x7<<4) 5328c2ecf20Sopenharmony_ci#define ISCSI_KWQE_HEADER_LAYER_CODE_SHIFT 4 5338c2ecf20Sopenharmony_ci#define ISCSI_KWQE_HEADER_RESERVED1 (0x1<<7) 5348c2ecf20Sopenharmony_ci#define ISCSI_KWQE_HEADER_RESERVED1_SHIFT 7 5358c2ecf20Sopenharmony_ci u8 op_code; 5368c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 5378c2ecf20Sopenharmony_ci u8 op_code; 5388c2ecf20Sopenharmony_ci u8 flags; 5398c2ecf20Sopenharmony_ci#define ISCSI_KWQE_HEADER_RESERVED0 (0xF<<0) 5408c2ecf20Sopenharmony_ci#define ISCSI_KWQE_HEADER_RESERVED0_SHIFT 0 5418c2ecf20Sopenharmony_ci#define ISCSI_KWQE_HEADER_LAYER_CODE (0x7<<4) 5428c2ecf20Sopenharmony_ci#define ISCSI_KWQE_HEADER_LAYER_CODE_SHIFT 4 5438c2ecf20Sopenharmony_ci#define ISCSI_KWQE_HEADER_RESERVED1 (0x1<<7) 5448c2ecf20Sopenharmony_ci#define ISCSI_KWQE_HEADER_RESERVED1_SHIFT 7 5458c2ecf20Sopenharmony_ci#endif 5468c2ecf20Sopenharmony_ci}; 5478c2ecf20Sopenharmony_ci 5488c2ecf20Sopenharmony_ci/* 5498c2ecf20Sopenharmony_ci * iSCSI firmware init request 1 5508c2ecf20Sopenharmony_ci */ 5518c2ecf20Sopenharmony_cistruct iscsi_kwqe_init1 { 5528c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 5538c2ecf20Sopenharmony_ci struct iscsi_kwqe_header hdr; 5548c2ecf20Sopenharmony_ci u8 reserved0; 5558c2ecf20Sopenharmony_ci u8 num_cqs; 5568c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 5578c2ecf20Sopenharmony_ci u8 num_cqs; 5588c2ecf20Sopenharmony_ci u8 reserved0; 5598c2ecf20Sopenharmony_ci struct iscsi_kwqe_header hdr; 5608c2ecf20Sopenharmony_ci#endif 5618c2ecf20Sopenharmony_ci u32 dummy_buffer_addr_lo; 5628c2ecf20Sopenharmony_ci u32 dummy_buffer_addr_hi; 5638c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 5648c2ecf20Sopenharmony_ci u16 num_ccells_per_conn; 5658c2ecf20Sopenharmony_ci u16 num_tasks_per_conn; 5668c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 5678c2ecf20Sopenharmony_ci u16 num_tasks_per_conn; 5688c2ecf20Sopenharmony_ci u16 num_ccells_per_conn; 5698c2ecf20Sopenharmony_ci#endif 5708c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 5718c2ecf20Sopenharmony_ci u16 sq_wqes_per_page; 5728c2ecf20Sopenharmony_ci u16 sq_num_wqes; 5738c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 5748c2ecf20Sopenharmony_ci u16 sq_num_wqes; 5758c2ecf20Sopenharmony_ci u16 sq_wqes_per_page; 5768c2ecf20Sopenharmony_ci#endif 5778c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 5788c2ecf20Sopenharmony_ci u8 cq_log_wqes_per_page; 5798c2ecf20Sopenharmony_ci u8 flags; 5808c2ecf20Sopenharmony_ci#define ISCSI_KWQE_INIT1_PAGE_SIZE (0xF<<0) 5818c2ecf20Sopenharmony_ci#define ISCSI_KWQE_INIT1_PAGE_SIZE_SHIFT 0 5828c2ecf20Sopenharmony_ci#define ISCSI_KWQE_INIT1_DELAYED_ACK_ENABLE (0x1<<4) 5838c2ecf20Sopenharmony_ci#define ISCSI_KWQE_INIT1_DELAYED_ACK_ENABLE_SHIFT 4 5848c2ecf20Sopenharmony_ci#define ISCSI_KWQE_INIT1_KEEP_ALIVE_ENABLE (0x1<<5) 5858c2ecf20Sopenharmony_ci#define ISCSI_KWQE_INIT1_KEEP_ALIVE_ENABLE_SHIFT 5 5868c2ecf20Sopenharmony_ci#define ISCSI_KWQE_INIT1_TIME_STAMPS_ENABLE (0x1<<6) 5878c2ecf20Sopenharmony_ci#define ISCSI_KWQE_INIT1_TIME_STAMPS_ENABLE_SHIFT 6 5888c2ecf20Sopenharmony_ci#define ISCSI_KWQE_INIT1_RESERVED1 (0x1<<7) 5898c2ecf20Sopenharmony_ci#define ISCSI_KWQE_INIT1_RESERVED1_SHIFT 7 5908c2ecf20Sopenharmony_ci u16 cq_num_wqes; 5918c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 5928c2ecf20Sopenharmony_ci u16 cq_num_wqes; 5938c2ecf20Sopenharmony_ci u8 flags; 5948c2ecf20Sopenharmony_ci#define ISCSI_KWQE_INIT1_PAGE_SIZE (0xF<<0) 5958c2ecf20Sopenharmony_ci#define ISCSI_KWQE_INIT1_PAGE_SIZE_SHIFT 0 5968c2ecf20Sopenharmony_ci#define ISCSI_KWQE_INIT1_DELAYED_ACK_ENABLE (0x1<<4) 5978c2ecf20Sopenharmony_ci#define ISCSI_KWQE_INIT1_DELAYED_ACK_ENABLE_SHIFT 4 5988c2ecf20Sopenharmony_ci#define ISCSI_KWQE_INIT1_KEEP_ALIVE_ENABLE (0x1<<5) 5998c2ecf20Sopenharmony_ci#define ISCSI_KWQE_INIT1_KEEP_ALIVE_ENABLE_SHIFT 5 6008c2ecf20Sopenharmony_ci#define ISCSI_KWQE_INIT1_TIME_STAMPS_ENABLE (0x1<<6) 6018c2ecf20Sopenharmony_ci#define ISCSI_KWQE_INIT1_TIME_STAMPS_ENABLE_SHIFT 6 6028c2ecf20Sopenharmony_ci#define ISCSI_KWQE_INIT1_RESERVED1 (0x1<<7) 6038c2ecf20Sopenharmony_ci#define ISCSI_KWQE_INIT1_RESERVED1_SHIFT 7 6048c2ecf20Sopenharmony_ci u8 cq_log_wqes_per_page; 6058c2ecf20Sopenharmony_ci#endif 6068c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 6078c2ecf20Sopenharmony_ci u16 cq_num_pages; 6088c2ecf20Sopenharmony_ci u16 sq_num_pages; 6098c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 6108c2ecf20Sopenharmony_ci u16 sq_num_pages; 6118c2ecf20Sopenharmony_ci u16 cq_num_pages; 6128c2ecf20Sopenharmony_ci#endif 6138c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 6148c2ecf20Sopenharmony_ci u16 rq_buffer_size; 6158c2ecf20Sopenharmony_ci u16 rq_num_wqes; 6168c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 6178c2ecf20Sopenharmony_ci u16 rq_num_wqes; 6188c2ecf20Sopenharmony_ci u16 rq_buffer_size; 6198c2ecf20Sopenharmony_ci#endif 6208c2ecf20Sopenharmony_ci}; 6218c2ecf20Sopenharmony_ci 6228c2ecf20Sopenharmony_ci/* 6238c2ecf20Sopenharmony_ci * iSCSI firmware init request 2 6248c2ecf20Sopenharmony_ci */ 6258c2ecf20Sopenharmony_cistruct iscsi_kwqe_init2 { 6268c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 6278c2ecf20Sopenharmony_ci struct iscsi_kwqe_header hdr; 6288c2ecf20Sopenharmony_ci u16 max_cq_sqn; 6298c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 6308c2ecf20Sopenharmony_ci u16 max_cq_sqn; 6318c2ecf20Sopenharmony_ci struct iscsi_kwqe_header hdr; 6328c2ecf20Sopenharmony_ci#endif 6338c2ecf20Sopenharmony_ci u32 error_bit_map[2]; 6348c2ecf20Sopenharmony_ci u32 reserved1[5]; 6358c2ecf20Sopenharmony_ci}; 6368c2ecf20Sopenharmony_ci 6378c2ecf20Sopenharmony_ci/* 6388c2ecf20Sopenharmony_ci * Initial iSCSI connection offload request 1 6398c2ecf20Sopenharmony_ci */ 6408c2ecf20Sopenharmony_cistruct iscsi_kwqe_conn_offload1 { 6418c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 6428c2ecf20Sopenharmony_ci struct iscsi_kwqe_header hdr; 6438c2ecf20Sopenharmony_ci u16 iscsi_conn_id; 6448c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 6458c2ecf20Sopenharmony_ci u16 iscsi_conn_id; 6468c2ecf20Sopenharmony_ci struct iscsi_kwqe_header hdr; 6478c2ecf20Sopenharmony_ci#endif 6488c2ecf20Sopenharmony_ci u32 sq_page_table_addr_lo; 6498c2ecf20Sopenharmony_ci u32 sq_page_table_addr_hi; 6508c2ecf20Sopenharmony_ci u32 cq_page_table_addr_lo; 6518c2ecf20Sopenharmony_ci u32 cq_page_table_addr_hi; 6528c2ecf20Sopenharmony_ci u32 reserved0[3]; 6538c2ecf20Sopenharmony_ci}; 6548c2ecf20Sopenharmony_ci 6558c2ecf20Sopenharmony_ci/* 6568c2ecf20Sopenharmony_ci * iSCSI Page Table Entry (PTE) 6578c2ecf20Sopenharmony_ci */ 6588c2ecf20Sopenharmony_cistruct iscsi_pte { 6598c2ecf20Sopenharmony_ci u32 hi; 6608c2ecf20Sopenharmony_ci u32 lo; 6618c2ecf20Sopenharmony_ci}; 6628c2ecf20Sopenharmony_ci 6638c2ecf20Sopenharmony_ci/* 6648c2ecf20Sopenharmony_ci * Initial iSCSI connection offload request 2 6658c2ecf20Sopenharmony_ci */ 6668c2ecf20Sopenharmony_cistruct iscsi_kwqe_conn_offload2 { 6678c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 6688c2ecf20Sopenharmony_ci struct iscsi_kwqe_header hdr; 6698c2ecf20Sopenharmony_ci u16 reserved0; 6708c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 6718c2ecf20Sopenharmony_ci u16 reserved0; 6728c2ecf20Sopenharmony_ci struct iscsi_kwqe_header hdr; 6738c2ecf20Sopenharmony_ci#endif 6748c2ecf20Sopenharmony_ci u32 rq_page_table_addr_lo; 6758c2ecf20Sopenharmony_ci u32 rq_page_table_addr_hi; 6768c2ecf20Sopenharmony_ci struct iscsi_pte sq_first_pte; 6778c2ecf20Sopenharmony_ci struct iscsi_pte cq_first_pte; 6788c2ecf20Sopenharmony_ci u32 num_additional_wqes; 6798c2ecf20Sopenharmony_ci}; 6808c2ecf20Sopenharmony_ci 6818c2ecf20Sopenharmony_ci 6828c2ecf20Sopenharmony_ci/* 6838c2ecf20Sopenharmony_ci * Initial iSCSI connection offload request 3 6848c2ecf20Sopenharmony_ci */ 6858c2ecf20Sopenharmony_cistruct iscsi_kwqe_conn_offload3 { 6868c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 6878c2ecf20Sopenharmony_ci struct iscsi_kwqe_header hdr; 6888c2ecf20Sopenharmony_ci u16 reserved0; 6898c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 6908c2ecf20Sopenharmony_ci u16 reserved0; 6918c2ecf20Sopenharmony_ci struct iscsi_kwqe_header hdr; 6928c2ecf20Sopenharmony_ci#endif 6938c2ecf20Sopenharmony_ci u32 reserved1; 6948c2ecf20Sopenharmony_ci struct iscsi_pte qp_first_pte[3]; 6958c2ecf20Sopenharmony_ci}; 6968c2ecf20Sopenharmony_ci 6978c2ecf20Sopenharmony_ci 6988c2ecf20Sopenharmony_ci/* 6998c2ecf20Sopenharmony_ci * iSCSI connection update request 7008c2ecf20Sopenharmony_ci */ 7018c2ecf20Sopenharmony_cistruct iscsi_kwqe_conn_update { 7028c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 7038c2ecf20Sopenharmony_ci struct iscsi_kwqe_header hdr; 7048c2ecf20Sopenharmony_ci u16 reserved0; 7058c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 7068c2ecf20Sopenharmony_ci u16 reserved0; 7078c2ecf20Sopenharmony_ci struct iscsi_kwqe_header hdr; 7088c2ecf20Sopenharmony_ci#endif 7098c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 7108c2ecf20Sopenharmony_ci u8 session_error_recovery_level; 7118c2ecf20Sopenharmony_ci u8 max_outstanding_r2ts; 7128c2ecf20Sopenharmony_ci u8 reserved2; 7138c2ecf20Sopenharmony_ci u8 conn_flags; 7148c2ecf20Sopenharmony_ci#define ISCSI_KWQE_CONN_UPDATE_HEADER_DIGEST (0x1<<0) 7158c2ecf20Sopenharmony_ci#define ISCSI_KWQE_CONN_UPDATE_HEADER_DIGEST_SHIFT 0 7168c2ecf20Sopenharmony_ci#define ISCSI_KWQE_CONN_UPDATE_DATA_DIGEST (0x1<<1) 7178c2ecf20Sopenharmony_ci#define ISCSI_KWQE_CONN_UPDATE_DATA_DIGEST_SHIFT 1 7188c2ecf20Sopenharmony_ci#define ISCSI_KWQE_CONN_UPDATE_INITIAL_R2T (0x1<<2) 7198c2ecf20Sopenharmony_ci#define ISCSI_KWQE_CONN_UPDATE_INITIAL_R2T_SHIFT 2 7208c2ecf20Sopenharmony_ci#define ISCSI_KWQE_CONN_UPDATE_IMMEDIATE_DATA (0x1<<3) 7218c2ecf20Sopenharmony_ci#define ISCSI_KWQE_CONN_UPDATE_IMMEDIATE_DATA_SHIFT 3 7228c2ecf20Sopenharmony_ci#define ISCSI_KWQE_CONN_UPDATE_OOO_SUPPORT_MODE (0x3<<4) 7238c2ecf20Sopenharmony_ci#define ISCSI_KWQE_CONN_UPDATE_OOO_SUPPORT_MODE_SHIFT 4 7248c2ecf20Sopenharmony_ci#define ISCSI_KWQE_CONN_UPDATE_RESERVED1 (0x3<<6) 7258c2ecf20Sopenharmony_ci#define ISCSI_KWQE_CONN_UPDATE_RESERVED1_SHIFT 6 7268c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 7278c2ecf20Sopenharmony_ci u8 conn_flags; 7288c2ecf20Sopenharmony_ci#define ISCSI_KWQE_CONN_UPDATE_HEADER_DIGEST (0x1<<0) 7298c2ecf20Sopenharmony_ci#define ISCSI_KWQE_CONN_UPDATE_HEADER_DIGEST_SHIFT 0 7308c2ecf20Sopenharmony_ci#define ISCSI_KWQE_CONN_UPDATE_DATA_DIGEST (0x1<<1) 7318c2ecf20Sopenharmony_ci#define ISCSI_KWQE_CONN_UPDATE_DATA_DIGEST_SHIFT 1 7328c2ecf20Sopenharmony_ci#define ISCSI_KWQE_CONN_UPDATE_INITIAL_R2T (0x1<<2) 7338c2ecf20Sopenharmony_ci#define ISCSI_KWQE_CONN_UPDATE_INITIAL_R2T_SHIFT 2 7348c2ecf20Sopenharmony_ci#define ISCSI_KWQE_CONN_UPDATE_IMMEDIATE_DATA (0x1<<3) 7358c2ecf20Sopenharmony_ci#define ISCSI_KWQE_CONN_UPDATE_IMMEDIATE_DATA_SHIFT 3 7368c2ecf20Sopenharmony_ci#define ISCSI_KWQE_CONN_UPDATE_OOO_SUPPORT_MODE (0x3<<4) 7378c2ecf20Sopenharmony_ci#define ISCSI_KWQE_CONN_UPDATE_OOO_SUPPORT_MODE_SHIFT 4 7388c2ecf20Sopenharmony_ci#define ISCSI_KWQE_CONN_UPDATE_RESERVED1 (0x3<<6) 7398c2ecf20Sopenharmony_ci#define ISCSI_KWQE_CONN_UPDATE_RESERVED1_SHIFT 6 7408c2ecf20Sopenharmony_ci u8 reserved2; 7418c2ecf20Sopenharmony_ci u8 max_outstanding_r2ts; 7428c2ecf20Sopenharmony_ci u8 session_error_recovery_level; 7438c2ecf20Sopenharmony_ci#endif 7448c2ecf20Sopenharmony_ci u32 context_id; 7458c2ecf20Sopenharmony_ci u32 max_send_pdu_length; 7468c2ecf20Sopenharmony_ci u32 max_recv_pdu_length; 7478c2ecf20Sopenharmony_ci u32 first_burst_length; 7488c2ecf20Sopenharmony_ci u32 max_burst_length; 7498c2ecf20Sopenharmony_ci u32 exp_stat_sn; 7508c2ecf20Sopenharmony_ci}; 7518c2ecf20Sopenharmony_ci 7528c2ecf20Sopenharmony_ci/* 7538c2ecf20Sopenharmony_ci * iSCSI destroy connection request 7548c2ecf20Sopenharmony_ci */ 7558c2ecf20Sopenharmony_cistruct iscsi_kwqe_conn_destroy { 7568c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 7578c2ecf20Sopenharmony_ci struct iscsi_kwqe_header hdr; 7588c2ecf20Sopenharmony_ci u16 reserved0; 7598c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 7608c2ecf20Sopenharmony_ci u16 reserved0; 7618c2ecf20Sopenharmony_ci struct iscsi_kwqe_header hdr; 7628c2ecf20Sopenharmony_ci#endif 7638c2ecf20Sopenharmony_ci u32 context_id; 7648c2ecf20Sopenharmony_ci u32 reserved1[6]; 7658c2ecf20Sopenharmony_ci}; 7668c2ecf20Sopenharmony_ci 7678c2ecf20Sopenharmony_ci/* 7688c2ecf20Sopenharmony_ci * iSCSI KWQ WQE 7698c2ecf20Sopenharmony_ci */ 7708c2ecf20Sopenharmony_ciunion iscsi_kwqe { 7718c2ecf20Sopenharmony_ci struct iscsi_kwqe_init1 init1; 7728c2ecf20Sopenharmony_ci struct iscsi_kwqe_init2 init2; 7738c2ecf20Sopenharmony_ci struct iscsi_kwqe_conn_offload1 conn_offload1; 7748c2ecf20Sopenharmony_ci struct iscsi_kwqe_conn_offload2 conn_offload2; 7758c2ecf20Sopenharmony_ci struct iscsi_kwqe_conn_update conn_update; 7768c2ecf20Sopenharmony_ci struct iscsi_kwqe_conn_destroy conn_destroy; 7778c2ecf20Sopenharmony_ci}; 7788c2ecf20Sopenharmony_ci 7798c2ecf20Sopenharmony_ci/* 7808c2ecf20Sopenharmony_ci * iSCSI Login SQ WQE 7818c2ecf20Sopenharmony_ci */ 7828c2ecf20Sopenharmony_cistruct bnx2i_login_request { 7838c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 7848c2ecf20Sopenharmony_ci u8 op_code; 7858c2ecf20Sopenharmony_ci u8 op_attr; 7868c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_NEXT_STAGE (0x3<<0) 7878c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_NEXT_STAGE_SHIFT 0 7888c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_CURRENT_STAGE (0x3<<2) 7898c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_CURRENT_STAGE_SHIFT 2 7908c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_RESERVED0 (0x3<<4) 7918c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_RESERVED0_SHIFT 4 7928c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_CONT (0x1<<6) 7938c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_CONT_SHIFT 6 7948c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_TRANSIT (0x1<<7) 7958c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_TRANSIT_SHIFT 7 7968c2ecf20Sopenharmony_ci u8 version_max; 7978c2ecf20Sopenharmony_ci u8 version_min; 7988c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 7998c2ecf20Sopenharmony_ci u8 version_min; 8008c2ecf20Sopenharmony_ci u8 version_max; 8018c2ecf20Sopenharmony_ci u8 op_attr; 8028c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_NEXT_STAGE (0x3<<0) 8038c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_NEXT_STAGE_SHIFT 0 8048c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_CURRENT_STAGE (0x3<<2) 8058c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_CURRENT_STAGE_SHIFT 2 8068c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_RESERVED0 (0x3<<4) 8078c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_RESERVED0_SHIFT 4 8088c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_CONT (0x1<<6) 8098c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_CONT_SHIFT 6 8108c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_TRANSIT (0x1<<7) 8118c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_TRANSIT_SHIFT 7 8128c2ecf20Sopenharmony_ci u8 op_code; 8138c2ecf20Sopenharmony_ci#endif 8148c2ecf20Sopenharmony_ci u32 data_length; 8158c2ecf20Sopenharmony_ci u32 isid_lo; 8168c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 8178c2ecf20Sopenharmony_ci u16 isid_hi; 8188c2ecf20Sopenharmony_ci u16 tsih; 8198c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 8208c2ecf20Sopenharmony_ci u16 tsih; 8218c2ecf20Sopenharmony_ci u16 isid_hi; 8228c2ecf20Sopenharmony_ci#endif 8238c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 8248c2ecf20Sopenharmony_ci u16 reserved2; 8258c2ecf20Sopenharmony_ci u16 itt; 8268c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_INDEX (0x3FFF<<0) 8278c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_INDEX_SHIFT 0 8288c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_TYPE (0x3<<14) 8298c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_TYPE_SHIFT 14 8308c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 8318c2ecf20Sopenharmony_ci u16 itt; 8328c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_INDEX (0x3FFF<<0) 8338c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_INDEX_SHIFT 0 8348c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_TYPE (0x3<<14) 8358c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_TYPE_SHIFT 14 8368c2ecf20Sopenharmony_ci u16 reserved2; 8378c2ecf20Sopenharmony_ci#endif 8388c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 8398c2ecf20Sopenharmony_ci u16 cid; 8408c2ecf20Sopenharmony_ci u16 reserved3; 8418c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 8428c2ecf20Sopenharmony_ci u16 reserved3; 8438c2ecf20Sopenharmony_ci u16 cid; 8448c2ecf20Sopenharmony_ci#endif 8458c2ecf20Sopenharmony_ci u32 cmd_sn; 8468c2ecf20Sopenharmony_ci u32 exp_stat_sn; 8478c2ecf20Sopenharmony_ci u32 reserved4; 8488c2ecf20Sopenharmony_ci u32 resp_bd_list_addr_lo; 8498c2ecf20Sopenharmony_ci u32 resp_bd_list_addr_hi; 8508c2ecf20Sopenharmony_ci u32 resp_buffer; 8518c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_RESP_BUFFER_LENGTH (0xFFFFFF<<0) 8528c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_RESP_BUFFER_LENGTH_SHIFT 0 8538c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_NUM_RESP_BDS (0xFF<<24) 8548c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_NUM_RESP_BDS_SHIFT 24 8558c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 8568c2ecf20Sopenharmony_ci u16 reserved8; 8578c2ecf20Sopenharmony_ci u8 reserved7; 8588c2ecf20Sopenharmony_ci u8 flags; 8598c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_RESERVED5 (0x3<<0) 8608c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_RESERVED5_SHIFT 0 8618c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_UPDATE_EXP_STAT_SN (0x1<<2) 8628c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_UPDATE_EXP_STAT_SN_SHIFT 2 8638c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_RESERVED6 (0x1F<<3) 8648c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_RESERVED6_SHIFT 3 8658c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 8668c2ecf20Sopenharmony_ci u8 flags; 8678c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_RESERVED5 (0x3<<0) 8688c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_RESERVED5_SHIFT 0 8698c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_UPDATE_EXP_STAT_SN (0x1<<2) 8708c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_UPDATE_EXP_STAT_SN_SHIFT 2 8718c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_RESERVED6 (0x1F<<3) 8728c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_REQUEST_RESERVED6_SHIFT 3 8738c2ecf20Sopenharmony_ci u8 reserved7; 8748c2ecf20Sopenharmony_ci u16 reserved8; 8758c2ecf20Sopenharmony_ci#endif 8768c2ecf20Sopenharmony_ci u32 bd_list_addr_lo; 8778c2ecf20Sopenharmony_ci u32 bd_list_addr_hi; 8788c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 8798c2ecf20Sopenharmony_ci u8 cq_index; 8808c2ecf20Sopenharmony_ci u8 reserved10; 8818c2ecf20Sopenharmony_ci u8 reserved9; 8828c2ecf20Sopenharmony_ci u8 num_bds; 8838c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 8848c2ecf20Sopenharmony_ci u8 num_bds; 8858c2ecf20Sopenharmony_ci u8 reserved9; 8868c2ecf20Sopenharmony_ci u8 reserved10; 8878c2ecf20Sopenharmony_ci u8 cq_index; 8888c2ecf20Sopenharmony_ci#endif 8898c2ecf20Sopenharmony_ci}; 8908c2ecf20Sopenharmony_ci 8918c2ecf20Sopenharmony_ci 8928c2ecf20Sopenharmony_ci/* 8938c2ecf20Sopenharmony_ci * iSCSI Login CQE 8948c2ecf20Sopenharmony_ci */ 8958c2ecf20Sopenharmony_cistruct bnx2i_login_response { 8968c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 8978c2ecf20Sopenharmony_ci u8 op_code; 8988c2ecf20Sopenharmony_ci u8 response_flags; 8998c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_RESPONSE_NEXT_STAGE (0x3<<0) 9008c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_RESPONSE_NEXT_STAGE_SHIFT 0 9018c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_RESPONSE_CURRENT_STAGE (0x3<<2) 9028c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_RESPONSE_CURRENT_STAGE_SHIFT 2 9038c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_RESPONSE_RESERVED0 (0x3<<4) 9048c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_RESPONSE_RESERVED0_SHIFT 4 9058c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_RESPONSE_CONT (0x1<<6) 9068c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_RESPONSE_CONT_SHIFT 6 9078c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_RESPONSE_TRANSIT (0x1<<7) 9088c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_RESPONSE_TRANSIT_SHIFT 7 9098c2ecf20Sopenharmony_ci u8 version_max; 9108c2ecf20Sopenharmony_ci u8 version_active; 9118c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 9128c2ecf20Sopenharmony_ci u8 version_active; 9138c2ecf20Sopenharmony_ci u8 version_max; 9148c2ecf20Sopenharmony_ci u8 response_flags; 9158c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_RESPONSE_NEXT_STAGE (0x3<<0) 9168c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_RESPONSE_NEXT_STAGE_SHIFT 0 9178c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_RESPONSE_CURRENT_STAGE (0x3<<2) 9188c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_RESPONSE_CURRENT_STAGE_SHIFT 2 9198c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_RESPONSE_RESERVED0 (0x3<<4) 9208c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_RESPONSE_RESERVED0_SHIFT 4 9218c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_RESPONSE_CONT (0x1<<6) 9228c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_RESPONSE_CONT_SHIFT 6 9238c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_RESPONSE_TRANSIT (0x1<<7) 9248c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_RESPONSE_TRANSIT_SHIFT 7 9258c2ecf20Sopenharmony_ci u8 op_code; 9268c2ecf20Sopenharmony_ci#endif 9278c2ecf20Sopenharmony_ci u32 data_length; 9288c2ecf20Sopenharmony_ci u32 exp_cmd_sn; 9298c2ecf20Sopenharmony_ci u32 max_cmd_sn; 9308c2ecf20Sopenharmony_ci u32 reserved1[2]; 9318c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 9328c2ecf20Sopenharmony_ci u16 reserved3; 9338c2ecf20Sopenharmony_ci u8 err_code; 9348c2ecf20Sopenharmony_ci u8 reserved2; 9358c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 9368c2ecf20Sopenharmony_ci u8 reserved2; 9378c2ecf20Sopenharmony_ci u8 err_code; 9388c2ecf20Sopenharmony_ci u16 reserved3; 9398c2ecf20Sopenharmony_ci#endif 9408c2ecf20Sopenharmony_ci u32 stat_sn; 9418c2ecf20Sopenharmony_ci u32 isid_lo; 9428c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 9438c2ecf20Sopenharmony_ci u16 isid_hi; 9448c2ecf20Sopenharmony_ci u16 tsih; 9458c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 9468c2ecf20Sopenharmony_ci u16 tsih; 9478c2ecf20Sopenharmony_ci u16 isid_hi; 9488c2ecf20Sopenharmony_ci#endif 9498c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 9508c2ecf20Sopenharmony_ci u8 status_class; 9518c2ecf20Sopenharmony_ci u8 status_detail; 9528c2ecf20Sopenharmony_ci u16 reserved4; 9538c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 9548c2ecf20Sopenharmony_ci u16 reserved4; 9558c2ecf20Sopenharmony_ci u8 status_detail; 9568c2ecf20Sopenharmony_ci u8 status_class; 9578c2ecf20Sopenharmony_ci#endif 9588c2ecf20Sopenharmony_ci u32 reserved5[3]; 9598c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 9608c2ecf20Sopenharmony_ci u16 reserved6; 9618c2ecf20Sopenharmony_ci u16 itt; 9628c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_RESPONSE_INDEX (0x3FFF<<0) 9638c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_RESPONSE_INDEX_SHIFT 0 9648c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_RESPONSE_TYPE (0x3<<14) 9658c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_RESPONSE_TYPE_SHIFT 14 9668c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 9678c2ecf20Sopenharmony_ci u16 itt; 9688c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_RESPONSE_INDEX (0x3FFF<<0) 9698c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_RESPONSE_INDEX_SHIFT 0 9708c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_RESPONSE_TYPE (0x3<<14) 9718c2ecf20Sopenharmony_ci#define ISCSI_LOGIN_RESPONSE_TYPE_SHIFT 14 9728c2ecf20Sopenharmony_ci u16 reserved6; 9738c2ecf20Sopenharmony_ci#endif 9748c2ecf20Sopenharmony_ci u32 cq_req_sn; 9758c2ecf20Sopenharmony_ci}; 9768c2ecf20Sopenharmony_ci 9778c2ecf20Sopenharmony_ci 9788c2ecf20Sopenharmony_ci/* 9798c2ecf20Sopenharmony_ci * iSCSI Logout SQ WQE 9808c2ecf20Sopenharmony_ci */ 9818c2ecf20Sopenharmony_cistruct bnx2i_logout_request { 9828c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 9838c2ecf20Sopenharmony_ci u8 op_code; 9848c2ecf20Sopenharmony_ci u8 op_attr; 9858c2ecf20Sopenharmony_ci#define ISCSI_LOGOUT_REQUEST_REASON (0x7F<<0) 9868c2ecf20Sopenharmony_ci#define ISCSI_LOGOUT_REQUEST_REASON_SHIFT 0 9878c2ecf20Sopenharmony_ci#define ISCSI_LOGOUT_REQUEST_ALWAYS_ONE (0x1<<7) 9888c2ecf20Sopenharmony_ci#define ISCSI_LOGOUT_REQUEST_ALWAYS_ONE_SHIFT 7 9898c2ecf20Sopenharmony_ci u16 reserved0; 9908c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 9918c2ecf20Sopenharmony_ci u16 reserved0; 9928c2ecf20Sopenharmony_ci u8 op_attr; 9938c2ecf20Sopenharmony_ci#define ISCSI_LOGOUT_REQUEST_REASON (0x7F<<0) 9948c2ecf20Sopenharmony_ci#define ISCSI_LOGOUT_REQUEST_REASON_SHIFT 0 9958c2ecf20Sopenharmony_ci#define ISCSI_LOGOUT_REQUEST_ALWAYS_ONE (0x1<<7) 9968c2ecf20Sopenharmony_ci#define ISCSI_LOGOUT_REQUEST_ALWAYS_ONE_SHIFT 7 9978c2ecf20Sopenharmony_ci u8 op_code; 9988c2ecf20Sopenharmony_ci#endif 9998c2ecf20Sopenharmony_ci u32 data_length; 10008c2ecf20Sopenharmony_ci u32 reserved1[2]; 10018c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 10028c2ecf20Sopenharmony_ci u16 reserved2; 10038c2ecf20Sopenharmony_ci u16 itt; 10048c2ecf20Sopenharmony_ci#define ISCSI_LOGOUT_REQUEST_INDEX (0x3FFF<<0) 10058c2ecf20Sopenharmony_ci#define ISCSI_LOGOUT_REQUEST_INDEX_SHIFT 0 10068c2ecf20Sopenharmony_ci#define ISCSI_LOGOUT_REQUEST_TYPE (0x3<<14) 10078c2ecf20Sopenharmony_ci#define ISCSI_LOGOUT_REQUEST_TYPE_SHIFT 14 10088c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 10098c2ecf20Sopenharmony_ci u16 itt; 10108c2ecf20Sopenharmony_ci#define ISCSI_LOGOUT_REQUEST_INDEX (0x3FFF<<0) 10118c2ecf20Sopenharmony_ci#define ISCSI_LOGOUT_REQUEST_INDEX_SHIFT 0 10128c2ecf20Sopenharmony_ci#define ISCSI_LOGOUT_REQUEST_TYPE (0x3<<14) 10138c2ecf20Sopenharmony_ci#define ISCSI_LOGOUT_REQUEST_TYPE_SHIFT 14 10148c2ecf20Sopenharmony_ci u16 reserved2; 10158c2ecf20Sopenharmony_ci#endif 10168c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 10178c2ecf20Sopenharmony_ci u16 cid; 10188c2ecf20Sopenharmony_ci u16 reserved3; 10198c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 10208c2ecf20Sopenharmony_ci u16 reserved3; 10218c2ecf20Sopenharmony_ci u16 cid; 10228c2ecf20Sopenharmony_ci#endif 10238c2ecf20Sopenharmony_ci u32 cmd_sn; 10248c2ecf20Sopenharmony_ci u32 reserved4[5]; 10258c2ecf20Sopenharmony_ci u32 zero_fill; 10268c2ecf20Sopenharmony_ci u32 bd_list_addr_lo; 10278c2ecf20Sopenharmony_ci u32 bd_list_addr_hi; 10288c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 10298c2ecf20Sopenharmony_ci u8 cq_index; 10308c2ecf20Sopenharmony_ci u8 reserved6; 10318c2ecf20Sopenharmony_ci u8 reserved5; 10328c2ecf20Sopenharmony_ci u8 num_bds; 10338c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 10348c2ecf20Sopenharmony_ci u8 num_bds; 10358c2ecf20Sopenharmony_ci u8 reserved5; 10368c2ecf20Sopenharmony_ci u8 reserved6; 10378c2ecf20Sopenharmony_ci u8 cq_index; 10388c2ecf20Sopenharmony_ci#endif 10398c2ecf20Sopenharmony_ci}; 10408c2ecf20Sopenharmony_ci 10418c2ecf20Sopenharmony_ci 10428c2ecf20Sopenharmony_ci/* 10438c2ecf20Sopenharmony_ci * iSCSI Logout CQE 10448c2ecf20Sopenharmony_ci */ 10458c2ecf20Sopenharmony_cistruct bnx2i_logout_response { 10468c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 10478c2ecf20Sopenharmony_ci u8 op_code; 10488c2ecf20Sopenharmony_ci u8 reserved1; 10498c2ecf20Sopenharmony_ci u8 response; 10508c2ecf20Sopenharmony_ci u8 reserved0; 10518c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 10528c2ecf20Sopenharmony_ci u8 reserved0; 10538c2ecf20Sopenharmony_ci u8 response; 10548c2ecf20Sopenharmony_ci u8 reserved1; 10558c2ecf20Sopenharmony_ci u8 op_code; 10568c2ecf20Sopenharmony_ci#endif 10578c2ecf20Sopenharmony_ci u32 reserved2; 10588c2ecf20Sopenharmony_ci u32 exp_cmd_sn; 10598c2ecf20Sopenharmony_ci u32 max_cmd_sn; 10608c2ecf20Sopenharmony_ci u32 reserved3[2]; 10618c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 10628c2ecf20Sopenharmony_ci u16 reserved5; 10638c2ecf20Sopenharmony_ci u8 err_code; 10648c2ecf20Sopenharmony_ci u8 reserved4; 10658c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 10668c2ecf20Sopenharmony_ci u8 reserved4; 10678c2ecf20Sopenharmony_ci u8 err_code; 10688c2ecf20Sopenharmony_ci u16 reserved5; 10698c2ecf20Sopenharmony_ci#endif 10708c2ecf20Sopenharmony_ci u32 reserved6[3]; 10718c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 10728c2ecf20Sopenharmony_ci u16 time_to_wait; 10738c2ecf20Sopenharmony_ci u16 time_to_retain; 10748c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 10758c2ecf20Sopenharmony_ci u16 time_to_retain; 10768c2ecf20Sopenharmony_ci u16 time_to_wait; 10778c2ecf20Sopenharmony_ci#endif 10788c2ecf20Sopenharmony_ci u32 reserved7[3]; 10798c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 10808c2ecf20Sopenharmony_ci u16 reserved8; 10818c2ecf20Sopenharmony_ci u16 itt; 10828c2ecf20Sopenharmony_ci#define ISCSI_LOGOUT_RESPONSE_INDEX (0x3FFF<<0) 10838c2ecf20Sopenharmony_ci#define ISCSI_LOGOUT_RESPONSE_INDEX_SHIFT 0 10848c2ecf20Sopenharmony_ci#define ISCSI_LOGOUT_RESPONSE_TYPE (0x3<<14) 10858c2ecf20Sopenharmony_ci#define ISCSI_LOGOUT_RESPONSE_TYPE_SHIFT 14 10868c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 10878c2ecf20Sopenharmony_ci u16 itt; 10888c2ecf20Sopenharmony_ci#define ISCSI_LOGOUT_RESPONSE_INDEX (0x3FFF<<0) 10898c2ecf20Sopenharmony_ci#define ISCSI_LOGOUT_RESPONSE_INDEX_SHIFT 0 10908c2ecf20Sopenharmony_ci#define ISCSI_LOGOUT_RESPONSE_TYPE (0x3<<14) 10918c2ecf20Sopenharmony_ci#define ISCSI_LOGOUT_RESPONSE_TYPE_SHIFT 14 10928c2ecf20Sopenharmony_ci u16 reserved8; 10938c2ecf20Sopenharmony_ci#endif 10948c2ecf20Sopenharmony_ci u32 cq_req_sn; 10958c2ecf20Sopenharmony_ci}; 10968c2ecf20Sopenharmony_ci 10978c2ecf20Sopenharmony_ci 10988c2ecf20Sopenharmony_ci/* 10998c2ecf20Sopenharmony_ci * iSCSI Nop-In CQE 11008c2ecf20Sopenharmony_ci */ 11018c2ecf20Sopenharmony_cistruct bnx2i_nop_in_msg { 11028c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 11038c2ecf20Sopenharmony_ci u8 op_code; 11048c2ecf20Sopenharmony_ci u8 reserved1; 11058c2ecf20Sopenharmony_ci u16 reserved0; 11068c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 11078c2ecf20Sopenharmony_ci u16 reserved0; 11088c2ecf20Sopenharmony_ci u8 reserved1; 11098c2ecf20Sopenharmony_ci u8 op_code; 11108c2ecf20Sopenharmony_ci#endif 11118c2ecf20Sopenharmony_ci u32 data_length; 11128c2ecf20Sopenharmony_ci u32 exp_cmd_sn; 11138c2ecf20Sopenharmony_ci u32 max_cmd_sn; 11148c2ecf20Sopenharmony_ci u32 ttt; 11158c2ecf20Sopenharmony_ci u32 reserved2; 11168c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 11178c2ecf20Sopenharmony_ci u16 reserved4; 11188c2ecf20Sopenharmony_ci u8 err_code; 11198c2ecf20Sopenharmony_ci u8 reserved3; 11208c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 11218c2ecf20Sopenharmony_ci u8 reserved3; 11228c2ecf20Sopenharmony_ci u8 err_code; 11238c2ecf20Sopenharmony_ci u16 reserved4; 11248c2ecf20Sopenharmony_ci#endif 11258c2ecf20Sopenharmony_ci u32 reserved5; 11268c2ecf20Sopenharmony_ci u32 lun[2]; 11278c2ecf20Sopenharmony_ci u32 reserved6[4]; 11288c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 11298c2ecf20Sopenharmony_ci u16 reserved7; 11308c2ecf20Sopenharmony_ci u16 itt; 11318c2ecf20Sopenharmony_ci#define ISCSI_NOP_IN_MSG_INDEX (0x3FFF<<0) 11328c2ecf20Sopenharmony_ci#define ISCSI_NOP_IN_MSG_INDEX_SHIFT 0 11338c2ecf20Sopenharmony_ci#define ISCSI_NOP_IN_MSG_TYPE (0x3<<14) 11348c2ecf20Sopenharmony_ci#define ISCSI_NOP_IN_MSG_TYPE_SHIFT 14 11358c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 11368c2ecf20Sopenharmony_ci u16 itt; 11378c2ecf20Sopenharmony_ci#define ISCSI_NOP_IN_MSG_INDEX (0x3FFF<<0) 11388c2ecf20Sopenharmony_ci#define ISCSI_NOP_IN_MSG_INDEX_SHIFT 0 11398c2ecf20Sopenharmony_ci#define ISCSI_NOP_IN_MSG_TYPE (0x3<<14) 11408c2ecf20Sopenharmony_ci#define ISCSI_NOP_IN_MSG_TYPE_SHIFT 14 11418c2ecf20Sopenharmony_ci u16 reserved7; 11428c2ecf20Sopenharmony_ci#endif 11438c2ecf20Sopenharmony_ci u32 cq_req_sn; 11448c2ecf20Sopenharmony_ci}; 11458c2ecf20Sopenharmony_ci 11468c2ecf20Sopenharmony_ci 11478c2ecf20Sopenharmony_ci/* 11488c2ecf20Sopenharmony_ci * iSCSI NOP-OUT SQ WQE 11498c2ecf20Sopenharmony_ci */ 11508c2ecf20Sopenharmony_cistruct bnx2i_nop_out_request { 11518c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 11528c2ecf20Sopenharmony_ci u8 op_code; 11538c2ecf20Sopenharmony_ci u8 op_attr; 11548c2ecf20Sopenharmony_ci#define ISCSI_NOP_OUT_REQUEST_RESERVED1 (0x7F<<0) 11558c2ecf20Sopenharmony_ci#define ISCSI_NOP_OUT_REQUEST_RESERVED1_SHIFT 0 11568c2ecf20Sopenharmony_ci#define ISCSI_NOP_OUT_REQUEST_ALWAYS_ONE (0x1<<7) 11578c2ecf20Sopenharmony_ci#define ISCSI_NOP_OUT_REQUEST_ALWAYS_ONE_SHIFT 7 11588c2ecf20Sopenharmony_ci u16 reserved0; 11598c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 11608c2ecf20Sopenharmony_ci u16 reserved0; 11618c2ecf20Sopenharmony_ci u8 op_attr; 11628c2ecf20Sopenharmony_ci#define ISCSI_NOP_OUT_REQUEST_RESERVED1 (0x7F<<0) 11638c2ecf20Sopenharmony_ci#define ISCSI_NOP_OUT_REQUEST_RESERVED1_SHIFT 0 11648c2ecf20Sopenharmony_ci#define ISCSI_NOP_OUT_REQUEST_ALWAYS_ONE (0x1<<7) 11658c2ecf20Sopenharmony_ci#define ISCSI_NOP_OUT_REQUEST_ALWAYS_ONE_SHIFT 7 11668c2ecf20Sopenharmony_ci u8 op_code; 11678c2ecf20Sopenharmony_ci#endif 11688c2ecf20Sopenharmony_ci u32 data_length; 11698c2ecf20Sopenharmony_ci u32 lun[2]; 11708c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 11718c2ecf20Sopenharmony_ci u16 reserved2; 11728c2ecf20Sopenharmony_ci u16 itt; 11738c2ecf20Sopenharmony_ci#define ISCSI_NOP_OUT_REQUEST_INDEX (0x3FFF<<0) 11748c2ecf20Sopenharmony_ci#define ISCSI_NOP_OUT_REQUEST_INDEX_SHIFT 0 11758c2ecf20Sopenharmony_ci#define ISCSI_NOP_OUT_REQUEST_TYPE (0x3<<14) 11768c2ecf20Sopenharmony_ci#define ISCSI_NOP_OUT_REQUEST_TYPE_SHIFT 14 11778c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 11788c2ecf20Sopenharmony_ci u16 itt; 11798c2ecf20Sopenharmony_ci#define ISCSI_NOP_OUT_REQUEST_INDEX (0x3FFF<<0) 11808c2ecf20Sopenharmony_ci#define ISCSI_NOP_OUT_REQUEST_INDEX_SHIFT 0 11818c2ecf20Sopenharmony_ci#define ISCSI_NOP_OUT_REQUEST_TYPE (0x3<<14) 11828c2ecf20Sopenharmony_ci#define ISCSI_NOP_OUT_REQUEST_TYPE_SHIFT 14 11838c2ecf20Sopenharmony_ci u16 reserved2; 11848c2ecf20Sopenharmony_ci#endif 11858c2ecf20Sopenharmony_ci u32 ttt; 11868c2ecf20Sopenharmony_ci u32 cmd_sn; 11878c2ecf20Sopenharmony_ci u32 reserved3[2]; 11888c2ecf20Sopenharmony_ci u32 resp_bd_list_addr_lo; 11898c2ecf20Sopenharmony_ci u32 resp_bd_list_addr_hi; 11908c2ecf20Sopenharmony_ci u32 resp_buffer; 11918c2ecf20Sopenharmony_ci#define ISCSI_NOP_OUT_REQUEST_RESP_BUFFER_LENGTH (0xFFFFFF<<0) 11928c2ecf20Sopenharmony_ci#define ISCSI_NOP_OUT_REQUEST_RESP_BUFFER_LENGTH_SHIFT 0 11938c2ecf20Sopenharmony_ci#define ISCSI_NOP_OUT_REQUEST_NUM_RESP_BDS (0xFF<<24) 11948c2ecf20Sopenharmony_ci#define ISCSI_NOP_OUT_REQUEST_NUM_RESP_BDS_SHIFT 24 11958c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 11968c2ecf20Sopenharmony_ci u16 reserved7; 11978c2ecf20Sopenharmony_ci u8 reserved6; 11988c2ecf20Sopenharmony_ci u8 flags; 11998c2ecf20Sopenharmony_ci#define ISCSI_NOP_OUT_REQUEST_RESERVED4 (0x1<<0) 12008c2ecf20Sopenharmony_ci#define ISCSI_NOP_OUT_REQUEST_RESERVED4_SHIFT 0 12018c2ecf20Sopenharmony_ci#define ISCSI_NOP_OUT_REQUEST_LOCAL_COMPLETION (0x1<<1) 12028c2ecf20Sopenharmony_ci#define ISCSI_NOP_OUT_REQUEST_LOCAL_COMPLETION_SHIFT 1 12038c2ecf20Sopenharmony_ci#define ISCSI_NOP_OUT_REQUEST_ZERO_FILL (0x3F<<2) 12048c2ecf20Sopenharmony_ci#define ISCSI_NOP_OUT_REQUEST_ZERO_FILL_SHIFT 2 12058c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 12068c2ecf20Sopenharmony_ci u8 flags; 12078c2ecf20Sopenharmony_ci#define ISCSI_NOP_OUT_REQUEST_RESERVED4 (0x1<<0) 12088c2ecf20Sopenharmony_ci#define ISCSI_NOP_OUT_REQUEST_RESERVED4_SHIFT 0 12098c2ecf20Sopenharmony_ci#define ISCSI_NOP_OUT_REQUEST_LOCAL_COMPLETION (0x1<<1) 12108c2ecf20Sopenharmony_ci#define ISCSI_NOP_OUT_REQUEST_LOCAL_COMPLETION_SHIFT 1 12118c2ecf20Sopenharmony_ci#define ISCSI_NOP_OUT_REQUEST_ZERO_FILL (0x3F<<2) 12128c2ecf20Sopenharmony_ci#define ISCSI_NOP_OUT_REQUEST_ZERO_FILL_SHIFT 2 12138c2ecf20Sopenharmony_ci u8 reserved6; 12148c2ecf20Sopenharmony_ci u16 reserved7; 12158c2ecf20Sopenharmony_ci#endif 12168c2ecf20Sopenharmony_ci u32 bd_list_addr_lo; 12178c2ecf20Sopenharmony_ci u32 bd_list_addr_hi; 12188c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 12198c2ecf20Sopenharmony_ci u8 cq_index; 12208c2ecf20Sopenharmony_ci u8 reserved9; 12218c2ecf20Sopenharmony_ci u8 reserved8; 12228c2ecf20Sopenharmony_ci u8 num_bds; 12238c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 12248c2ecf20Sopenharmony_ci u8 num_bds; 12258c2ecf20Sopenharmony_ci u8 reserved8; 12268c2ecf20Sopenharmony_ci u8 reserved9; 12278c2ecf20Sopenharmony_ci u8 cq_index; 12288c2ecf20Sopenharmony_ci#endif 12298c2ecf20Sopenharmony_ci}; 12308c2ecf20Sopenharmony_ci 12318c2ecf20Sopenharmony_ci/* 12328c2ecf20Sopenharmony_ci * iSCSI Reject CQE 12338c2ecf20Sopenharmony_ci */ 12348c2ecf20Sopenharmony_cistruct bnx2i_reject_msg { 12358c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 12368c2ecf20Sopenharmony_ci u8 op_code; 12378c2ecf20Sopenharmony_ci u8 reserved1; 12388c2ecf20Sopenharmony_ci u8 reason; 12398c2ecf20Sopenharmony_ci u8 reserved0; 12408c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 12418c2ecf20Sopenharmony_ci u8 reserved0; 12428c2ecf20Sopenharmony_ci u8 reason; 12438c2ecf20Sopenharmony_ci u8 reserved1; 12448c2ecf20Sopenharmony_ci u8 op_code; 12458c2ecf20Sopenharmony_ci#endif 12468c2ecf20Sopenharmony_ci u32 data_length; 12478c2ecf20Sopenharmony_ci u32 exp_cmd_sn; 12488c2ecf20Sopenharmony_ci u32 max_cmd_sn; 12498c2ecf20Sopenharmony_ci u32 reserved2[2]; 12508c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 12518c2ecf20Sopenharmony_ci u16 reserved4; 12528c2ecf20Sopenharmony_ci u8 err_code; 12538c2ecf20Sopenharmony_ci u8 reserved3; 12548c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 12558c2ecf20Sopenharmony_ci u8 reserved3; 12568c2ecf20Sopenharmony_ci u8 err_code; 12578c2ecf20Sopenharmony_ci u16 reserved4; 12588c2ecf20Sopenharmony_ci#endif 12598c2ecf20Sopenharmony_ci u32 reserved5[8]; 12608c2ecf20Sopenharmony_ci u32 cq_req_sn; 12618c2ecf20Sopenharmony_ci}; 12628c2ecf20Sopenharmony_ci 12638c2ecf20Sopenharmony_ci/* 12648c2ecf20Sopenharmony_ci * bnx2i iSCSI TMF SQ WQE 12658c2ecf20Sopenharmony_ci */ 12668c2ecf20Sopenharmony_cistruct bnx2i_tmf_request { 12678c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 12688c2ecf20Sopenharmony_ci u8 op_code; 12698c2ecf20Sopenharmony_ci u8 op_attr; 12708c2ecf20Sopenharmony_ci#define ISCSI_TMF_REQUEST_FUNCTION (0x7F<<0) 12718c2ecf20Sopenharmony_ci#define ISCSI_TMF_REQUEST_FUNCTION_SHIFT 0 12728c2ecf20Sopenharmony_ci#define ISCSI_TMF_REQUEST_ALWAYS_ONE (0x1<<7) 12738c2ecf20Sopenharmony_ci#define ISCSI_TMF_REQUEST_ALWAYS_ONE_SHIFT 7 12748c2ecf20Sopenharmony_ci u16 reserved0; 12758c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 12768c2ecf20Sopenharmony_ci u16 reserved0; 12778c2ecf20Sopenharmony_ci u8 op_attr; 12788c2ecf20Sopenharmony_ci#define ISCSI_TMF_REQUEST_FUNCTION (0x7F<<0) 12798c2ecf20Sopenharmony_ci#define ISCSI_TMF_REQUEST_FUNCTION_SHIFT 0 12808c2ecf20Sopenharmony_ci#define ISCSI_TMF_REQUEST_ALWAYS_ONE (0x1<<7) 12818c2ecf20Sopenharmony_ci#define ISCSI_TMF_REQUEST_ALWAYS_ONE_SHIFT 7 12828c2ecf20Sopenharmony_ci u8 op_code; 12838c2ecf20Sopenharmony_ci#endif 12848c2ecf20Sopenharmony_ci u32 data_length; 12858c2ecf20Sopenharmony_ci u32 lun[2]; 12868c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 12878c2ecf20Sopenharmony_ci u16 reserved1; 12888c2ecf20Sopenharmony_ci u16 itt; 12898c2ecf20Sopenharmony_ci#define ISCSI_TMF_REQUEST_INDEX (0x3FFF<<0) 12908c2ecf20Sopenharmony_ci#define ISCSI_TMF_REQUEST_INDEX_SHIFT 0 12918c2ecf20Sopenharmony_ci#define ISCSI_TMF_REQUEST_TYPE (0x3<<14) 12928c2ecf20Sopenharmony_ci#define ISCSI_TMF_REQUEST_TYPE_SHIFT 14 12938c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 12948c2ecf20Sopenharmony_ci u16 itt; 12958c2ecf20Sopenharmony_ci#define ISCSI_TMF_REQUEST_INDEX (0x3FFF<<0) 12968c2ecf20Sopenharmony_ci#define ISCSI_TMF_REQUEST_INDEX_SHIFT 0 12978c2ecf20Sopenharmony_ci#define ISCSI_TMF_REQUEST_TYPE (0x3<<14) 12988c2ecf20Sopenharmony_ci#define ISCSI_TMF_REQUEST_TYPE_SHIFT 14 12998c2ecf20Sopenharmony_ci u16 reserved1; 13008c2ecf20Sopenharmony_ci#endif 13018c2ecf20Sopenharmony_ci u32 ref_itt; 13028c2ecf20Sopenharmony_ci u32 cmd_sn; 13038c2ecf20Sopenharmony_ci u32 reserved2; 13048c2ecf20Sopenharmony_ci u32 ref_cmd_sn; 13058c2ecf20Sopenharmony_ci u32 reserved3[3]; 13068c2ecf20Sopenharmony_ci u32 zero_fill; 13078c2ecf20Sopenharmony_ci u32 bd_list_addr_lo; 13088c2ecf20Sopenharmony_ci u32 bd_list_addr_hi; 13098c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 13108c2ecf20Sopenharmony_ci u8 cq_index; 13118c2ecf20Sopenharmony_ci u8 reserved5; 13128c2ecf20Sopenharmony_ci u8 reserved4; 13138c2ecf20Sopenharmony_ci u8 num_bds; 13148c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 13158c2ecf20Sopenharmony_ci u8 num_bds; 13168c2ecf20Sopenharmony_ci u8 reserved4; 13178c2ecf20Sopenharmony_ci u8 reserved5; 13188c2ecf20Sopenharmony_ci u8 cq_index; 13198c2ecf20Sopenharmony_ci#endif 13208c2ecf20Sopenharmony_ci}; 13218c2ecf20Sopenharmony_ci 13228c2ecf20Sopenharmony_ci/* 13238c2ecf20Sopenharmony_ci * iSCSI Text SQ WQE 13248c2ecf20Sopenharmony_ci */ 13258c2ecf20Sopenharmony_cistruct bnx2i_text_request { 13268c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 13278c2ecf20Sopenharmony_ci u8 op_code; 13288c2ecf20Sopenharmony_ci u8 op_attr; 13298c2ecf20Sopenharmony_ci#define ISCSI_TEXT_REQUEST_RESERVED1 (0x3F<<0) 13308c2ecf20Sopenharmony_ci#define ISCSI_TEXT_REQUEST_RESERVED1_SHIFT 0 13318c2ecf20Sopenharmony_ci#define ISCSI_TEXT_REQUEST_CONT (0x1<<6) 13328c2ecf20Sopenharmony_ci#define ISCSI_TEXT_REQUEST_CONT_SHIFT 6 13338c2ecf20Sopenharmony_ci#define ISCSI_TEXT_REQUEST_FINAL (0x1<<7) 13348c2ecf20Sopenharmony_ci#define ISCSI_TEXT_REQUEST_FINAL_SHIFT 7 13358c2ecf20Sopenharmony_ci u16 reserved0; 13368c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 13378c2ecf20Sopenharmony_ci u16 reserved0; 13388c2ecf20Sopenharmony_ci u8 op_attr; 13398c2ecf20Sopenharmony_ci#define ISCSI_TEXT_REQUEST_RESERVED1 (0x3F<<0) 13408c2ecf20Sopenharmony_ci#define ISCSI_TEXT_REQUEST_RESERVED1_SHIFT 0 13418c2ecf20Sopenharmony_ci#define ISCSI_TEXT_REQUEST_CONT (0x1<<6) 13428c2ecf20Sopenharmony_ci#define ISCSI_TEXT_REQUEST_CONT_SHIFT 6 13438c2ecf20Sopenharmony_ci#define ISCSI_TEXT_REQUEST_FINAL (0x1<<7) 13448c2ecf20Sopenharmony_ci#define ISCSI_TEXT_REQUEST_FINAL_SHIFT 7 13458c2ecf20Sopenharmony_ci u8 op_code; 13468c2ecf20Sopenharmony_ci#endif 13478c2ecf20Sopenharmony_ci u32 data_length; 13488c2ecf20Sopenharmony_ci u32 lun[2]; 13498c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 13508c2ecf20Sopenharmony_ci u16 reserved3; 13518c2ecf20Sopenharmony_ci u16 itt; 13528c2ecf20Sopenharmony_ci#define ISCSI_TEXT_REQUEST_INDEX (0x3FFF<<0) 13538c2ecf20Sopenharmony_ci#define ISCSI_TEXT_REQUEST_INDEX_SHIFT 0 13548c2ecf20Sopenharmony_ci#define ISCSI_TEXT_REQUEST_TYPE (0x3<<14) 13558c2ecf20Sopenharmony_ci#define ISCSI_TEXT_REQUEST_TYPE_SHIFT 14 13568c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 13578c2ecf20Sopenharmony_ci u16 itt; 13588c2ecf20Sopenharmony_ci#define ISCSI_TEXT_REQUEST_INDEX (0x3FFF<<0) 13598c2ecf20Sopenharmony_ci#define ISCSI_TEXT_REQUEST_INDEX_SHIFT 0 13608c2ecf20Sopenharmony_ci#define ISCSI_TEXT_REQUEST_TYPE (0x3<<14) 13618c2ecf20Sopenharmony_ci#define ISCSI_TEXT_REQUEST_TYPE_SHIFT 14 13628c2ecf20Sopenharmony_ci u16 reserved3; 13638c2ecf20Sopenharmony_ci#endif 13648c2ecf20Sopenharmony_ci u32 ttt; 13658c2ecf20Sopenharmony_ci u32 cmd_sn; 13668c2ecf20Sopenharmony_ci u32 reserved4[2]; 13678c2ecf20Sopenharmony_ci u32 resp_bd_list_addr_lo; 13688c2ecf20Sopenharmony_ci u32 resp_bd_list_addr_hi; 13698c2ecf20Sopenharmony_ci u32 resp_buffer; 13708c2ecf20Sopenharmony_ci#define ISCSI_TEXT_REQUEST_RESP_BUFFER_LENGTH (0xFFFFFF<<0) 13718c2ecf20Sopenharmony_ci#define ISCSI_TEXT_REQUEST_RESP_BUFFER_LENGTH_SHIFT 0 13728c2ecf20Sopenharmony_ci#define ISCSI_TEXT_REQUEST_NUM_RESP_BDS (0xFF<<24) 13738c2ecf20Sopenharmony_ci#define ISCSI_TEXT_REQUEST_NUM_RESP_BDS_SHIFT 24 13748c2ecf20Sopenharmony_ci u32 zero_fill; 13758c2ecf20Sopenharmony_ci u32 bd_list_addr_lo; 13768c2ecf20Sopenharmony_ci u32 bd_list_addr_hi; 13778c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 13788c2ecf20Sopenharmony_ci u8 cq_index; 13798c2ecf20Sopenharmony_ci u8 reserved7; 13808c2ecf20Sopenharmony_ci u8 reserved6; 13818c2ecf20Sopenharmony_ci u8 num_bds; 13828c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 13838c2ecf20Sopenharmony_ci u8 num_bds; 13848c2ecf20Sopenharmony_ci u8 reserved6; 13858c2ecf20Sopenharmony_ci u8 reserved7; 13868c2ecf20Sopenharmony_ci u8 cq_index; 13878c2ecf20Sopenharmony_ci#endif 13888c2ecf20Sopenharmony_ci}; 13898c2ecf20Sopenharmony_ci 13908c2ecf20Sopenharmony_ci/* 13918c2ecf20Sopenharmony_ci * iSCSI SQ WQE 13928c2ecf20Sopenharmony_ci */ 13938c2ecf20Sopenharmony_ciunion iscsi_request { 13948c2ecf20Sopenharmony_ci struct bnx2i_cmd_request cmd; 13958c2ecf20Sopenharmony_ci struct bnx2i_tmf_request tmf; 13968c2ecf20Sopenharmony_ci struct bnx2i_nop_out_request nop_out; 13978c2ecf20Sopenharmony_ci struct bnx2i_login_request login_req; 13988c2ecf20Sopenharmony_ci struct bnx2i_text_request text; 13998c2ecf20Sopenharmony_ci struct bnx2i_logout_request logout_req; 14008c2ecf20Sopenharmony_ci struct bnx2i_cleanup_request cleanup; 14018c2ecf20Sopenharmony_ci}; 14028c2ecf20Sopenharmony_ci 14038c2ecf20Sopenharmony_ci 14048c2ecf20Sopenharmony_ci/* 14058c2ecf20Sopenharmony_ci * iSCSI TMF CQE 14068c2ecf20Sopenharmony_ci */ 14078c2ecf20Sopenharmony_cistruct bnx2i_tmf_response { 14088c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 14098c2ecf20Sopenharmony_ci u8 op_code; 14108c2ecf20Sopenharmony_ci u8 reserved1; 14118c2ecf20Sopenharmony_ci u8 response; 14128c2ecf20Sopenharmony_ci u8 reserved0; 14138c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 14148c2ecf20Sopenharmony_ci u8 reserved0; 14158c2ecf20Sopenharmony_ci u8 response; 14168c2ecf20Sopenharmony_ci u8 reserved1; 14178c2ecf20Sopenharmony_ci u8 op_code; 14188c2ecf20Sopenharmony_ci#endif 14198c2ecf20Sopenharmony_ci u32 reserved2; 14208c2ecf20Sopenharmony_ci u32 exp_cmd_sn; 14218c2ecf20Sopenharmony_ci u32 max_cmd_sn; 14228c2ecf20Sopenharmony_ci u32 reserved3[2]; 14238c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 14248c2ecf20Sopenharmony_ci u16 reserved5; 14258c2ecf20Sopenharmony_ci u8 err_code; 14268c2ecf20Sopenharmony_ci u8 reserved4; 14278c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 14288c2ecf20Sopenharmony_ci u8 reserved4; 14298c2ecf20Sopenharmony_ci u8 err_code; 14308c2ecf20Sopenharmony_ci u16 reserved5; 14318c2ecf20Sopenharmony_ci#endif 14328c2ecf20Sopenharmony_ci u32 reserved6[7]; 14338c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 14348c2ecf20Sopenharmony_ci u16 reserved7; 14358c2ecf20Sopenharmony_ci u16 itt; 14368c2ecf20Sopenharmony_ci#define ISCSI_TMF_RESPONSE_INDEX (0x3FFF<<0) 14378c2ecf20Sopenharmony_ci#define ISCSI_TMF_RESPONSE_INDEX_SHIFT 0 14388c2ecf20Sopenharmony_ci#define ISCSI_TMF_RESPONSE_TYPE (0x3<<14) 14398c2ecf20Sopenharmony_ci#define ISCSI_TMF_RESPONSE_TYPE_SHIFT 14 14408c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 14418c2ecf20Sopenharmony_ci u16 itt; 14428c2ecf20Sopenharmony_ci#define ISCSI_TMF_RESPONSE_INDEX (0x3FFF<<0) 14438c2ecf20Sopenharmony_ci#define ISCSI_TMF_RESPONSE_INDEX_SHIFT 0 14448c2ecf20Sopenharmony_ci#define ISCSI_TMF_RESPONSE_TYPE (0x3<<14) 14458c2ecf20Sopenharmony_ci#define ISCSI_TMF_RESPONSE_TYPE_SHIFT 14 14468c2ecf20Sopenharmony_ci u16 reserved7; 14478c2ecf20Sopenharmony_ci#endif 14488c2ecf20Sopenharmony_ci u32 cq_req_sn; 14498c2ecf20Sopenharmony_ci}; 14508c2ecf20Sopenharmony_ci 14518c2ecf20Sopenharmony_ci/* 14528c2ecf20Sopenharmony_ci * iSCSI Text CQE 14538c2ecf20Sopenharmony_ci */ 14548c2ecf20Sopenharmony_cistruct bnx2i_text_response { 14558c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 14568c2ecf20Sopenharmony_ci u8 op_code; 14578c2ecf20Sopenharmony_ci u8 response_flags; 14588c2ecf20Sopenharmony_ci#define ISCSI_TEXT_RESPONSE_RESERVED1 (0x3F<<0) 14598c2ecf20Sopenharmony_ci#define ISCSI_TEXT_RESPONSE_RESERVED1_SHIFT 0 14608c2ecf20Sopenharmony_ci#define ISCSI_TEXT_RESPONSE_CONT (0x1<<6) 14618c2ecf20Sopenharmony_ci#define ISCSI_TEXT_RESPONSE_CONT_SHIFT 6 14628c2ecf20Sopenharmony_ci#define ISCSI_TEXT_RESPONSE_FINAL (0x1<<7) 14638c2ecf20Sopenharmony_ci#define ISCSI_TEXT_RESPONSE_FINAL_SHIFT 7 14648c2ecf20Sopenharmony_ci u16 reserved0; 14658c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 14668c2ecf20Sopenharmony_ci u16 reserved0; 14678c2ecf20Sopenharmony_ci u8 response_flags; 14688c2ecf20Sopenharmony_ci#define ISCSI_TEXT_RESPONSE_RESERVED1 (0x3F<<0) 14698c2ecf20Sopenharmony_ci#define ISCSI_TEXT_RESPONSE_RESERVED1_SHIFT 0 14708c2ecf20Sopenharmony_ci#define ISCSI_TEXT_RESPONSE_CONT (0x1<<6) 14718c2ecf20Sopenharmony_ci#define ISCSI_TEXT_RESPONSE_CONT_SHIFT 6 14728c2ecf20Sopenharmony_ci#define ISCSI_TEXT_RESPONSE_FINAL (0x1<<7) 14738c2ecf20Sopenharmony_ci#define ISCSI_TEXT_RESPONSE_FINAL_SHIFT 7 14748c2ecf20Sopenharmony_ci u8 op_code; 14758c2ecf20Sopenharmony_ci#endif 14768c2ecf20Sopenharmony_ci u32 data_length; 14778c2ecf20Sopenharmony_ci u32 exp_cmd_sn; 14788c2ecf20Sopenharmony_ci u32 max_cmd_sn; 14798c2ecf20Sopenharmony_ci u32 ttt; 14808c2ecf20Sopenharmony_ci u32 reserved2; 14818c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 14828c2ecf20Sopenharmony_ci u16 reserved4; 14838c2ecf20Sopenharmony_ci u8 err_code; 14848c2ecf20Sopenharmony_ci u8 reserved3; 14858c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 14868c2ecf20Sopenharmony_ci u8 reserved3; 14878c2ecf20Sopenharmony_ci u8 err_code; 14888c2ecf20Sopenharmony_ci u16 reserved4; 14898c2ecf20Sopenharmony_ci#endif 14908c2ecf20Sopenharmony_ci u32 reserved5; 14918c2ecf20Sopenharmony_ci u32 lun[2]; 14928c2ecf20Sopenharmony_ci u32 reserved6[4]; 14938c2ecf20Sopenharmony_ci#if defined(__BIG_ENDIAN) 14948c2ecf20Sopenharmony_ci u16 reserved7; 14958c2ecf20Sopenharmony_ci u16 itt; 14968c2ecf20Sopenharmony_ci#define ISCSI_TEXT_RESPONSE_INDEX (0x3FFF<<0) 14978c2ecf20Sopenharmony_ci#define ISCSI_TEXT_RESPONSE_INDEX_SHIFT 0 14988c2ecf20Sopenharmony_ci#define ISCSI_TEXT_RESPONSE_TYPE (0x3<<14) 14998c2ecf20Sopenharmony_ci#define ISCSI_TEXT_RESPONSE_TYPE_SHIFT 14 15008c2ecf20Sopenharmony_ci#elif defined(__LITTLE_ENDIAN) 15018c2ecf20Sopenharmony_ci u16 itt; 15028c2ecf20Sopenharmony_ci#define ISCSI_TEXT_RESPONSE_INDEX (0x3FFF<<0) 15038c2ecf20Sopenharmony_ci#define ISCSI_TEXT_RESPONSE_INDEX_SHIFT 0 15048c2ecf20Sopenharmony_ci#define ISCSI_TEXT_RESPONSE_TYPE (0x3<<14) 15058c2ecf20Sopenharmony_ci#define ISCSI_TEXT_RESPONSE_TYPE_SHIFT 14 15068c2ecf20Sopenharmony_ci u16 reserved7; 15078c2ecf20Sopenharmony_ci#endif 15088c2ecf20Sopenharmony_ci u32 cq_req_sn; 15098c2ecf20Sopenharmony_ci}; 15108c2ecf20Sopenharmony_ci 15118c2ecf20Sopenharmony_ci/* 15128c2ecf20Sopenharmony_ci * iSCSI CQE 15138c2ecf20Sopenharmony_ci */ 15148c2ecf20Sopenharmony_ciunion iscsi_response { 15158c2ecf20Sopenharmony_ci struct bnx2i_cmd_response cmd; 15168c2ecf20Sopenharmony_ci struct bnx2i_tmf_response tmf; 15178c2ecf20Sopenharmony_ci struct bnx2i_login_response login_resp; 15188c2ecf20Sopenharmony_ci struct bnx2i_text_response text; 15198c2ecf20Sopenharmony_ci struct bnx2i_logout_response logout_resp; 15208c2ecf20Sopenharmony_ci struct bnx2i_cleanup_response cleanup; 15218c2ecf20Sopenharmony_ci struct bnx2i_reject_msg reject; 15228c2ecf20Sopenharmony_ci struct bnx2i_async_msg async; 15238c2ecf20Sopenharmony_ci struct bnx2i_nop_in_msg nop_in; 15248c2ecf20Sopenharmony_ci}; 15258c2ecf20Sopenharmony_ci 15268c2ecf20Sopenharmony_ci#endif /* __57XX_ISCSI_HSI_LINUX_LE__ */ 1527