Go to the documentation of this file.
18 #ifndef BEISCSI_CMDS_H
19 #define BEISCSI_CMDS_H
34 #define MCC_WRB_SGE_CNT_SHIFT 3
35 #define MCC_WRB_SGE_CNT_MASK 0x1F
48 #define CQE_FLAGS_VALID_MASK (1 << 31)
49 #define CQE_FLAGS_ASYNC_MASK (1 << 30)
50 #define CQE_FLAGS_COMPLETED_MASK (1 << 28)
51 #define CQE_FLAGS_CONSUMED_MASK (1 << 27)
54 #define MCC_STATUS_SUCCESS 0x0
56 #define CQE_STATUS_COMPL_MASK 0xFFFF
57 #define CQE_STATUS_COMPL_SHIFT 0
58 #define CQE_STATUS_EXTD_MASK 0xFFFF
59 #define CQE_STATUS_EXTD_SHIFT 16
79 #define MPU_MAILBOX_DB_OFFSET 0x160
80 #define MPU_MAILBOX_DB_RDY_MASK 0x1
81 #define MPU_MAILBOX_DB_HI_MASK 0x2
84 #define MPU_EP_SEMAPHORE_OFFSET 0xac
85 #define EP_SEMAPHORE_POST_STAGE_MASK 0x0000FFFF
86 #define EP_SEMAPHORE_POST_ERR_MASK 0x1
87 #define EP_SEMAPHORE_POST_ERR_SHIFT 31
90 #define DB_MCCQ_OFFSET 0x140
91 #define DB_MCCQ_RING_ID_MASK 0x7FF
93 #define DB_MCCQ_NUM_POSTED_SHIFT 16
96 #define POST_STAGE_ARMFW_RDY 0xc000
102 #define ASYNC_TRAILER_EVENT_CODE_SHIFT 8
103 #define ASYNC_TRAILER_EVENT_CODE_MASK 0xFF
104 #define ASYNC_EVENT_CODE_LINK_STATE 0x1
134 #define CMD_SUBSYSTEM_COMMON 0x1
135 #define CMD_SUBSYSTEM_ISCSI 0x2
136 #define CMD_SUBSYSTEM_ETH 0x3
137 #define CMD_SUBSYSTEM_ISCSI_INI 0x6
138 #define CMD_COMMON_TCP_UPLOAD 0x1
144 #define OPCODE_COMMON_CQ_CREATE 12
145 #define OPCODE_COMMON_EQ_CREATE 13
146 #define OPCODE_COMMON_MCC_CREATE 21
147 #define OPCODE_COMMON_GET_CNTL_ATTRIBUTES 32
148 #define OPCODE_COMMON_GET_FW_VERSION 35
149 #define OPCODE_COMMON_MODIFY_EQ_DELAY 41
150 #define OPCODE_COMMON_FIRMWARE_CONFIG 42
151 #define OPCODE_COMMON_MCC_DESTROY 53
152 #define OPCODE_COMMON_CQ_DESTROY 54
153 #define OPCODE_COMMON_EQ_DESTROY 55
154 #define OPCODE_COMMON_QUERY_FIRMWARE_CONFIG 58
155 #define OPCODE_COMMON_FUNCTION_RESET 61
162 #define OPCODE_COMMON_ISCSI_CFG_POST_SGL_PAGES 2
163 #define OPCODE_COMMON_ISCSI_CFG_REMOVE_SGL_PAGES 3
164 #define OPCODE_COMMON_ISCSI_NTWK_GET_NIC_CONFIG 7
165 #define OPCODE_COMMON_ISCSI_NTWK_SET_VLAN 14
166 #define OPCODE_COMMON_ISCSI_NTWK_CONFIG_STATELESS_IP_ADDR 17
167 #define OPCODE_COMMON_ISCSI_NTWK_REL_STATELESS_IP_ADDR 18
168 #define OPCODE_COMMON_ISCSI_NTWK_MODIFY_IP_ADDR 21
169 #define OPCODE_COMMON_ISCSI_NTWK_GET_DEFAULT_GATEWAY 22
170 #define OPCODE_COMMON_ISCSI_NTWK_MODIFY_DEFAULT_GATEWAY 23
171 #define OPCODE_COMMON_ISCSI_NTWK_GET_ALL_IF_ID 24
172 #define OPCODE_COMMON_ISCSI_NTWK_GET_IF_INFO 25
173 #define OPCODE_COMMON_ISCSI_SET_FRAGNUM_BITS_FOR_SGL_CRA 61
174 #define OPCODE_COMMON_ISCSI_DEFQ_CREATE 64
175 #define OPCODE_COMMON_ISCSI_DEFQ_DESTROY 65
176 #define OPCODE_COMMON_ISCSI_WRBQ_CREATE 66
177 #define OPCODE_COMMON_ISCSI_WRBQ_DESTROY 67
353 #define BE_REOPEN_ALL_SESSIONS 0x00
354 #define BE_REOPEN_BOOT_SESSIONS 0x01
355 #define BE_REOPEN_A_SESSION 0x02
452 #define BEISCSI_VLAN_DISABLE 0xFFFF
612 #define BEISCSI_ALIAS_LEN 32
628 #define BE2ISCSI_LINK_SPEED_ZERO 0x00
629 #define BE2ISCSI_LINK_SPEED_10MBPS 0x01
630 #define BE2ISCSI_LINK_SPEED_100MBPS 0x02
631 #define BE2ISCSI_LINK_SPEED_1GBPS 0x03
632 #define BE2ISCSI_LINK_SPEED_10GBPS 0x04
650 bool sol_evts,
bool no_delay,
651 int num_cqe_dma_coalesce);
760 #define SOL_CID_MASK 0x0000FFC0
761 #define SOL_CODE_MASK 0x0000003F
762 #define SOL_WRB_INDEX_MASK 0x00FF0000
763 #define SOL_CMD_WND_MASK 0xFF000000
764 #define SOL_RES_CNT_MASK 0x7FFFFFFF
765 #define SOL_EXP_CMD_SN_MASK 0xFFFFFFFF
766 #define SOL_HW_STS_MASK 0x000000FF
767 #define SOL_STS_MASK 0x0000FF00
768 #define SOL_RESP_MASK 0x00FF0000
769 #define SOL_FLAGS_MASK 0x7F000000
770 #define SOL_S_MASK 0x80000000
791 #define SOL_ICD_INDEX_MASK 0x0003FFC0
814 #define DB_WRB_POST_CID_MASK 0x3FF
815 #define DB_DEF_PDU_WRB_INDEX_MASK 0xFF
817 #define DB_DEF_PDU_WRB_INDEX_SHIFT 16
818 #define DB_DEF_PDU_NUM_POSTED_SHIFT 24
872 #define DB_DEF_PDU_RING_ID_MASK 0x3FF
873 #define DB_DEF_PDU_CQPROC_MASK 0x3FFF
874 #define DB_DEF_PDU_REARM_SHIFT 14
875 #define DB_DEF_PDU_EVENT_SHIFT 15
876 #define DB_DEF_PDU_CQPROC_SHIFT 16
930 #define ISCSI_OPCODE_SCSI_DATA_OUT 5
931 #define OPCODE_COMMON_NTWK_LINK_STATUS_QUERY 5
932 #define OPCODE_COMMON_MODIFY_EQ_DELAY 41
933 #define OPCODE_COMMON_ISCSI_CLEANUP 59
934 #define OPCODE_COMMON_TCP_UPLOAD 56
935 #define OPCODE_COMMON_ISCSI_TCP_CONNECT_AND_OFFLOAD 70
936 #define OPCODE_COMMON_ISCSI_ERROR_RECOVERY_INVALIDATE_COMMANDS 1
937 #define OPCODE_ISCSI_INI_CFG_GET_HBA_NAME 6
938 #define OPCODE_ISCSI_INI_CFG_SET_HBA_NAME 7
939 #define OPCODE_ISCSI_INI_SESSION_GET_A_SESSION 14
940 #define OPCODE_ISCSI_INI_DRIVER_REOPEN_ALL_SESSIONS 36
941 #define OPCODE_ISCSI_INI_DRIVER_OFFLOAD_SESSION 41
942 #define OPCODE_ISCSI_INI_DRIVER_INVALIDATE_CONNECTION 42
943 #define OPCODE_ISCSI_INI_BOOT_GET_BOOT_TARGET 52
944 #define OPCODE_COMMON_WRITE_FLASH 96
945 #define OPCODE_COMMON_READ_FLASH 97
948 #define CMD_ISCSI_COMMAND_INVALIDATE 1
949 #define CMD_ISCSI_CONNECTION_INVALIDATE 0x8001
950 #define CMD_ISCSI_CONNECTION_ISSUE_TCP_RST 0x8002
953 #define INI_TMF_CMD 2
954 #define INI_NOPOUT_CMD 3
958 #define TGT_CTX_UPDT_CMD 7
959 #define TGT_STS_CMD 8
963 #define TGT_DATAIN_CMD 9
966 #define TGT_SOS_PDU 10
969 #define TGT_DM_CMD 11
974 #define CMD_CONNECTION_CHUTE_0 1
975 #define CMD_CONNECTION_CHUTE_1 2
976 #define CMD_CONNECTION_CHUTE_2 3
978 #define EQ_MAJOR_CODE_COMPLETION 0
980 #define CMD_ISCSI_SESSION_DEL_CFG_FROM_FLASH 0
981 #define CMD_ISCSI_SESSION_SAVE_CFG_ON_FLASH 1
985 #define CONNECTION_UPLOAD_GRACEFUL 1
986 #define CONNECTION_UPLOAD_ABORT_RESET 2
989 #define CONNECTION_UPLOAD_ABORT 3
992 #define CONNECTION_UPLOAD_ABORT_WITH_SEQ 4
998 #define BE_NUMBER_OF_FIELD(_type_, _field_) \
999 (FIELD_SIZEOF(_type_, _field_)/sizeof((((_type_ *)0)->_field_[0])))\
1006 #define SOL_CMD_COMPLETE 1
1009 #define SOL_CMD_KILLED_DATA_DIGEST_ERR 2
1013 #define CXN_KILLED_PDU_SIZE_EXCEEDS_DSL 3
1018 #define CXN_KILLED_BURST_LEN_MISMATCH 4
1023 #define CXN_KILLED_AHS_RCVD 5
1027 #define CXN_KILLED_HDR_DIGEST_ERR 6
1031 #define CXN_KILLED_UNKNOWN_HDR 7
1036 #define CXN_KILLED_STALE_ITT_TTT_RCVD 8
1041 #define CXN_KILLED_INVALID_ITT_TTT_RCVD 9
1046 #define CXN_KILLED_RST_RCVD 10
1050 #define CXN_KILLED_TIMED_OUT 11
1055 #define CXN_KILLED_RST_SENT 12
1059 #define CXN_KILLED_FIN_RCVD 13
1063 #define CXN_KILLED_BAD_UNSOL_PDU_RCVD 14
1069 #define CXN_KILLED_BAD_WRB_INDEX_ERROR 15
1073 #define CXN_KILLED_OVER_RUN_RESIDUAL 16
1078 #define CXN_KILLED_UNDER_RUN_RESIDUAL 17
1083 #define CMD_KILLED_INVALID_STATSN_RCVD 18
1087 #define CMD_KILLED_INVALID_R2T_RCVD 19
1092 #define CMD_CXN_KILLED_LUN_INVALID 20
1096 #define CMD_CXN_KILLED_ICD_INVALID 21
1101 #define CMD_CXN_KILLED_ITT_INVALID 22
1105 #define CMD_CXN_KILLED_SEQ_OUTOFORDER 23
1109 #define CMD_CXN_KILLED_INVALID_DATASN_RCVD 24
1114 #define CXN_INVALIDATE_NOTIFY 25
1117 #define CXN_INVALIDATE_INDEX_NOTIFY 26
1121 #define CMD_INVALIDATED_NOTIFY 27
1124 #define UNSOL_HDR_NOTIFY 28
1125 #define UNSOL_DATA_NOTIFY 29
1126 #define UNSOL_DATA_DIGEST_ERROR_NOTIFY 30
1129 #define DRIVERMSG_NOTIFY 31
1132 #define CXN_KILLED_CMND_DATA_NOT_ON_SAME_CONN 32
1137 #define SOL_CMD_KILLED_DIF_ERR 33
1141 #define CXN_KILLED_SYN_RCVD 34
1145 #define CXN_KILLED_IMM_DATA_RCVD 35
1156 bool embedded,
u8 sge_cnt);