Linux 4.18.10
[linux/fpc-iii.git] / drivers / scsi / qedi / qedi_fw_iscsi.h
blobc3deb77ac388f4b97a4460847f706411e86b2427
1 /*
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
7 * this source tree.
8 */
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;
18 u32 tx_io_size;
19 u32 rx_io_size;
20 u16 conn_icid;
21 u16 itid;
22 u8 cq_rss_number;
25 struct iscsi_conn_params {
26 u32 first_burst_length;
27 u32 max_send_pdu_length;
28 u32 max_burst_length;
29 bool initial_r2t;
30 bool immediate_data;
33 /* @brief init_initiator_read_iscsi_task - initializes iSCSI Initiator Read
34 * task context.
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
65 * task context.
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
91 * task context.
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);
117 #endif