linux/drivers/target/target_core_pscsi.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*******************************************************************************
 * Filename:  target_core_pscsi.c
 *
 * This file contains the generic target mode <-> Linux SCSI subsystem plugin.
 *
 * (c) Copyright 2003-2013 Datera, Inc.
 *
 * Nicholas A. Bellinger <[email protected]>
 *
 ******************************************************************************/

#include <linux/string.h>
#include <linux/parser.h>
#include <linux/timer.h>
#include <linux/blkdev.h>
#include <linux/blk_types.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/cdrom.h>
#include <linux/ratelimit.h>
#include <linux/module.h>
#include <asm/unaligned.h>

#include <scsi/scsi_device.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_tcq.h>

#include <target/target_core_base.h>
#include <target/target_core_backend.h>

#include "target_core_alua.h"
#include "target_core_internal.h"
#include "target_core_pscsi.h"

static inline struct pscsi_dev_virt *PSCSI_DEV(struct se_device *dev)
{}

static sense_reason_t pscsi_execute_cmd(struct se_cmd *cmd);
static enum rq_end_io_ret pscsi_req_done(struct request *, blk_status_t);

/*	pscsi_attach_hba():
 *
 * 	pscsi_get_sh() used scsi_host_lookup() to locate struct Scsi_Host.
 *	from the passed SCSI Host ID.
 */
static int pscsi_attach_hba(struct se_hba *hba, u32 host_id)
{}

static void pscsi_detach_hba(struct se_hba *hba)
{}

static int pscsi_pmode_enable_hba(struct se_hba *hba, unsigned long mode_flag)
{}

static void pscsi_tape_read_blocksize(struct se_device *dev,
		struct scsi_device *sdev)
{}

static void
pscsi_set_inquiry_info(struct scsi_device *sdev, struct t10_wwn *wwn)
{}

static int
pscsi_get_inquiry_vpd_serial(struct scsi_device *sdev, struct t10_wwn *wwn)
{}

static void
pscsi_get_inquiry_vpd_device_ident(struct scsi_device *sdev,
		struct t10_wwn *wwn)
{}

static int pscsi_add_device_to_list(struct se_device *dev,
		struct scsi_device *sd)
{}

static struct se_device *pscsi_alloc_device(struct se_hba *hba,
		const char *name)
{}

/*
 * Called with struct Scsi_Host->host_lock called.
 */
static int pscsi_create_type_disk(struct se_device *dev, struct scsi_device *sd)
	__releases(sh->host_lock)
{}

/*
 * Called with struct Scsi_Host->host_lock called.
 */
static int pscsi_create_type_nondisk(struct se_device *dev, struct scsi_device *sd)
	__releases(sh->host_lock)
{}

static int pscsi_configure_device(struct se_device *dev)
{}

static void pscsi_dev_call_rcu(struct rcu_head *p)
{}

static void pscsi_free_device(struct se_device *dev)
{}

static void pscsi_destroy_device(struct se_device *dev)
{}

static void pscsi_complete_cmd(struct se_cmd *cmd, u8 scsi_status,
			       unsigned char *req_sense, int valid_data)
{}

enum {};

static match_table_t tokens =;

static ssize_t pscsi_set_configfs_dev_params(struct se_device *dev,
		const char *page, ssize_t count)
{}

static ssize_t pscsi_show_configfs_dev_params(struct se_device *dev, char *b)
{}

static void pscsi_bi_endio(struct bio *bio)
{}

static sense_reason_t
pscsi_map_sg(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents,
		struct request *req)
{}

static sense_reason_t
pscsi_parse_cdb(struct se_cmd *cmd)
{}

static sense_reason_t
pscsi_execute_cmd(struct se_cmd *cmd)
{}

/*	pscsi_get_device_type():
 *
 *
 */
static u32 pscsi_get_device_type(struct se_device *dev)
{}

static sector_t pscsi_get_blocks(struct se_device *dev)
{}

static enum rq_end_io_ret pscsi_req_done(struct request *req,
					 blk_status_t status)
{}

static const struct target_backend_ops pscsi_ops =;

static int __init pscsi_module_init(void)
{}

static void __exit pscsi_module_exit(void)
{}

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();

module_init();
module_exit(pscsi_module_exit);