#include <linux/kernel.h>
#include <linux/module.h>
#include <asm/unaligned.h>
#include <scsi/scsi_proto.h>
#include <scsi/scsi_common.h>
#include <scsi/scsi_tcq.h>
#include <target/target_core_base.h>
#include <target/target_core_backend.h>
#include <target/target_core_fabric.h>
#include "target_core_internal.h"
#include "target_core_alua.h"
#include "target_core_pr.h"
#include "target_core_ua.h"
#include "target_core_xcopy.h"
static void spc_fill_alua_data(struct se_lun *lun, unsigned char *buf)
{ … }
static u16
spc_find_scsi_transport_vd(int proto_id)
{ … }
sense_reason_t
spc_emulate_inquiry_std(struct se_cmd *cmd, unsigned char *buf)
{ … }
EXPORT_SYMBOL(…);
static sense_reason_t
spc_emulate_evpd_80(struct se_cmd *cmd, unsigned char *buf)
{ … }
void spc_gen_naa_6h_vendor_specific(struct se_device *dev,
unsigned char *buf)
{ … }
sense_reason_t
spc_emulate_evpd_83(struct se_cmd *cmd, unsigned char *buf)
{ … }
EXPORT_SYMBOL(…);
static sense_reason_t
spc_emulate_evpd_86(struct se_cmd *cmd, unsigned char *buf)
{ … }
static sense_reason_t
spc_emulate_evpd_b0(struct se_cmd *cmd, unsigned char *buf)
{ … }
static sense_reason_t
spc_emulate_evpd_b1(struct se_cmd *cmd, unsigned char *buf)
{ … }
static sense_reason_t
spc_emulate_evpd_b2(struct se_cmd *cmd, unsigned char *buf)
{ … }
static sense_reason_t
spc_emulate_evpd_b3(struct se_cmd *cmd, unsigned char *buf)
{ … }
static sense_reason_t
spc_emulate_evpd_00(struct se_cmd *cmd, unsigned char *buf);
static struct { … } evpd_handlers[] = …;
static sense_reason_t
spc_emulate_evpd_00(struct se_cmd *cmd, unsigned char *buf)
{ … }
static sense_reason_t
spc_emulate_inquiry(struct se_cmd *cmd)
{ … }
static int spc_modesense_rwrecovery(struct se_cmd *cmd, u8 pc, u8 *p)
{ … }
static int spc_modesense_control(struct se_cmd *cmd, u8 pc, u8 *p)
{ … }
static int spc_modesense_caching(struct se_cmd *cmd, u8 pc, u8 *p)
{ … }
static int spc_modesense_informational_exceptions(struct se_cmd *cmd, u8 pc, unsigned char *p)
{ … }
static struct { … } modesense_handlers[] = …;
static void spc_modesense_write_protect(unsigned char *buf, int type)
{ … }
static void spc_modesense_dpofua(unsigned char *buf, int type)
{ … }
static int spc_modesense_blockdesc(unsigned char *buf, u64 blocks, u32 block_size)
{ … }
static int spc_modesense_long_blockdesc(unsigned char *buf, u64 blocks, u32 block_size)
{ … }
static sense_reason_t spc_emulate_modesense(struct se_cmd *cmd)
{ … }
static sense_reason_t spc_emulate_modeselect(struct se_cmd *cmd)
{ … }
static sense_reason_t spc_emulate_request_sense(struct se_cmd *cmd)
{ … }
sense_reason_t spc_emulate_report_luns(struct se_cmd *cmd)
{ … }
EXPORT_SYMBOL(…);
static sense_reason_t
spc_emulate_testunitready(struct se_cmd *cmd)
{ … }
static void set_dpofua_usage_bits(u8 *usage_bits, struct se_device *dev)
{ … }
static void set_dpofua_usage_bits32(u8 *usage_bits, struct se_device *dev)
{ … }
static struct target_opcode_descriptor tcm_opcode_read6 = …;
static struct target_opcode_descriptor tcm_opcode_read10 = …;
static struct target_opcode_descriptor tcm_opcode_read12 = …;
static struct target_opcode_descriptor tcm_opcode_read16 = …;
static struct target_opcode_descriptor tcm_opcode_write6 = …;
static struct target_opcode_descriptor tcm_opcode_write10 = …;
static struct target_opcode_descriptor tcm_opcode_write_verify10 = …;
static struct target_opcode_descriptor tcm_opcode_write12 = …;
static struct target_opcode_descriptor tcm_opcode_write16 = …;
static struct target_opcode_descriptor tcm_opcode_write_verify16 = …;
static bool tcm_is_ws_enabled(struct target_opcode_descriptor *descr,
struct se_cmd *cmd)
{ … }
static struct target_opcode_descriptor tcm_opcode_write_same32 = …;
static bool tcm_is_caw_enabled(struct target_opcode_descriptor *descr,
struct se_cmd *cmd)
{ … }
static struct target_opcode_descriptor tcm_opcode_compare_write = …;
static struct target_opcode_descriptor tcm_opcode_read_capacity = …;
static struct target_opcode_descriptor tcm_opcode_read_capacity16 = …;
static bool tcm_is_rep_ref_enabled(struct target_opcode_descriptor *descr,
struct se_cmd *cmd)
{ … }
static struct target_opcode_descriptor tcm_opcode_read_report_refferals = …;
static struct target_opcode_descriptor tcm_opcode_sync_cache = …;
static struct target_opcode_descriptor tcm_opcode_sync_cache16 = …;
static bool tcm_is_unmap_enabled(struct target_opcode_descriptor *descr,
struct se_cmd *cmd)
{ … }
static struct target_opcode_descriptor tcm_opcode_unmap = …;
static struct target_opcode_descriptor tcm_opcode_write_same = …;
static struct target_opcode_descriptor tcm_opcode_write_same16 = …;
static struct target_opcode_descriptor tcm_opcode_verify = …;
static struct target_opcode_descriptor tcm_opcode_verify16 = …;
static struct target_opcode_descriptor tcm_opcode_start_stop = …;
static struct target_opcode_descriptor tcm_opcode_mode_select = …;
static struct target_opcode_descriptor tcm_opcode_mode_select10 = …;
static struct target_opcode_descriptor tcm_opcode_mode_sense = …;
static struct target_opcode_descriptor tcm_opcode_mode_sense10 = …;
static struct target_opcode_descriptor tcm_opcode_pri_read_keys = …;
static struct target_opcode_descriptor tcm_opcode_pri_read_resrv = …;
static bool tcm_is_pr_enabled(struct target_opcode_descriptor *descr,
struct se_cmd *cmd)
{ … }
static struct target_opcode_descriptor tcm_opcode_pri_read_caps = …;
static struct target_opcode_descriptor tcm_opcode_pri_read_full_status = …;
static struct target_opcode_descriptor tcm_opcode_pro_register = …;
static struct target_opcode_descriptor tcm_opcode_pro_reserve = …;
static struct target_opcode_descriptor tcm_opcode_pro_release = …;
static struct target_opcode_descriptor tcm_opcode_pro_clear = …;
static struct target_opcode_descriptor tcm_opcode_pro_preempt = …;
static struct target_opcode_descriptor tcm_opcode_pro_preempt_abort = …;
static struct target_opcode_descriptor tcm_opcode_pro_reg_ign_exist = …;
static struct target_opcode_descriptor tcm_opcode_pro_register_move = …;
static struct target_opcode_descriptor tcm_opcode_release = …;
static struct target_opcode_descriptor tcm_opcode_release10 = …;
static struct target_opcode_descriptor tcm_opcode_reserve = …;
static struct target_opcode_descriptor tcm_opcode_reserve10 = …;
static struct target_opcode_descriptor tcm_opcode_request_sense = …;
static struct target_opcode_descriptor tcm_opcode_inquiry = …;
static bool tcm_is_3pc_enabled(struct target_opcode_descriptor *descr,
struct se_cmd *cmd)
{ … }
static struct target_opcode_descriptor tcm_opcode_extended_copy_lid1 = …;
static struct target_opcode_descriptor tcm_opcode_rcv_copy_res_op_params = …;
static struct target_opcode_descriptor tcm_opcode_report_luns = …;
static struct target_opcode_descriptor tcm_opcode_test_unit_ready = …;
static struct target_opcode_descriptor tcm_opcode_report_target_pgs = …;
static bool spc_rsoc_enabled(struct target_opcode_descriptor *descr,
struct se_cmd *cmd)
{ … }
static struct target_opcode_descriptor tcm_opcode_report_supp_opcodes = …;
static bool tcm_is_set_tpg_enabled(struct target_opcode_descriptor *descr,
struct se_cmd *cmd)
{ … }
static struct target_opcode_descriptor tcm_opcode_set_tpg = …;
static struct target_opcode_descriptor *tcm_supported_opcodes[] = …;
static int
spc_rsoc_encode_command_timeouts_descriptor(unsigned char *buf, u8 ctdp,
struct target_opcode_descriptor *descr)
{ … }
static int
spc_rsoc_encode_command_descriptor(unsigned char *buf, u8 ctdp,
struct target_opcode_descriptor *descr)
{ … }
static int
spc_rsoc_encode_one_command_descriptor(unsigned char *buf, u8 ctdp,
struct target_opcode_descriptor *descr,
struct se_device *dev)
{ … }
static sense_reason_t
spc_rsoc_get_descr(struct se_cmd *cmd, struct target_opcode_descriptor **opcode)
{ … }
static sense_reason_t
spc_emulate_report_supp_op_codes(struct se_cmd *cmd)
{ … }
sense_reason_t
spc_parse_cdb(struct se_cmd *cmd, unsigned int *size)
{ … }
EXPORT_SYMBOL(…);