Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
ch.c File Reference
#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>
#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>

Go to the source code of this file.

Data Structures

struct  scsi_changer
 

Macros

#define VERSION   "0.25"
 
#define CH_DT_MAX   16
 
#define CH_TYPES   8
 
#define CH_MAX_DEVS   128
 
#define DPRINTK(fmt, arg...)
 
#define VPRINTK(level, fmt, arg...)
 
#define MAX_RETRIES   1
 

Functions

 MODULE_DESCRIPTION ("device driver for scsi media changer devices")
 
 MODULE_AUTHOR ("Gerd Knorr <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS_CHARDEV_MAJOR (SCSI_CHANGER_MAJOR)
 
 MODULE_ALIAS_SCSI_DEVICE (TYPE_MEDIUM_CHANGER)
 
 module_param (init, int, 0444)
 
 MODULE_PARM_DESC (init,"initialize element status on driver load (default: on)")
 
 module_param (timeout_move, int, 0644)
 
 MODULE_PARM_DESC (timeout_move,"timeout for move commands ""(default: 300 seconds)")
 
 module_param (timeout_init, int, 0644)
 
 MODULE_PARM_DESC (timeout_init,"timeout for INITIALIZE ELEMENT STATUS ""(default: 3600 seconds)")
 
 module_param (verbose, int, 0644)
 
 MODULE_PARM_DESC (verbose,"be verbose (default: on)")
 
 module_param (debug, int, 0644)
 
 MODULE_PARM_DESC (debug,"enable/disable debug messages, also prints more ""detailed sense codes on scsi errors (default: off)")
 
 module_param_array (dt_id, int, NULL, 0444)
 
 module_param_array (dt_lun, int, NULL, 0444)
 
 module_param_array (vendor_firsts, int, NULL, 0444)
 
 module_param_array (vendor_counts, int, NULL, 0444)
 
 module_init (init_ch_module)
 
 module_exit (exit_ch_module)
 

Macro Definition Documentation

#define CH_DT_MAX   16

Definition at line 36 of file ch.c.

#define CH_MAX_DEVS   128

Definition at line 38 of file ch.c.

#define CH_TYPES   8

Definition at line 37 of file ch.c.

#define DPRINTK (   fmt,
  arg... 
)
Value:
do { \
if (debug) \
printk(KERN_DEBUG "%s: " fmt, ch->name, ##arg); \
} while (0)

Definition at line 87 of file ch.c.

#define MAX_RETRIES   1

Definition at line 100 of file ch.c.

#define VERSION   "0.25"

Definition at line 8 of file ch.c.

#define VPRINTK (   level,
  fmt,
  arg... 
)
Value:
do { \
if (verbose) \
printk(level "%s: " fmt, ch->name, ##arg); \
} while (0)

Definition at line 92 of file ch.c.

Function Documentation

MODULE_ALIAS_CHARDEV_MAJOR ( SCSI_CHANGER_MAJOR  )
MODULE_ALIAS_SCSI_DEVICE ( TYPE_MEDIUM_CHANGER  )
MODULE_AUTHOR ( "Gerd Knorr <[email protected]>"  )
MODULE_DESCRIPTION ( "device driver for scsi media changer devices )
module_exit ( exit_ch_module  )
module_init ( init_ch_module  )
MODULE_LICENSE ( "GPL"  )
module_param ( init  ,
int  ,
0444   
)
module_param ( timeout_move  ,
int  ,
0644   
)
module_param ( timeout_init  ,
int  ,
0644   
)
module_param ( verbose  ,
int  ,
0644   
)
module_param ( debug  ,
int  ,
0644   
)
module_param_array ( dt_id  ,
int  ,
NULL  ,
0444   
)
module_param_array ( dt_lun  ,
int  ,
NULL  ,
0444   
)
module_param_array ( vendor_firsts  ,
int  ,
NULL  ,
0444   
)
module_param_array ( vendor_counts  ,
int  ,
NULL  ,
0444   
)
MODULE_PARM_DESC ( init  ,
"initialize element status on driver load (default: on)"   
)
MODULE_PARM_DESC ( timeout_move  ,
"timeout for move commands ""(default: 300 seconds)"   
)
MODULE_PARM_DESC ( timeout_init  ,
"timeout for INITIALIZE ELEMENT STATUS ""(default: 3600 seconds)"   
)
MODULE_PARM_DESC ( verbose  ,
"be verbose (default: on)"   
)
MODULE_PARM_DESC ( debug  ,
"enable/disable debug  messages,
also prints more""detailed sense codes on scsi errors(default:off)"   
)

Variable Documentation

unsigned char asc

Definition at line 122 of file ch.c.

unsigned char ascq

Definition at line 123 of file ch.c.

int errno

Definition at line 124 of file ch.c.

unsigned char sense

Definition at line 121 of file ch.c.