#include <linux/string.h>
#include <linux/parser.h>
#include <linux/highmem.h>
#include <linux/timer.h>
#include <linux/scatterlist.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <scsi/scsi_proto.h>
#include <target/target_core_base.h>
#include <target/target_core_backend.h>
#include "target_core_rd.h"
static inline struct rd_dev *RD_DEV(struct se_device *dev)
{ … }
static int rd_attach_hba(struct se_hba *hba, u32 host_id)
{ … }
static void rd_detach_hba(struct se_hba *hba)
{ … }
static u32 rd_release_sgl_table(struct rd_dev *rd_dev, struct rd_dev_sg_table *sg_table,
u32 sg_table_count)
{ … }
static void rd_release_device_space(struct rd_dev *rd_dev)
{ … }
static int rd_allocate_sgl_table(struct rd_dev *rd_dev, struct rd_dev_sg_table *sg_table,
u32 total_sg_needed, unsigned char init_payload)
{ … }
static int rd_build_device_space(struct rd_dev *rd_dev)
{ … }
static void rd_release_prot_space(struct rd_dev *rd_dev)
{ … }
static int rd_build_prot_space(struct rd_dev *rd_dev, int prot_length, int block_size)
{ … }
static struct se_device *rd_alloc_device(struct se_hba *hba, const char *name)
{ … }
static int rd_configure_device(struct se_device *dev)
{ … }
static void rd_dev_call_rcu(struct rcu_head *p)
{ … }
static void rd_free_device(struct se_device *dev)
{ … }
static void rd_destroy_device(struct se_device *dev)
{ … }
static struct rd_dev_sg_table *rd_get_sg_table(struct rd_dev *rd_dev, u32 page)
{ … }
static struct rd_dev_sg_table *rd_get_prot_table(struct rd_dev *rd_dev, u32 page)
{ … }
static sense_reason_t rd_do_prot_rw(struct se_cmd *cmd, bool is_read)
{ … }
static sense_reason_t
rd_execute_rw(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents,
enum dma_data_direction data_direction)
{ … }
enum { … };
static match_table_t tokens = …;
static ssize_t rd_set_configfs_dev_params(struct se_device *dev,
const char *page, ssize_t count)
{ … }
static ssize_t rd_show_configfs_dev_params(struct se_device *dev, char *b)
{ … }
static u32 rd_get_device_type(struct se_device *dev)
{ … }
static sector_t rd_get_blocks(struct se_device *dev)
{ … }
static int rd_init_prot(struct se_device *dev)
{ … }
static void rd_free_prot(struct se_device *dev)
{ … }
static struct exec_cmd_ops rd_exec_cmd_ops = …;
static sense_reason_t
rd_parse_cdb(struct se_cmd *cmd)
{ … }
static const struct target_backend_ops rd_mcp_ops = …;
int __init rd_module_init(void)
{ … }
void rd_module_exit(void)
{ … }