Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
tape_core.c File Reference
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kmod.h>
#include <linux/spinlock.h>
#include <linux/vmalloc.h>
#include <linux/list.h>
#include <linux/slab.h>
#include <asm/types.h>
#include "tape.h"
#include "tape_std.h"

Go to the source code of this file.

Data Structures

struct  tape_med_state_work_data
 

Macros

#define KMSG_COMPONENT   "tape"
 
#define pr_fmt(fmt)   KMSG_COMPONENT ": " fmt
 
#define TAPE_DBF_AREA   tape_core_dbf
 
#define LONG_BUSY_TIMEOUT   180 /* seconds */
 

Functions

 EXPORT_SYMBOL (TAPE_DBF_AREA)
 
void tape_state_set (struct tape_device *device, enum tape_state newstate)
 
void tape_med_state_set (struct tape_device *device, enum tape_medium_state newstate)
 
int tape_generic_online (struct tape_device *device, struct tape_discipline *discipline)
 
int tape_generic_pm_suspend (struct ccw_device *cdev)
 
int tape_generic_offline (struct ccw_device *cdev)
 
struct tape_devicetape_get_device (struct tape_device *device)
 
void tape_put_device (struct tape_device *device)
 
struct tape_devicetape_find_device (int devindex)
 
int tape_generic_probe (struct ccw_device *cdev)
 
void tape_generic_remove (struct ccw_device *cdev)
 
struct tape_requesttape_alloc_request (int cplength, int datasize)
 
void tape_free_request (struct tape_request *request)
 
void tape_dump_sense_dbf (struct tape_device *device, struct tape_request *request, struct irb *irb)
 
int tape_do_io_async (struct tape_device *device, struct tape_request *request)
 
int tape_do_io (struct tape_device *device, struct tape_request *request)
 
int tape_do_io_interruptible (struct tape_device *device, struct tape_request *request)
 
int tape_cancel_io (struct tape_device *device, struct tape_request *request)
 
int tape_open (struct tape_device *device)
 
int tape_release (struct tape_device *device)
 
int tape_mtop (struct tape_device *device, int mt_op, int mt_count)
 
 MODULE_AUTHOR ("(C) 2001 IBM Deutschland Entwicklung GmbH by Carsten Otte and ""Michael Holzheu ([email protected],[email protected])")
 
 MODULE_DESCRIPTION ("Linux on zSeries channel attached tape device driver")
 
 MODULE_LICENSE ("GPL")
 
 module_init (tape_init)
 
 module_exit (tape_exit)
 
 EXPORT_SYMBOL (tape_generic_remove)
 
 EXPORT_SYMBOL (tape_generic_probe)
 
 EXPORT_SYMBOL (tape_generic_online)
 
 EXPORT_SYMBOL (tape_generic_offline)
 
 EXPORT_SYMBOL (tape_generic_pm_suspend)
 
 EXPORT_SYMBOL (tape_put_device)
 
 EXPORT_SYMBOL (tape_get_device)
 
 EXPORT_SYMBOL (tape_state_verbose)
 
 EXPORT_SYMBOL (tape_op_verbose)
 
 EXPORT_SYMBOL (tape_state_set)
 
 EXPORT_SYMBOL (tape_med_state_set)
 
 EXPORT_SYMBOL (tape_alloc_request)
 
 EXPORT_SYMBOL (tape_free_request)
 
 EXPORT_SYMBOL (tape_dump_sense_dbf)
 
 EXPORT_SYMBOL (tape_do_io)
 
 EXPORT_SYMBOL (tape_do_io_async)
 
 EXPORT_SYMBOL (tape_do_io_interruptible)
 
 EXPORT_SYMBOL (tape_cancel_io)
 
 EXPORT_SYMBOL (tape_mtop)
 

Variables

debug_info_tTAPE_DBF_AREA = NULL
 
const chartape_state_verbose [TS_SIZE]
 
const chartape_op_verbose [TO_SIZE]
 

Macro Definition Documentation

#define KMSG_COMPONENT   "tape"

Definition at line 13 of file tape_core.c.

#define LONG_BUSY_TIMEOUT   180 /* seconds */

Definition at line 31 of file tape_core.c.

#define pr_fmt (   fmt)    KMSG_COMPONENT ": " fmt

Definition at line 14 of file tape_core.c.

#define TAPE_DBF_AREA   tape_core_dbf

Definition at line 26 of file tape_core.c.

Function Documentation

