18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * QLogic iSCSI Offload Driver 48c2ecf20Sopenharmony_ci * Copyright (c) 2016 Cavium Inc. 58c2ecf20Sopenharmony_ci */ 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci#ifndef _QEDI_FW_ISCSI_H_ 88c2ecf20Sopenharmony_ci#define _QEDI_FW_ISCSI_H_ 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci#include "qedi_fw_scsi.h" 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_cistruct iscsi_task_params { 138c2ecf20Sopenharmony_ci struct e4_iscsi_task_context *context; 148c2ecf20Sopenharmony_ci struct iscsi_wqe *sqe; 158c2ecf20Sopenharmony_ci u32 tx_io_size; 168c2ecf20Sopenharmony_ci u32 rx_io_size; 178c2ecf20Sopenharmony_ci u16 conn_icid; 188c2ecf20Sopenharmony_ci u16 itid; 198c2ecf20Sopenharmony_ci u8 cq_rss_number; 208c2ecf20Sopenharmony_ci}; 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_cistruct iscsi_conn_params { 238c2ecf20Sopenharmony_ci u32 first_burst_length; 248c2ecf20Sopenharmony_ci u32 max_send_pdu_length; 258c2ecf20Sopenharmony_ci u32 max_burst_length; 268c2ecf20Sopenharmony_ci bool initial_r2t; 278c2ecf20Sopenharmony_ci bool immediate_data; 288c2ecf20Sopenharmony_ci}; 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci/* @brief init_initiator_read_iscsi_task - initializes iSCSI Initiator Read 318c2ecf20Sopenharmony_ci * task context. 328c2ecf20Sopenharmony_ci * 338c2ecf20Sopenharmony_ci * @param task_params - Pointer to task parameters struct 348c2ecf20Sopenharmony_ci * @param conn_params - Connection Parameters 358c2ecf20Sopenharmony_ci * @param cmd_params - command specific parameters 368c2ecf20Sopenharmony_ci * @param cmd_pdu_header - PDU Header Parameters 378c2ecf20Sopenharmony_ci * @param sgl_task_params - Pointer to SGL task params 388c2ecf20Sopenharmony_ci * @param dif_task_params - Pointer to DIF parameters struct 398c2ecf20Sopenharmony_ci */ 408c2ecf20Sopenharmony_ciint init_initiator_rw_iscsi_task(struct iscsi_task_params *task_params, 418c2ecf20Sopenharmony_ci struct iscsi_conn_params *conn_params, 428c2ecf20Sopenharmony_ci struct scsi_initiator_cmd_params *cmd_params, 438c2ecf20Sopenharmony_ci struct iscsi_cmd_hdr *cmd_pdu_header, 448c2ecf20Sopenharmony_ci struct scsi_sgl_task_params *tx_sgl_params, 458c2ecf20Sopenharmony_ci struct scsi_sgl_task_params *rx_sgl_params, 468c2ecf20Sopenharmony_ci struct scsi_dif_task_params *dif_task_params); 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ci/* @brief init_initiator_login_request_task - initializes iSCSI Initiator Login 498c2ecf20Sopenharmony_ci * Request task context. 508c2ecf20Sopenharmony_ci * 518c2ecf20Sopenharmony_ci * @param task_params - Pointer to task parameters struct 528c2ecf20Sopenharmony_ci * @param login_req_pdu_header - PDU Header Parameters 538c2ecf20Sopenharmony_ci * @param tx_sgl_task_params - Pointer to SGL task params 548c2ecf20Sopenharmony_ci * @param rx_sgl_task_params - Pointer to SGL task params 558c2ecf20Sopenharmony_ci */ 568c2ecf20Sopenharmony_ciint init_initiator_login_request_task(struct iscsi_task_params *task_params, 578c2ecf20Sopenharmony_ci struct iscsi_login_req_hdr *login_header, 588c2ecf20Sopenharmony_ci struct scsi_sgl_task_params *tx_params, 598c2ecf20Sopenharmony_ci struct scsi_sgl_task_params *rx_params); 608c2ecf20Sopenharmony_ci 618c2ecf20Sopenharmony_ci/* @brief init_initiator_nop_out_task - initializes iSCSI Initiator NOP Out 628c2ecf20Sopenharmony_ci * task context. 638c2ecf20Sopenharmony_ci * 648c2ecf20Sopenharmony_ci * @param task_params - Pointer to task parameters struct 658c2ecf20Sopenharmony_ci * @param nop_out_pdu_header - PDU Header Parameters 668c2ecf20Sopenharmony_ci * @param tx_sgl_task_params - Pointer to SGL task params 678c2ecf20Sopenharmony_ci * @param rx_sgl_task_params - Pointer to SGL task params 688c2ecf20Sopenharmony_ci */ 698c2ecf20Sopenharmony_ciint init_initiator_nop_out_task(struct iscsi_task_params *task_params, 708c2ecf20Sopenharmony_ci struct iscsi_nop_out_hdr *nop_out_pdu_header, 718c2ecf20Sopenharmony_ci struct scsi_sgl_task_params *tx_sgl_params, 728c2ecf20Sopenharmony_ci struct scsi_sgl_task_params *rx_sgl_params); 738c2ecf20Sopenharmony_ci 748c2ecf20Sopenharmony_ci/* @brief init_initiator_logout_request_task - initializes iSCSI Initiator 758c2ecf20Sopenharmony_ci * Logout Request task context. 768c2ecf20Sopenharmony_ci * 778c2ecf20Sopenharmony_ci * @param task_params - Pointer to task parameters struct 788c2ecf20Sopenharmony_ci * @param logout_pdu_header - PDU Header Parameters 798c2ecf20Sopenharmony_ci * @param tx_sgl_task_params - Pointer to SGL task params 808c2ecf20Sopenharmony_ci * @param rx_sgl_task_params - Pointer to SGL task params 818c2ecf20Sopenharmony_ci */ 828c2ecf20Sopenharmony_ciint init_initiator_logout_request_task(struct iscsi_task_params *task_params, 838c2ecf20Sopenharmony_ci struct iscsi_logout_req_hdr *logout_hdr, 848c2ecf20Sopenharmony_ci struct scsi_sgl_task_params *tx_params, 858c2ecf20Sopenharmony_ci struct scsi_sgl_task_params *rx_params); 868c2ecf20Sopenharmony_ci 878c2ecf20Sopenharmony_ci/* @brief init_initiator_tmf_request_task - initializes iSCSI Initiator TMF 888c2ecf20Sopenharmony_ci * task context. 898c2ecf20Sopenharmony_ci * 908c2ecf20Sopenharmony_ci * @param task_params - Pointer to task parameters struct 918c2ecf20Sopenharmony_ci * @param tmf_pdu_header - PDU Header Parameters 928c2ecf20Sopenharmony_ci */ 938c2ecf20Sopenharmony_ciint init_initiator_tmf_request_task(struct iscsi_task_params *task_params, 948c2ecf20Sopenharmony_ci struct iscsi_tmf_request_hdr *tmf_header); 958c2ecf20Sopenharmony_ci 968c2ecf20Sopenharmony_ci/* @brief init_initiator_text_request_task - initializes iSCSI Initiator Text 978c2ecf20Sopenharmony_ci * Request task context. 988c2ecf20Sopenharmony_ci * 998c2ecf20Sopenharmony_ci * @param task_params - Pointer to task parameters struct 1008c2ecf20Sopenharmony_ci * @param text_request_pdu_header - PDU Header Parameters 1018c2ecf20Sopenharmony_ci * @param tx_sgl_task_params - Pointer to Tx SGL task params 1028c2ecf20Sopenharmony_ci * @param rx_sgl_task_params - Pointer to Rx SGL task params 1038c2ecf20Sopenharmony_ci */ 1048c2ecf20Sopenharmony_ciint init_initiator_text_request_task(struct iscsi_task_params *task_params, 1058c2ecf20Sopenharmony_ci struct iscsi_text_request_hdr *text_header, 1068c2ecf20Sopenharmony_ci struct scsi_sgl_task_params *tx_params, 1078c2ecf20Sopenharmony_ci struct scsi_sgl_task_params *rx_params); 1088c2ecf20Sopenharmony_ci 1098c2ecf20Sopenharmony_ci/* @brief init_cleanup_task - initializes Clean task (SQE) 1108c2ecf20Sopenharmony_ci * 1118c2ecf20Sopenharmony_ci * @param task_params - Pointer to task parameters struct 1128c2ecf20Sopenharmony_ci */ 1138c2ecf20Sopenharmony_ciint init_cleanup_task(struct iscsi_task_params *task_params); 1148c2ecf20Sopenharmony_ci#endif 115