diff options
Diffstat (limited to 'drivers/scsi/be2iscsi/be_cmds.h')
-rw-r--r-- | drivers/scsi/be2iscsi/be_cmds.h | 147 |
1 files changed, 130 insertions, 17 deletions
diff --git a/drivers/scsi/be2iscsi/be_cmds.h b/drivers/scsi/be2iscsi/be_cmds.h index 40641d0845f4..5218de4ab35a 100644 --- a/drivers/scsi/be2iscsi/be_cmds.h +++ b/drivers/scsi/be2iscsi/be_cmds.h | |||
@@ -162,6 +162,13 @@ struct be_mcc_mailbox { | |||
162 | #define OPCODE_COMMON_ISCSI_CFG_POST_SGL_PAGES 2 | 162 | #define OPCODE_COMMON_ISCSI_CFG_POST_SGL_PAGES 2 |
163 | #define OPCODE_COMMON_ISCSI_CFG_REMOVE_SGL_PAGES 3 | 163 | #define OPCODE_COMMON_ISCSI_CFG_REMOVE_SGL_PAGES 3 |
164 | #define OPCODE_COMMON_ISCSI_NTWK_GET_NIC_CONFIG 7 | 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_CONFIGURE_STATELESS_IP_ADDR 17 | ||
167 | #define OPCODE_COMMON_ISCSI_NTWK_MODIFY_IP_ADDR 21 | ||
168 | #define OPCODE_COMMON_ISCSI_NTWK_GET_DEFAULT_GATEWAY 22 | ||
169 | #define OPCODE_COMMON_ISCSI_NTWK_MODIFY_DEFAULT_GATEWAY 23 | ||
170 | #define OPCODE_COMMON_ISCSI_NTWK_GET_ALL_IF_ID 24 | ||
171 | #define OPCODE_COMMON_ISCSI_NTWK_GET_IF_INFO 25 | ||
165 | #define OPCODE_COMMON_ISCSI_SET_FRAGNUM_BITS_FOR_SGL_CRA 61 | 172 | #define OPCODE_COMMON_ISCSI_SET_FRAGNUM_BITS_FOR_SGL_CRA 61 |
166 | #define OPCODE_COMMON_ISCSI_DEFQ_CREATE 64 | 173 | #define OPCODE_COMMON_ISCSI_DEFQ_CREATE 64 |
167 | #define OPCODE_COMMON_ISCSI_DEFQ_DESTROY 65 | 174 | #define OPCODE_COMMON_ISCSI_DEFQ_DESTROY 65 |
@@ -237,11 +244,109 @@ struct be_cmd_resp_eq_create { | |||
237 | u16 rsvd0; /* sword */ | 244 | u16 rsvd0; /* sword */ |
238 | } __packed; | 245 | } __packed; |
239 | 246 | ||
247 | struct mgmt_chap_format { | ||
248 | u32 flags; | ||
249 | u8 intr_chap_name[256]; | ||
250 | u8 intr_secret[16]; | ||
251 | u8 target_chap_name[256]; | ||
252 | u8 target_secret[16]; | ||
253 | u16 intr_chap_name_length; | ||
254 | u16 intr_secret_length; | ||
255 | u16 target_chap_name_length; | ||
256 | u16 target_secret_length; | ||
257 | } __packed; | ||
258 | |||
259 | struct mgmt_auth_method_format { | ||
260 | u8 auth_method_type; | ||
261 | u8 padding[3]; | ||
262 | struct mgmt_chap_format chap; | ||
263 | } __packed; | ||
264 | |||
265 | struct mgmt_conn_login_options { | ||
266 | u8 flags; | ||
267 | u8 header_digest; | ||
268 | u8 data_digest; | ||
269 | u8 rsvd0; | ||
270 | u32 max_recv_datasegment_len_ini; | ||
271 | u32 max_recv_datasegment_len_tgt; | ||
272 | u32 tcp_mss; | ||
273 | u32 tcp_window_size; | ||
274 | struct mgmt_auth_method_format auth_data; | ||
275 | } __packed; | ||
276 | |||
277 | struct ip_address_format { | ||
278 | u16 size_of_structure; | ||
279 | u8 reserved; | ||
280 | u8 ip_type; | ||
281 | u8 ip_address[16]; | ||
282 | u32 rsvd0; | ||
283 | } __packed; | ||
284 | |||
285 | struct mgmt_conn_info { | ||
286 | u32 connection_handle; | ||
287 | u32 connection_status; | ||
288 | u16 src_port; | ||
289 | u16 dest_port; | ||
290 | u16 dest_port_redirected; | ||
291 | u16 cid; | ||
292 | u32 estimated_throughput; | ||
293 | struct ip_address_format src_ipaddr; | ||
294 | struct ip_address_format dest_ipaddr; | ||
295 | struct ip_address_format dest_ipaddr_redirected; | ||
296 | struct mgmt_conn_login_options negotiated_login_options; | ||
297 | } __packed; | ||
298 | |||
299 | struct mgmt_session_login_options { | ||
300 | u8 flags; | ||
301 | u8 error_recovery_level; | ||
302 | u16 rsvd0; | ||
303 | u32 first_burst_length; | ||
304 | u32 max_burst_length; | ||
305 | u16 max_connections; | ||
306 | u16 max_outstanding_r2t; | ||
307 | u16 default_time2wait; | ||
308 | u16 default_time2retain; | ||
309 | } __packed; | ||
310 | |||
311 | struct mgmt_session_info { | ||
312 | u32 session_handle; | ||
313 | u32 status; | ||
314 | u8 isid[6]; | ||
315 | u16 tsih; | ||
316 | u32 session_flags; | ||
317 | u16 conn_count; | ||
318 | u16 pad; | ||
319 | u8 target_name[224]; | ||
320 | u8 initiator_iscsiname[224]; | ||
321 | struct mgmt_session_login_options negotiated_login_options; | ||
322 | struct mgmt_conn_info conn_list[1]; | ||
323 | } __packed; | ||
324 | |||
325 | struct be_cmd_req_get_session { | ||
326 | struct be_cmd_req_hdr hdr; | ||
327 | u32 session_handle; | ||
328 | } __packed; | ||
329 | |||
330 | struct be_cmd_resp_get_session { | ||
331 | struct be_cmd_resp_hdr hdr; | ||
332 | struct mgmt_session_info session_info; | ||
333 | } __packed; | ||
334 | |||
240 | struct mac_addr { | 335 | struct mac_addr { |
241 | u16 size_of_struct; | 336 | u16 size_of_struct; |
242 | u8 addr[ETH_ALEN]; | 337 | u8 addr[ETH_ALEN]; |
243 | } __packed; | 338 | } __packed; |
244 | 339 | ||
340 | struct be_cmd_req_get_boot_target { | ||
341 | struct be_cmd_req_hdr hdr; | ||
342 | } __packed; | ||
343 | |||
344 | struct be_cmd_resp_get_boot_target { | ||
345 | struct be_cmd_resp_hdr hdr; | ||
346 | u32 boot_session_count; | ||
347 | int boot_session_handle; | ||
348 | }; | ||
349 | |||
245 | struct be_cmd_req_mac_query { | 350 | struct be_cmd_req_mac_query { |
246 | struct be_cmd_req_hdr hdr; | 351 | struct be_cmd_req_hdr hdr; |
247 | u8 type; | 352 | u8 type; |
@@ -426,6 +531,11 @@ int be_poll_mcc(struct be_ctrl_info *ctrl); | |||
426 | int mgmt_check_supported_fw(struct be_ctrl_info *ctrl, | 531 | int mgmt_check_supported_fw(struct be_ctrl_info *ctrl, |
427 | struct beiscsi_hba *phba); | 532 | struct beiscsi_hba *phba); |
428 | unsigned int be_cmd_get_mac_addr(struct beiscsi_hba *phba); | 533 | unsigned int be_cmd_get_mac_addr(struct beiscsi_hba *phba); |
534 | unsigned int beiscsi_get_boot_target(struct beiscsi_hba *phba); | ||
535 | unsigned int beiscsi_get_session_info(struct beiscsi_hba *phba, | ||
536 | u32 boot_session_handle, | ||
537 | struct be_dma_mem *nonemb_cmd); | ||
538 | |||
429 | void free_mcc_tag(struct be_ctrl_info *ctrl, unsigned int tag); | 539 | void free_mcc_tag(struct be_ctrl_info *ctrl, unsigned int tag); |
430 | /*ISCSI Functuions */ | 540 | /*ISCSI Functuions */ |
431 | int be_cmd_fw_initialize(struct be_ctrl_info *ctrl); | 541 | int be_cmd_fw_initialize(struct be_ctrl_info *ctrl); |
@@ -601,14 +711,6 @@ struct be_eq_delay_params_in { | |||
601 | struct eq_delay delay[8]; | 711 | struct eq_delay delay[8]; |
602 | } __packed; | 712 | } __packed; |
603 | 713 | ||
604 | struct ip_address_format { | ||
605 | u16 size_of_structure; | ||
606 | u8 reserved; | ||
607 | u8 ip_type; | ||
608 | u8 ip_address[16]; | ||
609 | u32 rsvd0; | ||
610 | } __packed; | ||
611 | |||
612 | struct tcp_connect_and_offload_in { | 714 | struct tcp_connect_and_offload_in { |
613 | struct be_cmd_req_hdr hdr; | 715 | struct be_cmd_req_hdr hdr; |
614 | struct ip_address_format ip_address; | 716 | struct ip_address_format ip_address; |
@@ -688,18 +790,29 @@ struct be_fw_cfg { | |||
688 | u32 function_caps; | 790 | u32 function_caps; |
689 | } __packed; | 791 | } __packed; |
690 | 792 | ||
691 | #define CMD_ISCSI_COMMAND_INVALIDATE 1 | 793 | struct be_all_if_id { |
692 | #define ISCSI_OPCODE_SCSI_DATA_OUT 5 | 794 | struct be_cmd_req_hdr hdr; |
795 | u32 if_count; | ||
796 | u32 if_hndl_list[1]; | ||
797 | } __packed; | ||
798 | |||
799 | #define ISCSI_OPCODE_SCSI_DATA_OUT 5 | ||
800 | #define OPCODE_COMMON_MODIFY_EQ_DELAY 41 | ||
801 | #define OPCODE_COMMON_ISCSI_CLEANUP 59 | ||
802 | #define OPCODE_COMMON_TCP_UPLOAD 56 | ||
693 | #define OPCODE_COMMON_ISCSI_TCP_CONNECT_AND_OFFLOAD 70 | 803 | #define OPCODE_COMMON_ISCSI_TCP_CONNECT_AND_OFFLOAD 70 |
694 | #define OPCODE_ISCSI_INI_DRIVER_OFFLOAD_SESSION 41 | ||
695 | #define OPCODE_COMMON_MODIFY_EQ_DELAY 41 | ||
696 | #define OPCODE_COMMON_ISCSI_CLEANUP 59 | ||
697 | #define OPCODE_COMMON_TCP_UPLOAD 56 | ||
698 | #define OPCODE_COMMON_ISCSI_ERROR_RECOVERY_INVALIDATE_COMMANDS 1 | 804 | #define OPCODE_COMMON_ISCSI_ERROR_RECOVERY_INVALIDATE_COMMANDS 1 |
699 | /* --- CMD_ISCSI_INVALIDATE_CONNECTION_TYPE --- */ | 805 | #define OPCODE_ISCSI_INI_CFG_GET_HBA_NAME 6 |
700 | #define CMD_ISCSI_CONNECTION_INVALIDATE 0x8001 | 806 | #define OPCODE_ISCSI_INI_CFG_SET_HBA_NAME 7 |
701 | #define CMD_ISCSI_CONNECTION_ISSUE_TCP_RST 0x8002 | 807 | #define OPCODE_ISCSI_INI_SESSION_GET_A_SESSION 14 |
808 | #define OPCODE_ISCSI_INI_DRIVER_OFFLOAD_SESSION 41 | ||
702 | #define OPCODE_ISCSI_INI_DRIVER_INVALIDATE_CONNECTION 42 | 809 | #define OPCODE_ISCSI_INI_DRIVER_INVALIDATE_CONNECTION 42 |
810 | #define OPCODE_ISCSI_INI_BOOT_GET_BOOT_TARGET 52 | ||
811 | |||
812 | /* --- CMD_ISCSI_INVALIDATE_CONNECTION_TYPE --- */ | ||
813 | #define CMD_ISCSI_COMMAND_INVALIDATE 1 | ||
814 | #define CMD_ISCSI_CONNECTION_INVALIDATE 0x8001 | ||
815 | #define CMD_ISCSI_CONNECTION_ISSUE_TCP_RST 0x8002 | ||
703 | 816 | ||
704 | #define INI_WR_CMD 1 /* Initiator write command */ | 817 | #define INI_WR_CMD 1 /* Initiator write command */ |
705 | #define INI_TMF_CMD 2 /* Initiator TMF command */ | 818 | #define INI_TMF_CMD 2 /* Initiator TMF command */ |