Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
tape.h File Reference
#include <asm/ccwdev.h>
#include <asm/debug.h>
#include <asm/idals.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mtio.h>
#include <linux/interrupt.h>
#include <linux/workqueue.h>

Go to the source code of this file.

Data Structures

struct  tape_request
 
struct  tape_discipline
 
struct  tape_char_data
 
struct  tape_device
 

Macros

#define DBF_LIKE_HELL
 
#define DBF_LH(level, str,...)
 
#define DBF_EVENT(d_level, d_str...)
 
#define DBF_EXCEPTION(d_level, d_str...)
 
#define TAPE_VERSION_MAJOR   2
 
#define TAPE_VERSION_MINOR   0
 
#define TAPE_MAGIC   "tape"
 
#define TAPE_MINORS_PER_DEV   2 /* two minors per device */
 
#define TAPEBLOCK_HSEC_SIZE   2048
 
#define TAPEBLOCK_HSEC_S2B   2
 
#define TAPEBLOCK_RETRIES   5
 
#define TAPE_NR_MTOPS   (MTMKPART+1)
 
#define TAPE_IO_SUCCESS   0 /* request successful */
 
#define TAPE_IO_PENDING   1 /* request still running */
 
#define TAPE_IO_RETRY   2 /* retry to current request */
 
#define TAPE_IO_STOP   3 /* stop the running request */
 
#define TAPE_IO_LONG_BUSY   4 /* delay the running request */
 

Typedefs

typedef int(* tape_mtop_fn )(struct tape_device *, int)
 

Enumerations

enum  tape_medium_state { MS_UNKNOWN, MS_LOADED, MS_UNLOADED, MS_SIZE }
 
enum  tape_state {
  TS_UNUSED =0, TS_IN_USE, TS_BLKUSE, TS_INIT,
  TS_NOT_OPER, TS_SIZE
}
 
enum  tape_op {
  TO_BLOCK, TO_BSB, TO_BSF, TO_DSE,
  TO_FSB, TO_FSF, TO_LBL, TO_NOP,
  TO_RBA, TO_RBI, TO_RFO, TO_REW,
  TO_RUN, TO_WRI, TO_WTM, TO_MSEN,
  TO_LOAD, TO_READ_CONFIG, TO_READ_ATTMSG, TO_DIS,
  TO_ASSIGN, TO_UNASSIGN, TO_CRYPT_ON, TO_CRYPT_OFF,
  TO_KEKL_SET, TO_KEKL_QUERY, TO_RDC, TO_SIZE
}
 
enum  tape_request_status {
  TAPE_REQUEST_INIT, TAPE_REQUEST_QUEUED, TAPE_REQUEST_IN_IO, TAPE_REQUEST_DONE,
  TAPE_REQUEST_CANCEL, TAPE_REQUEST_LONG_BUSY
}
 

Functions

struct tape_requesttape_alloc_request (int cplength, int datasize)
 
void tape_free_request (struct tape_request *)
 
int tape_do_io (struct tape_device *, struct tape_request *)
 
int tape_do_io_async (struct tape_device *, struct tape_request *)
 
int tape_do_io_interruptible (struct tape_device *, struct tape_request *)
 
int tape_cancel_io (struct tape_device *, struct tape_request *)
 
void tape_hotplug_event (struct tape_device *, int major, int action)
 
int tape_oper_handler (int irq, int status)
 
void tape_noper_handler (int irq, int status)
 
int tape_open (struct tape_device *)
 
int tape_release (struct tape_device *)
 
int tape_mtop (struct tape_device *, int, int)
 
void tape_state_set (struct tape_device *, enum tape_state)
 
int tape_generic_online (struct tape_device *, struct tape_discipline *)
 
int tape_generic_offline (struct ccw_device *)
 
int tape_generic_pm_suspend (struct ccw_device *)
 
int tape_generic_probe (struct ccw_device *)
 
void tape_generic_remove (struct ccw_device *)
 
struct tape_devicetape_find_device (int devindex)
 
struct tape_devicetape_get_device (struct tape_device *)
 
void tape_put_device (struct tape_device *)
 
int tapechar_init (void)
 
void tapechar_exit (void)
 
int tapechar_setup_device (struct tape_device *)
 
void tapechar_cleanup_device (struct tape_device *)
 
void tape_dump_sense_dbf (struct tape_device *, struct tape_request *, struct irb *)
 
void tape_med_state_set (struct tape_device *, enum tape_medium_state)
 

Variables

debug_info_tTAPE_DBF_AREA
 
const chartape_state_verbose []
 
const chartape_op_verbose []
 

Macro Definition Documentation

#define DBF_EVENT (   d_level,
  d_str... 
)
Value:
do { \
debug_sprintf_event(TAPE_DBF_AREA, d_level, d_str); \
} while (0)

Definition at line 42 of file tape.h.

#define DBF_EXCEPTION (   d_level,
  d_str... 
)
Value:
do { \
debug_sprintf_exception(TAPE_DBF_AREA, d_level, d_str); \
} while (0)

Definition at line 47 of file tape.h.

