Linux 4.16.11
[linux/fpc-iii.git] / drivers / scsi / qedf / drv_fcoe_fw_funcs.h
blobb5c236efd465da0382a6affc0c7f2a51e7bb44ee
1 /* QLogic FCoE Offload Driver
2 * Copyright (c) 2016-2017 Cavium Inc.
4 * This software is available under the terms of the GNU General Public License
5 * (GPL) Version 2, available from the file COPYING in the main directory of
6 * this source tree.
7 */
8 #ifndef _FCOE_FW_FUNCS_H
9 #define _FCOE_FW_FUNCS_H
10 #include "drv_scsi_fw_funcs.h"
11 #include "qedf_hsi.h"
12 #include <linux/qed/qed_if.h>
14 struct fcoe_task_params {
15 /* Output parameter [set/filled by the HSI function] */
16 struct e4_fcoe_task_context *context;
18 /* Output parameter [set/filled by the HSI function] */
19 struct fcoe_wqe *sqe;
20 enum fcoe_task_type task_type;
21 u32 tx_io_size; /* in bytes */
22 u32 rx_io_size; /* in bytes */
23 u32 conn_cid;
24 u16 itid;
25 u8 cq_rss_number;
27 /* Whether it's Tape device or not (0=Disk, 1=Tape) */
28 u8 is_tape_device;
31 /**
32 * @brief init_initiator_rw_fcoe_task - Initializes FCoE task context for
33 * read/write task types and init fcoe_sqe
35 * @param task_params - Pointer to task parameters struct
36 * @param sgl_task_params - Pointer to SGL task params
37 * @param sense_data_buffer_phys_addr - Pointer to sense data buffer
38 * @param task_retry_id - retry identification - Used only for Tape device
39 * @param fcp_cmnd_payload - FCP CMD Payload
41 int init_initiator_rw_fcoe_task(struct fcoe_task_params *task_params,
42 struct scsi_sgl_task_params *sgl_task_params,
43 struct regpair sense_data_buffer_phys_addr,
44 u32 task_retry_id,
45 u8 fcp_cmd_payload[32]);
47 /**
48 * @brief init_initiator_midpath_fcoe_task - Initializes FCoE task context for
49 * midpath/unsolicited task types and init fcoe_sqe
51 * @param task_params - Pointer to task parameters struct
52 * @param mid_path_fc_header - FC header
53 * @param tx_sgl_task_params - Pointer to Tx SGL task params
54 * @param rx_sgl_task_params - Pointer to Rx SGL task params
55 * @param fw_to_place_fc_header - Indication if the FW will place the FC header
56 * in addition to the data arrives.
58 int init_initiator_midpath_unsolicited_fcoe_task(
59 struct fcoe_task_params *task_params,
60 struct fcoe_tx_mid_path_params *mid_path_fc_header,
61 struct scsi_sgl_task_params *tx_sgl_task_params,
62 struct scsi_sgl_task_params *rx_sgl_task_params,
63 u8 fw_to_place_fc_header);
65 /**
66 * @brief init_initiator_abort_fcoe_task - Initializes FCoE task context for
67 * abort task types and init fcoe_sqe
69 * @param task_params - Pointer to task parameters struct
71 int init_initiator_abort_fcoe_task(struct fcoe_task_params *task_params);
73 /**
74 * @brief init_initiator_cleanup_fcoe_task - Initializes FCoE task context for
75 * cleanup task types and init fcoe_sqe
78 * @param task_params - Pointer to task parameters struct
80 int init_initiator_cleanup_fcoe_task(struct fcoe_task_params *task_params);
82 /**
83 * @brief init_initiator_cleanup_fcoe_task - Initializes FCoE task context for
84 * sequence recovery task types and init fcoe_sqe
87 * @param task_params - Pointer to task parameters struct
88 * @param desired_offset - The desired offest the task will be re-sent from
90 int init_initiator_sequence_recovery_fcoe_task(
91 struct fcoe_task_params *task_params,
92 u32 desired_offset);
93 #endif