EXPORT_SYMBOL ( TAPE_DBF_AREA  )
EXPORT_SYMBOL ( tape_generic_remove  )
EXPORT_SYMBOL ( tape_generic_probe  )
EXPORT_SYMBOL ( tape_generic_online  )
EXPORT_SYMBOL ( tape_generic_offline  )
EXPORT_SYMBOL ( tape_generic_pm_suspend  )
EXPORT_SYMBOL ( tape_put_device  )
EXPORT_SYMBOL ( tape_get_device  )
EXPORT_SYMBOL ( tape_state_verbose  )
EXPORT_SYMBOL ( tape_op_verbose  )
EXPORT_SYMBOL ( tape_state_set  )
EXPORT_SYMBOL ( tape_med_state_set  )
EXPORT_SYMBOL ( tape_alloc_request  )
EXPORT_SYMBOL ( tape_free_request  )
EXPORT_SYMBOL ( tape_dump_sense_dbf  )
EXPORT_SYMBOL ( tape_do_io  )
EXPORT_SYMBOL ( tape_do_io_async  )
EXPORT_SYMBOL ( tape_do_io_interruptible  )
EXPORT_SYMBOL ( tape_cancel_io  )
EXPORT_SYMBOL ( tape_mtop  )
MODULE_AUTHOR ( "(C) 2001 IBM Deutschland Entwicklung GmbH by Carsten Otte and ""Michael Holzheu ([email protected],[email protected])"  )
MODULE_DESCRIPTION ( "Linux on zSeries channel attached tape device driver )
module_exit ( tape_exit  )
module_init ( tape_init  )
MODULE_LICENSE ( "GPL"  )
struct tape_request* tape_alloc_request ( int  cplength,
int  datasize 
)
read

Definition at line 722 of file tape_core.c.

int tape_cancel_io ( struct tape_device device,
struct tape_request request 
)

Definition at line 1086 of file tape_core.c.

int tape_do_io ( struct tape_device device,
struct tape_request request 
)

Definition at line 1011 of file tape_core.c.

int tape_do_io_async ( struct tape_device device,
struct tape_request request 
)

Definition at line 985 of file tape_core.c.

int tape_do_io_interruptible ( struct tape_device device,
struct tape_request request 
)

Definition at line 1043 of file tape_core.c.

void tape_dump_sense_dbf ( struct tape_device device,
struct tape_request request,
struct irb irb 
)

Definition at line 914 of file tape_core.c.

struct tape_device* tape_find_device ( int  devindex)
read

Definition at line 594 of file tape_core.c.

void tape_free_request ( struct tape_request request)

Definition at line 765 of file tape_core.c.

int tape_generic_offline ( struct ccw_device cdev)

Definition at line 487 of file tape_core.c.

int tape_generic_online ( struct tape_device device,
struct tape_discipline discipline 
)

Definition at line 372 of file tape_core.c.

int tape_generic_pm_suspend ( struct ccw_device cdev)

Definition at line 443 of file tape_core.c.

int tape_generic_probe ( struct ccw_device cdev)

Definition at line 614 of file tape_core.c.

void tape_generic_remove ( struct ccw_device cdev)

Definition at line 666 of file tape_core.c.

struct tape_device* tape_get_device ( struct tape_device device)
read

Definition at line 561 of file tape_core.c.

void tape_med_state_set ( struct tape_device device,
enum tape_medium_state  newstate 
)

Definition at line 262 of file tape_core.c.

int tape_mtop ( struct tape_device device,
int  mt_op,
int  mt_count 
)

Definition at line 1292 of file tape_core.c.

int tape_open ( struct tape_device device)

Definition at line 1248 of file tape_core.c.

void tape_put_device ( struct tape_device device)

Definition at line 577 of file tape_core.c.

int tape_release ( struct tape_device device)

Definition at line 1278 of file tape_core.c.

void tape_state_set ( struct tape_device device,
enum tape_state  newstate 
)

Definition at line 186 of file tape_core.c.

Variable Documentation

debug_info_t* TAPE_DBF_AREA = NULL

Definition at line 48 of file tape_core.c.

const char* tape_op_verbose[TO_SIZE]
Initial value:
=
{
[TO_BLOCK] = "BLK", [TO_BSB] = "BSB",
[TO_BSF] = "BSF", [TO_DSE] = "DSE",
[TO_FSB] = "FSB", [TO_FSF] = "FSF",
[TO_LBL] = "LBL", [TO_NOP] = "NOP",
[TO_RBA] = "RBA", [TO_RBI] = "RBI",
[TO_RFO] = "RFO", [TO_REW] = "REW",
[TO_RUN] = "RUN", [TO_WRI] = "WRI",
[TO_WTM] = "WTM", [TO_MSEN] = "MSN",
[TO_LOAD] = "LOA", [TO_READ_CONFIG] = "RCF",
[TO_READ_ATTMSG] = "RAT",
[TO_DIS] = "DIS", [TO_ASSIGN] = "ASS",
[TO_UNASSIGN] = "UAS", [TO_CRYPT_ON] = "CON",
[TO_CRYPT_OFF] = "COF", [TO_KEKL_SET] = "KLS",
[TO_KEKL_QUERY] = "KLQ",[TO_RDC] = "RDC",
}

Definition at line 63 of file tape_core.c.

const char* tape_state_verbose[TS_SIZE]
Initial value:
=
{
[TS_UNUSED] = "UNUSED",
[TS_IN_USE] = "IN_USE",
[TS_BLKUSE] = "BLKUSE",
[TS_INIT] = "INIT ",
[TS_NOT_OPER] = "NOT_OP"
}

Definition at line 54 of file tape_core.c.