#define DBF_LH (   level,
  str,
  ... 
)
Value:
do { \
debug_sprintf_event(TAPE_DBF_AREA, level, str, ## __VA_ARGS__); \
} while (0)

Definition at line 31 of file tape.h.

#define DBF_LIKE_HELL

Definition at line 29 of file tape.h.

#define TAPE_IO_LONG_BUSY   4 /* delay the running request */

Definition at line 169 of file tape.h.

#define TAPE_IO_PENDING   1 /* request still running */

Definition at line 166 of file tape.h.

#define TAPE_IO_RETRY   2 /* retry to current request */

Definition at line 167 of file tape.h.

#define TAPE_IO_STOP   3 /* stop the running request */

Definition at line 168 of file tape.h.

#define TAPE_IO_SUCCESS   0 /* request successful */

Definition at line 165 of file tape.h.

#define TAPE_MAGIC   "tape"

Definition at line 54 of file tape.h.

#define TAPE_MINORS_PER_DEV   2 /* two minors per device */

Definition at line 56 of file tape.h.

#define TAPE_NR_MTOPS   (MTMKPART+1)

Definition at line 144 of file tape.h.

#define TAPE_VERSION_MAJOR   2

Definition at line 52 of file tape.h.

#define TAPE_VERSION_MINOR   0

Definition at line 53 of file tape.h.

#define TAPEBLOCK_HSEC_S2B   2

Definition at line 58 of file tape.h.

#define TAPEBLOCK_HSEC_SIZE   2048

Definition at line 57 of file tape.h.

#define TAPEBLOCK_RETRIES   5

Definition at line 59 of file tape.h.

Typedef Documentation

typedef int(* tape_mtop_fn)(struct tape_device *, int)

Definition at line 141 of file tape.h.

Enumeration Type Documentation

Enumerator:
MS_UNKNOWN 
MS_LOADED 
MS_UNLOADED 
MS_SIZE 

Definition at line 61 of file tape.h.

enum tape_op
Enumerator:
TO_BLOCK 
TO_BSB 
TO_BSF 
TO_DSE 
TO_FSB 
TO_FSF 
TO_LBL 
TO_NOP 
TO_RBA 
TO_RBI 
TO_RFO 
TO_REW 
TO_RUN 
TO_WRI 
TO_WTM 
TO_MSEN 
TO_LOAD 
TO_READ_CONFIG 
TO_READ_ATTMSG 
TO_DIS 
TO_ASSIGN 
TO_UNASSIGN 
TO_CRYPT_ON 
TO_CRYPT_OFF 
TO_KEKL_SET 
TO_KEKL_QUERY 
TO_RDC 
TO_SIZE 

Definition at line 77 of file tape.h.

Enumerator:
TAPE_REQUEST_INIT 
TAPE_REQUEST_QUEUED 
TAPE_REQUEST_IN_IO 
TAPE_REQUEST_DONE 
TAPE_REQUEST_CANCEL 
TAPE_REQUEST_LONG_BUSY 

Definition at line 112 of file tape.h.

enum tape_state
Enumerator:
TS_UNUSED 
TS_IN_USE 
TS_BLKUSE 
TS_INIT 
TS_NOT_OPER 
TS_SIZE 

Definition at line 68 of file tape.h.

Function Documentation

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 ,
struct tape_request  
)

Definition at line 1086 of file tape_core.c.

int tape_do_io ( struct tape_device ,
struct tape_request  
)

Definition at line 1011 of file tape_core.c.

int tape_do_io_async ( struct tape_device ,
struct tape_request  
)

Definition at line 985 of file tape_core.c.

int tape_do_io_interruptible ( struct tape_device ,
struct tape_request  
)

Definition at line 1043 of file tape_core.c.

void tape_dump_sense_dbf ( struct tape_device ,
struct tape_request ,
struct 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 )

Definition at line 765 of file tape_core.c.

int tape_generic_offline ( struct ccw_device )

Definition at line 487 of file tape_core.c.

int tape_generic_online ( struct tape_device ,
struct tape_discipline  
)

Definition at line 372 of file tape_core.c.

int tape_generic_pm_suspend ( struct ccw_device )

Definition at line 443 of file tape_core.c.

int tape_generic_probe ( struct ccw_device )

Definition at line 614 of file tape_core.c.

void tape_generic_remove ( struct ccw_device )

Definition at line 666 of file tape_core.c.

struct tape_device* tape_get_device ( struct tape_device )
read

Definition at line 561 of file tape_core.c.

void tape_hotplug_event ( struct tape_device ,
int  major,
int  action 
)
void tape_med_state_set ( struct tape_device ,
enum  tape_medium_state 
)

Definition at line 262 of file tape_core.c.

int tape_mtop ( struct tape_device ,
int  ,
int   
)

Definition at line 1292 of file tape_core.c.

void tape_noper_handler ( int  irq,
int  status 
)
int tape_open ( struct tape_device )

Definition at line 1248 of file tape_core.c.

int tape_oper_handler ( int  irq,
int  status 
)
void tape_put_device ( struct tape_device )

Definition at line 577 of file tape_core.c.

int tape_release ( struct tape_device )

Definition at line 1278 of file tape_core.c.

void tape_state_set ( struct tape_device ,
enum  tape_state 
)

Definition at line 186 of file tape_core.c.

void tapechar_cleanup_device ( struct tape_device )

Definition at line 88 of file tape_char.c.

void tapechar_exit ( void  )

Definition at line 495 of file tape_char.c.

int tapechar_init ( void  )

Definition at line 479 of file tape_char.c.

int tapechar_setup_device ( struct tape_device )

Definition at line 63 of file tape_char.c.

Variable Documentation

debug_info_t* TAPE_DBF_AREA

Definition at line 27 of file tape_34xx.c.

const char* tape_op_verbose[]

Definition at line 63 of file tape_core.c.

const char* tape_state_verbose[]

Definition at line 54 of file tape_core.c.