0001
0002
0003
0004
0005 #ifndef _SCSI_FW_FUNCS_H
0006 #define _SCSI_FW_FUNCS_H
0007 #include <linux/qed/common_hsi.h>
0008 #include <linux/qed/storage_common.h>
0009 #include <linux/qed/fcoe_common.h>
0010
0011 struct scsi_sgl_task_params {
0012 struct scsi_sge *sgl;
0013 struct regpair sgl_phys_addr;
0014 u32 total_buffer_size;
0015 u16 num_sges;
0016
0017
0018
0019
0020 bool small_mid_sge;
0021 };
0022
0023 struct scsi_dif_task_params {
0024 u32 initial_ref_tag;
0025 bool initial_ref_tag_is_valid;
0026 u16 application_tag;
0027 u16 application_tag_mask;
0028 u16 dif_block_size_log;
0029 bool dif_on_network;
0030 bool dif_on_host;
0031 u8 host_guard_type;
0032 u8 protection_type;
0033 u8 ref_tag_mask;
0034 bool crc_seed;
0035
0036
0037
0038
0039 bool tx_dif_conn_err_en;
0040 bool ignore_app_tag;
0041 bool keep_ref_tag_const;
0042 bool validate_guard;
0043 bool validate_app_tag;
0044 bool validate_ref_tag;
0045 bool forward_guard;
0046 bool forward_app_tag;
0047 bool forward_ref_tag;
0048 bool forward_app_tag_with_mask;
0049 bool forward_ref_tag_with_mask;
0050 };
0051
0052 struct scsi_initiator_cmd_params {
0053
0054
0055
0056 struct scsi_sge extended_cdb_sge;
0057
0058
0059 struct regpair sense_data_buffer_phys_addr;
0060 };
0061
0062
0063
0064
0065
0066
0067
0068
0069 bool scsi_is_slow_sgl(u16 num_sges, bool small_mid_sge);
0070
0071
0072
0073
0074
0075
0076
0077
0078
0079 void init_scsi_sgl_context(struct scsi_sgl_params *sgl_params,
0080 struct scsi_cached_sges *ctx_data_desc,
0081 struct scsi_sgl_task_params *sgl_task_params);
0082 #endif