brintos

brintos / linux-shallow public Read only

0
0
Text · 2.9 KiB · 7125e48 Raw
91 lines · c
1/* SPDX-License-Identifier: GPL-2.0-only */2/* QLogic FCoE Offload Driver3 * Copyright (c) 2016-2018 Cavium Inc.4 */5#ifndef _FCOE_FW_FUNCS_H6#define _FCOE_FW_FUNCS_H7#include "drv_scsi_fw_funcs.h"8#include "qedf_hsi.h"9#include <linux/qed/qed_if.h>10 11struct fcoe_task_params {12	/* Output parameter [set/filled by the HSI function] */13	struct fcoe_task_context *context;14 15	/* Output parameter [set/filled by the HSI function] */16	struct fcoe_wqe *sqe;17	enum fcoe_task_type task_type;18	u32 tx_io_size; /* in bytes */19	u32 rx_io_size; /* in bytes */20	u32 conn_cid;21	u16 itid;22	u8 cq_rss_number;23 24	 /* Whether it's Tape device or not (0=Disk, 1=Tape) */25	u8 is_tape_device;26};27 28/**29 * @brief init_initiator_rw_fcoe_task - Initializes FCoE task context for30 * read/write task types and init fcoe_sqe31 *32 * @param task_params - Pointer to task parameters struct33 * @param sgl_task_params - Pointer to SGL task params34 * @param sense_data_buffer_phys_addr - Pointer to sense data buffer35 * @param task_retry_id - retry identification - Used only for Tape device36 * @param fcp_cmnd_payload - FCP CMD Payload37 */38int init_initiator_rw_fcoe_task(struct fcoe_task_params *task_params,39	struct scsi_sgl_task_params *sgl_task_params,40	struct regpair sense_data_buffer_phys_addr,41	u32 task_retry_id,42	u8 fcp_cmd_payload[32]);43 44/**45 * @brief init_initiator_midpath_fcoe_task - Initializes FCoE task context for46 * midpath/unsolicited task types and init fcoe_sqe47 *48 * @param task_params - Pointer to task parameters struct49 * @param mid_path_fc_header - FC header50 * @param tx_sgl_task_params - Pointer to Tx SGL task params51 * @param rx_sgl_task_params - Pointer to Rx SGL task params52 * @param fw_to_place_fc_header	- Indication if the FW will place the FC header53 * in addition to the data arrives.54 */55int init_initiator_midpath_unsolicited_fcoe_task(56	struct fcoe_task_params *task_params,57	struct fcoe_tx_mid_path_params *mid_path_fc_header,58	struct scsi_sgl_task_params *tx_sgl_task_params,59	struct scsi_sgl_task_params *rx_sgl_task_params,60	u8 fw_to_place_fc_header);61 62/**63 * @brief init_initiator_abort_fcoe_task - Initializes FCoE task context for64 * abort task types and init fcoe_sqe65 *66 * @param task_params - Pointer to task parameters struct67 */68int init_initiator_abort_fcoe_task(struct fcoe_task_params *task_params);69 70/**71 * @brief init_initiator_cleanup_fcoe_task - Initializes FCoE task context for72 * cleanup task types and init fcoe_sqe73 *74 *75 * @param task_params - Pointer to task parameters struct76 */77int init_initiator_cleanup_fcoe_task(struct fcoe_task_params *task_params);78 79/**80 * @brief init_initiator_cleanup_fcoe_task - Initializes FCoE task context for81 * sequence recovery task types and init fcoe_sqe82 *83 *84 * @param task_params - Pointer to task parameters struct85 * @param desired_offset - The desired offest the task will be re-sent from86 */87int init_initiator_sequence_recovery_fcoe_task(88	struct fcoe_task_params *task_params,89	u32 desired_offset);90#endif91