2 * QLogic iSCSI Offload Driver
3 * Copyright (c) 2016 Cavium Inc.
5 * This software is available under the terms of the GNU General Public License
6 * (GPL) Version 2, available from the file COPYING in the main directory of
10 #ifndef _QEDI_FW_ISCSI_H_
11 #define _QEDI_FW_ISCSI_H_
13 #include "qedi_fw_scsi.h"
15 struct iscsi_task_params
{
16 struct e4_iscsi_task_context
*context
;
17 struct iscsi_wqe
*sqe
;
25 struct iscsi_conn_params
{
26 u32 first_burst_length
;
27 u32 max_send_pdu_length
;
33 /* @brief init_initiator_read_iscsi_task - initializes iSCSI Initiator Read
36 * @param task_params - Pointer to task parameters struct
37 * @param conn_params - Connection Parameters
38 * @param cmd_params - command specific parameters
39 * @param cmd_pdu_header - PDU Header Parameters
40 * @param sgl_task_params - Pointer to SGL task params
41 * @param dif_task_params - Pointer to DIF parameters struct
43 int init_initiator_rw_iscsi_task(struct iscsi_task_params
*task_params
,
44 struct iscsi_conn_params
*conn_params
,
45 struct scsi_initiator_cmd_params
*cmd_params
,
46 struct iscsi_cmd_hdr
*cmd_pdu_header
,
47 struct scsi_sgl_task_params
*tx_sgl_params
,
48 struct scsi_sgl_task_params
*rx_sgl_params
,
49 struct scsi_dif_task_params
*dif_task_params
);
51 /* @brief init_initiator_login_request_task - initializes iSCSI Initiator Login
52 * Request task context.
54 * @param task_params - Pointer to task parameters struct
55 * @param login_req_pdu_header - PDU Header Parameters
56 * @param tx_sgl_task_params - Pointer to SGL task params
57 * @param rx_sgl_task_params - Pointer to SGL task params
59 int init_initiator_login_request_task(struct iscsi_task_params
*task_params
,
60 struct iscsi_login_req_hdr
*login_header
,
61 struct scsi_sgl_task_params
*tx_params
,
62 struct scsi_sgl_task_params
*rx_params
);
64 /* @brief init_initiator_nop_out_task - initializes iSCSI Initiator NOP Out
67 * @param task_params - Pointer to task parameters struct
68 * @param nop_out_pdu_header - PDU Header Parameters
69 * @param tx_sgl_task_params - Pointer to SGL task params
70 * @param rx_sgl_task_params - Pointer to SGL task params
72 int init_initiator_nop_out_task(struct iscsi_task_params
*task_params
,
73 struct iscsi_nop_out_hdr
*nop_out_pdu_header
,
74 struct scsi_sgl_task_params
*tx_sgl_params
,
75 struct scsi_sgl_task_params
*rx_sgl_params
);
77 /* @brief init_initiator_logout_request_task - initializes iSCSI Initiator
78 * Logout Request task context.
80 * @param task_params - Pointer to task parameters struct
81 * @param logout_pdu_header - PDU Header Parameters
82 * @param tx_sgl_task_params - Pointer to SGL task params
83 * @param rx_sgl_task_params - Pointer to SGL task params
85 int init_initiator_logout_request_task(struct iscsi_task_params
*task_params
,
86 struct iscsi_logout_req_hdr
*logout_hdr
,
87 struct scsi_sgl_task_params
*tx_params
,
88 struct scsi_sgl_task_params
*rx_params
);
90 /* @brief init_initiator_tmf_request_task - initializes iSCSI Initiator TMF
93 * @param task_params - Pointer to task parameters struct
94 * @param tmf_pdu_header - PDU Header Parameters
96 int init_initiator_tmf_request_task(struct iscsi_task_params
*task_params
,
97 struct iscsi_tmf_request_hdr
*tmf_header
);
99 /* @brief init_initiator_text_request_task - initializes iSCSI Initiator Text
100 * Request task context.
102 * @param task_params - Pointer to task parameters struct
103 * @param text_request_pdu_header - PDU Header Parameters
104 * @param tx_sgl_task_params - Pointer to Tx SGL task params
105 * @param rx_sgl_task_params - Pointer to Rx SGL task params
107 int init_initiator_text_request_task(struct iscsi_task_params
*task_params
,
108 struct iscsi_text_request_hdr
*text_header
,
109 struct scsi_sgl_task_params
*tx_params
,
110 struct scsi_sgl_task_params
*rx_params
);
112 /* @brief init_cleanup_task - initializes Clean task (SQE)
114 * @param task_params - Pointer to task parameters struct
116 int init_cleanup_task(struct iscsi_task_params
*task_params
);