|
Linux Kernel
3.7.1
|
#include <linux/module.h>#include <linux/fs.h>#include <linux/kernel.h>#include <linux/sched.h>#include <linux/mm.h>#include <linux/init.h>#include <linux/string.h>#include <linux/slab.h>#include <linux/errno.h>#include <linux/mtio.h>#include <linux/cdrom.h>#include <linux/ioctl.h>#include <linux/fcntl.h>#include <linux/spinlock.h>#include <linux/blkdev.h>#include <linux/moduleparam.h>#include <linux/cdev.h>#include <linux/idr.h>#include <linux/delay.h>#include <linux/mutex.h>#include <asm/uaccess.h>#include <asm/dma.h>#include <scsi/scsi.h>#include <scsi/scsi_dbg.h>#include <scsi/scsi_device.h>#include <scsi/scsi_driver.h>#include <scsi/scsi_eh.h>#include <scsi/scsi_host.h>#include <scsi/scsi_ioctl.h>#include <scsi/sg.h>#include "st_options.h"#include "st.h"#include "osst_detect.h"Go to the source code of this file.
Data Structures | |
| struct | st_dev_parm |
| struct | st_reject_data |
Functions | |
| MODULE_AUTHOR ("Kai Makisara") | |
| MODULE_DESCRIPTION ("SCSI tape (st) driver") | |
| MODULE_LICENSE ("GPL") | |
| MODULE_ALIAS_CHARDEV_MAJOR (SCSI_TAPE_MAJOR) | |
| MODULE_ALIAS_SCSI_DEVICE (TYPE_TAPE) | |
| module_param_named (buffer_kbs, buffer_kbs, int, 0) | |
| MODULE_PARM_DESC (buffer_kbs,"Default driver buffer size for fixed block mode (KB; 32)") | |
| module_param_named (max_sg_segs, max_sg_segs, int, 0) | |
| MODULE_PARM_DESC (max_sg_segs,"Maximum number of scatter/gather segments to use (256)") | |
| module_param_named (try_direct_io, try_direct_io, int, 0) | |
| MODULE_PARM_DESC (try_direct_io,"Try direct I/O between user buffer and tape drive (1)") | |
| module_param_named (try_rdio, try_rdio, int, 0) | |
| MODULE_PARM_DESC (try_rdio,"Try direct read i/o when possible") | |
| module_param_named (try_wdio, try_wdio, int, 0) | |
| MODULE_PARM_DESC (try_wdio,"Try direct write i/o when possible") | |
| DEB (static void st_log_options(struct scsi_tape *STp, struct st_modedef *STm, char *name){if(debugging){printk(KERN_INFO"%s: Mode %d options: buffer writes: %d, async writes: %d, read ahead: %d\n", name, STp->current_mode, STm->do_buffer_writes, STm->do_async_writes, STm->do_read_ahead);printk(KERN_INFO"%s: can bsr: %d, two FMs: %d, fast mteom: %d, auto lock: %d,\n", name, STp->can_bsr, STp->two_fm, STp->fast_mteom, STp->do_auto_lock);printk(KERN_INFO"%s: defs for wr: %d, no block limits: %d, partitions: %d, s2 log: %d\n", name, STm->defaults_for_writes, STp->omit_blklims, STp->can_partitions, STp->scsi2_logical);printk(KERN_INFO"%s: sysv: %d nowait: %d sili: %d nowait_filemark: %d\n", name, STm->sysv, STp->immediate, STp->sili, STp->immediate_filemark);printk(KERN_INFO"%s: debugging: %d\n", name, debugging);}}) | |
| __setup ("st=", st_setup) | |
| module_init (init_st) | |
| module_exit (exit_st) | |
| #define ST_FIXED_BUFFER_SIZE (ST_FIXED_BUFFER_BLOCKS * ST_KILOBYTE) |
| #define TAPE_MODE | ( | x | ) | ((iminor(x) & ST_MODE_MASK) >> ST_MODE_SHIFT) |
| #define TAPE_NR | ( | x | ) |
| #define to_scsi_tape | ( | obj | ) | container_of(obj, struct scsi_tape, kref) |
| __setup | ( | ) |
| DEB | ( | static void st_log_options(struct scsi_tape *STp, struct st_modedef *STm, char *name){if(debugging){printk(KERN_INFO"%s: Mode %d options: buffer writes: %d, async writes: %d, read ahead: %d\n", name, STp->current_mode, STm->do_buffer_writes, STm->do_async_writes, STm->do_read_ahead);printk(KERN_INFO"%s: can bsr: %d, two FMs: %d, fast mteom: %d, auto lock: %d,\n", name, STp->can_bsr, STp->two_fm, STp->fast_mteom, STp->do_auto_lock);printk(KERN_INFO"%s: defs for wr: %d, no block limits: %d, partitions: %d, s2 log: %d\n", name, STm->defaults_for_writes, STp->omit_blklims, STp->can_partitions, STp->scsi2_logical);printk(KERN_INFO"%s: sysv: %d nowait: %d sili: %d nowait_filemark: %d\n", name, STm->sysv, STp->immediate, STp->sili, STp->immediate_filemark);printk(KERN_INFO"%s: debugging: %d\n", name, debugging);}} | ) |
| MODULE_ALIAS_CHARDEV_MAJOR | ( | SCSI_TAPE_MAJOR | ) |
| MODULE_ALIAS_SCSI_DEVICE | ( | TYPE_TAPE | ) |
| MODULE_AUTHOR | ( | "Kai Makisara" | ) |
| module_exit | ( | exit_st | ) |
| module_init | ( | init_st | ) |
| MODULE_LICENSE | ( | "GPL" | ) |
| module_param_named | ( | buffer_kbs | , |
| buffer_kbs | , | ||
| int | , | ||
| 0 | |||
| ) |
| module_param_named | ( | max_sg_segs | , |
| max_sg_segs | , | ||
| int | , | ||
| 0 | |||
| ) |
| module_param_named | ( | try_direct_io | , |
| try_direct_io | , | ||
| int | , | ||
| 0 | |||
| ) |
| module_param_named | ( | try_rdio | , |
| try_rdio | , | ||
| int | , | ||
| 0 | |||
| ) |
| module_param_named | ( | try_wdio | , |
| try_wdio | , | ||
| int | , | ||
| 0 | |||
| ) |
1.8.2