linux/drivers/scsi/ch.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * SCSI Media Changer device driver for Linux 2.6
 *
 *     (c) 1996-2003 Gerd Knorr <[email protected]>
 *
 */

#define VERSION

#include <linux/module.h>
#include <linux/init.h>
#include <linux/fs.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/major.h>
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/interrupt.h>
#include <linux/blkdev.h>
#include <linux/completion.h>
#include <linux/compat.h>
#include <linux/chio.h>			/* here are all the ioctls */
#include <linux/mutex.h>
#include <linux/idr.h>
#include <linux/slab.h>

#include <scsi/scsi.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_driver.h>
#include <scsi/scsi_ioctl.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_eh.h>
#include <scsi/scsi_dbg.h>

#define CH_DT_MAX
#define CH_TYPES
#define CH_MAX_DEVS

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();
MODULE_ALIAS_CHARDEV_MAJOR();
MODULE_ALIAS_SCSI_DEVICE();

static int init =;
module_param(init, int, 0444);
MODULE_PARM_DESC();

static int timeout_move =;
module_param(timeout_move, int, 0644);
MODULE_PARM_DESC();

static int timeout_init =;
module_param(timeout_init, int, 0644);
MODULE_PARM_DESC();

static int verbose =;
module_param(verbose, int, 0644);
MODULE_PARM_DESC();

static int debug;
module_param(debug, int, 0644);
MODULE_PARM_DESC();

static int dt_id[CH_DT_MAX] =;
static int dt_lun[CH_DT_MAX];
module_param_array();
module_param_array();

/* tell the driver about vendor-specific slots */
static int vendor_firsts[CH_TYPES-4];
static int vendor_counts[CH_TYPES-4];
module_param_array();
module_param_array();

static const char * vendor_labels[CH_TYPES-4] =;
// module_param_string_array(vendor_labels, NULL, 0444);

#define ch_printk(prefix, ch, fmt, a...)

#define DPRINTK(fmt, arg...)
#define VPRINTK(level, fmt, arg...)

/* ------------------------------------------------------------------- */

#define MAX_RETRIES

static const struct class ch_sysfs_class =;

scsi_changer;

static DEFINE_IDR(ch_index_idr);
static DEFINE_SPINLOCK(ch_index_lock);

static const struct {} ch_err[] =;

/* ------------------------------------------------------------------- */

static int ch_find_errno(struct scsi_sense_hdr *sshdr)
{}

static int
ch_do_scsi(scsi_changer *ch, unsigned char *cmd, int cmd_len,
	   void *buffer, unsigned int buflength, enum req_op op)
{}

/* ------------------------------------------------------------------------ */

static int
ch_elem_to_typecode(scsi_changer *ch, u_int elem)
{}

static int
ch_read_element_status(scsi_changer *ch, u_int elem, char *data)
{}

static int
ch_init_elem(scsi_changer *ch)
{}

static int
ch_readconfig(scsi_changer *ch)
{}

/* ------------------------------------------------------------------------ */

static int
ch_position(scsi_changer *ch, u_int trans, u_int elem, int rotate)
{}

static int
ch_move(scsi_changer *ch, u_int trans, u_int src, u_int dest, int rotate)
{}

static int
ch_exchange(scsi_changer *ch, u_int trans, u_int src,
	    u_int dest1, u_int dest2, int rotate1, int rotate2)
{}

static void
ch_check_voltag(char *tag)
{}

static int
ch_set_voltag(scsi_changer *ch, u_int elem,
	      int alternate, int clear, u_char *tag)
{}

static int ch_gstatus(scsi_changer *ch, int type, unsigned char __user *dest)
{}

/* ------------------------------------------------------------------------ */

static void ch_destroy(struct kref *ref)
{}

static int
ch_release(struct inode *inode, struct file *file)
{}

static int
ch_open(struct inode *inode, struct file *file)
{}

static int
ch_checkrange(scsi_changer *ch, unsigned int type, unsigned int unit)
{}

struct changer_element_status32 {};
#define CHIOGSTATUS32

static long ch_ioctl(struct file *file,
		    unsigned int cmd, unsigned long arg)
{}

/* ------------------------------------------------------------------------ */

static int ch_probe(struct device *dev)
{}

static int ch_remove(struct device *dev)
{}

static struct scsi_driver ch_template =;

static const struct file_operations changer_fops =;

static int __init init_ch_module(void)
{}

static void __exit exit_ch_module(void)
{}

module_init();
module_exit(exit_ch_module);