Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
dasd.c File Reference
#include <linux/kmod.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/ctype.h>
#include <linux/major.h>
#include <linux/slab.h>
#include <linux/hdreg.h>
#include <linux/async.h>
#include <linux/mutex.h>
#include <linux/debugfs.h>
#include <linux/seq_file.h>
#include <linux/vmalloc.h>
#include <asm/ccwdev.h>
#include <asm/ebcdic.h>
#include <asm/idals.h>
#include <asm/itcw.h>
#include <asm/diag.h>
#include "dasd_int.h"

Go to the source code of this file.

Macros

#define KMSG_COMPONENT   "dasd"
 
#define pr_fmt(fmt)   KMSG_COMPONENT ": " fmt
 
#define PRINTK_HEADER   "dasd:"
 
#define DASD_CHANQ_MAX_SIZE   4
 
#define DASD_SLEEPON_START_TAG   (void *) 1
 
#define DASD_SLEEPON_END_TAG   (void *) 2
 
#define dasd_profile_start(block, cqr, req)   do {} while (0)
 
#define dasd_profile_end(block, cqr, req)   do {} while (0)
 

Functions

void dasd_int_handler (struct ccw_device *, unsigned long, struct irb *)
 
 MODULE_AUTHOR ("Holger Smolinski <[email protected]>")
 
 MODULE_DESCRIPTION ("Linux on S/390 DASD device driver,"" Copyright IBM Corp. 2000")
 
 MODULE_SUPPORTED_DEVICE ("dasd")
 
 MODULE_LICENSE ("GPL")
 
struct dasd_devicedasd_alloc_device (void)
 
void dasd_free_device (struct dasd_device *device)
 
struct dasd_blockdasd_alloc_block (void)
 
void dasd_free_block (struct dasd_block *block)
 
void dasd_kick_device (struct dasd_device *device)
 
void dasd_reload_device (struct dasd_device *device)
 
 EXPORT_SYMBOL (dasd_reload_device)
 
void dasd_restore_device (struct dasd_device *device)
 
void dasd_set_target_state (struct dasd_device *device, int target)
 
void dasd_enable_device (struct dasd_device *device)
 
int dasd_stats_generic_show (struct seq_file *m, void *v)
 
int dasd_profile_on (struct dasd_profile *profile)
 
struct dasd_ccw_reqdasd_kmalloc_request (int magic, int cplength, int datasize, struct dasd_device *device)
 
struct dasd_ccw_reqdasd_smalloc_request (int magic, int cplength, int datasize, struct dasd_device *device)
 
void dasd_kfree_request (struct dasd_ccw_req *cqr, struct dasd_device *device)
 
void dasd_sfree_request (struct dasd_ccw_req *cqr, struct dasd_device *device)
 
int dasd_term_IO (struct dasd_ccw_req *cqr)
 
int dasd_start_IO (struct dasd_ccw_req *cqr)
 
void dasd_device_set_timer (struct dasd_device *device, int expires)
 
void dasd_device_clear_timer (struct dasd_device *device)
 
void dasd_generic_handle_state_change (struct dasd_device *device)
 
enum uc_todo dasd_generic_uc_handler (struct ccw_device *cdev, struct irb *irb)
 
 EXPORT_SYMBOL_GPL (dasd_generic_uc_handler)
 
int dasd_flush_device_queue (struct dasd_device *device)
 
void dasd_schedule_device_bh (struct dasd_device *device)
 
void dasd_device_set_stop_bits (struct dasd_device *device, int bits)
 
 EXPORT_SYMBOL_GPL (dasd_device_set_stop_bits)
 
void dasd_device_remove_stop_bits (struct dasd_device *device, int bits)
 
 EXPORT_SYMBOL_GPL (dasd_device_remove_stop_bits)
 
void dasd_add_request_head (struct dasd_ccw_req *cqr)
 
void dasd_add_request_tail (struct dasd_ccw_req *cqr)
 
void dasd_wakeup_cb (struct dasd_ccw_req *cqr, void *data)
 
 EXPORT_SYMBOL_GPL (dasd_wakeup_cb)
 
int dasd_sleep_on (struct dasd_ccw_req *cqr)
 
int dasd_sleep_on_interruptible (struct dasd_ccw_req *cqr)
 
int dasd_sleep_on_immediatly (struct dasd_ccw_req *cqr)
 
int dasd_cancel_req (struct dasd_ccw_req *cqr)
 
void dasd_block_set_timer (struct dasd_block *block, int expires)
 
void dasd_block_clear_timer (struct dasd_block *block)
 
void dasd_schedule_block_bh (struct dasd_block *block)
 
int dasd_device_is_ro (struct dasd_device *device)
 
 EXPORT_SYMBOL_GPL (dasd_device_is_ro)
 
int dasd_generic_probe (struct ccw_device *cdev, struct dasd_discipline *discipline)
 
void dasd_generic_remove (struct ccw_device *cdev)
 
int dasd_generic_set_online (struct ccw_device *cdev, struct dasd_discipline *base_discipline)
 
int dasd_generic_set_offline (struct ccw_device *cdev)
 
int dasd_generic_last_path_gone (struct dasd_device *device)
 
 EXPORT_SYMBOL_GPL (dasd_generic_last_path_gone)
 
int dasd_generic_path_operational (struct dasd_device *device)
 
 EXPORT_SYMBOL_GPL (dasd_generic_path_operational)
 
int dasd_generic_notify (struct ccw_device *cdev, int event)
 
void dasd_generic_path_event (struct ccw_device *cdev, int *path_event)
 
 EXPORT_SYMBOL_GPL (dasd_generic_path_event)
 
int dasd_generic_verify_path (struct dasd_device *device, __u8 lpm)
 
 EXPORT_SYMBOL_GPL (dasd_generic_verify_path)
 
int dasd_generic_pm_freeze (struct ccw_device *cdev)
 
 EXPORT_SYMBOL_GPL (dasd_generic_pm_freeze)
 
int dasd_generic_restore_device (struct ccw_device *cdev)
 
 EXPORT_SYMBOL_GPL (dasd_generic_restore_device)
 
int dasd_generic_read_dev_chars (struct dasd_device *device, int magic, void *rdc_buffer, int rdc_buffer_size)
 
 EXPORT_SYMBOL_GPL (dasd_generic_read_dev_chars)
 
chardasd_get_sense (struct irb *irb)
 
 EXPORT_SYMBOL_GPL (dasd_get_sense)
 
void dasd_generic_shutdown (struct ccw_device *cdev)
 
 EXPORT_SYMBOL_GPL (dasd_generic_shutdown)
 
 module_init (dasd_init)
 
 module_exit (dasd_exit)
 
 EXPORT_SYMBOL (dasd_debug_area)
 
 EXPORT_SYMBOL (dasd_diag_discipline_pointer)
 
 EXPORT_SYMBOL (dasd_add_request_head)
 
 EXPORT_SYMBOL (dasd_add_request_tail)
 
 EXPORT_SYMBOL (dasd_cancel_req)
 
 EXPORT_SYMBOL (dasd_device_clear_timer)
 
 EXPORT_SYMBOL (dasd_block_clear_timer)
 
 EXPORT_SYMBOL (dasd_enable_device)
 
 EXPORT_SYMBOL (dasd_int_handler)
 
 EXPORT_SYMBOL (dasd_kfree_request)
 
 EXPORT_SYMBOL (dasd_kick_device)
 
 EXPORT_SYMBOL (dasd_kmalloc_request)
 
 EXPORT_SYMBOL (dasd_schedule_device_bh)
 
 EXPORT_SYMBOL (dasd_schedule_block_bh)
 
 EXPORT_SYMBOL (dasd_set_target_state)
 
 EXPORT_SYMBOL (dasd_device_set_timer)
 
 EXPORT_SYMBOL (dasd_block_set_timer)
 
 EXPORT_SYMBOL (dasd_sfree_request)
 
 EXPORT_SYMBOL (dasd_sleep_on)
 
 EXPORT_SYMBOL (dasd_sleep_on_immediatly)
 
 EXPORT_SYMBOL (dasd_sleep_on_interruptible)
 
 EXPORT_SYMBOL (dasd_smalloc_request)
 
 EXPORT_SYMBOL (dasd_start_IO)
 
 EXPORT_SYMBOL (dasd_term_IO)
 
 EXPORT_SYMBOL_GPL (dasd_generic_probe)
 
 EXPORT_SYMBOL_GPL (dasd_generic_remove)
 
 EXPORT_SYMBOL_GPL (dasd_generic_notify)
 
 EXPORT_SYMBOL_GPL (dasd_generic_set_online)
 
 EXPORT_SYMBOL_GPL (dasd_generic_set_offline)
 
 EXPORT_SYMBOL_GPL (dasd_generic_handle_state_change)
 
 EXPORT_SYMBOL_GPL (dasd_flush_device_queue)
 
 EXPORT_SYMBOL_GPL (dasd_alloc_block)
 
 EXPORT_SYMBOL_GPL (dasd_free_block)
 

Variables

debug_info_tdasd_debug_area
 
struct dasd_disciplinedasd_diag_discipline_pointer
 
unsigned int dasd_global_profile_level = DASD_PROFILE_OFF
 
struct block_device_operations dasd_device_operations
 

Macro Definition Documentation

#define DASD_CHANQ_MAX_SIZE   4

Definition at line 39 of file dasd.c.

#define dasd_profile_end (   block,
  cqr,
  req 
)    do {} while (0)

Definition at line 1150 of file dasd.c.

#define dasd_profile_start (   block,
  cqr,
  req 
)    do {} while (0)

Definition at line 1149 of file dasd.c.

#define DASD_SLEEPON_END_TAG   (void *) 2

Definition at line 42 of file dasd.c.

#define DASD_SLEEPON_START_TAG   (void *) 1

Definition at line 41 of file dasd.c.

#define KMSG_COMPONENT   "dasd"

Definition at line 10 of file dasd.c.

#define pr_fmt (   fmt)    KMSG_COMPONENT ": " fmt

Definition at line 11 of file dasd.c.

#define PRINTK_HEADER   "dasd:"

Definition at line 33 of file dasd.c.

Function Documentation

void dasd_add_request_head ( struct dasd_ccw_req cqr)

Definition at line 2032 of file dasd.c.

void dasd_add_request_tail ( struct dasd_ccw_req cqr)

Definition at line 2050 of file dasd.c.

struct dasd_block* dasd_alloc_block ( void  )
read

Definition at line 146 of file dasd.c.

struct dasd_device* dasd_alloc_device ( void  )
read

Definition at line 89 of file dasd.c.

void dasd_block_clear_timer ( struct dasd_block block)

Definition at line 2374 of file dasd.c.

void dasd_block_set_timer ( struct dasd_block block,
int  expires 
)

Definition at line 2363 of file dasd.c.

int dasd_cancel_req ( struct dasd_ccw_req cqr)

Definition at line 2305 of file dasd.c.

void dasd_device_clear_timer ( struct dasd_device device)

Definition at line 1531 of file dasd.c.

int dasd_device_is_ro ( struct dasd_device device)

Definition at line 2953 of file dasd.c.

void dasd_device_remove_stop_bits ( struct dasd_device device,
int  bits 
)

Definition at line 2020 of file dasd.c.

void dasd_device_set_stop_bits ( struct dasd_device device,
int  bits 
)

Definition at line 2014 of file dasd.c.

void dasd_device_set_timer ( struct dasd_device device,
int  expires 
)

Definition at line 1520 of file dasd.c.

void dasd_enable_device ( struct dasd_device device)

Definition at line 635 of file dasd.c.

int dasd_flush_device_queue ( struct dasd_device device)

Definition at line 1925 of file dasd.c.

void dasd_free_block ( struct dasd_block block)

Definition at line 174 of file dasd.c.

void dasd_free_device ( struct dasd_device device)

Definition at line 135 of file dasd.c.

void dasd_generic_handle_state_change ( struct dasd_device device)

Definition at line 1577 of file dasd.c.

int dasd_generic_last_path_gone ( struct dasd_device device)

Definition at line 3175 of file dasd.c.

int dasd_generic_notify ( struct ccw_device cdev,
int  event 
)

Definition at line 3219 of file dasd.c.

void dasd_generic_path_event ( struct ccw_device cdev,
int path_event 
)

Definition at line 3247 of file dasd.c.

int dasd_generic_path_operational ( struct dasd_device device)

Definition at line 3201 of file dasd.c.

int dasd_generic_pm_freeze ( struct ccw_device cdev)

Definition at line 3306 of file dasd.c.

int dasd_generic_probe ( struct ccw_device cdev,
struct dasd_discipline discipline 
)

Definition at line 2991 of file dasd.c.

int dasd_generic_read_dev_chars ( struct dasd_device device,
int  magic,
void rdc_buffer,
int  rdc_buffer_size 
)

Definition at line 3441 of file dasd.c.

void dasd_generic_remove ( struct ccw_device cdev)

Definition at line 3020 of file dasd.c.

int dasd_generic_restore_device ( struct ccw_device cdev)

Definition at line 3363 of file dasd.c.

int dasd_generic_set_offline ( struct ccw_device cdev)

Definition at line 3125 of file dasd.c.

int dasd_generic_set_online ( struct ccw_device cdev,
struct dasd_discipline base_discipline 
)

Definition at line 3058 of file dasd.c.

void dasd_generic_shutdown ( struct ccw_device cdev)

Definition at line 3501 of file dasd.c.

enum uc_todo dasd_generic_uc_handler ( struct ccw_device cdev,
struct irb irb 
)

Definition at line 1709 of file dasd.c.

int dasd_generic_verify_path ( struct dasd_device device,
__u8  lpm 
)

Definition at line 3294 of file dasd.c.

char* dasd_get_sense ( struct irb irb)

Definition at line 3464 of file dasd.c.

void dasd_int_handler ( struct ccw_device cdev,
unsigned long  intparm,
struct irb irb 
)

Definition at line 1591 of file dasd.c.

void dasd_kfree_request ( struct dasd_ccw_req cqr,
struct dasd_device device 
)

Definition at line 1274 of file dasd.c.

void dasd_kick_device ( struct dasd_device device)

Definition at line 560 of file dasd.c.

struct dasd_ccw_req* dasd_kmalloc_request ( int  magic,
int  cplength,
int  datasize,
struct dasd_device device 
)
read

Definition at line 1193 of file dasd.c.

int dasd_profile_on ( struct dasd_profile profile)

Definition at line 1179 of file dasd.c.

void dasd_reload_device ( struct dasd_device device)

Definition at line 579 of file dasd.c.

void dasd_restore_device ( struct dasd_device device)

Definition at line 599 of file dasd.c.

void dasd_schedule_block_bh ( struct dasd_block block)

Definition at line 2708 of file dasd.c.

void dasd_schedule_device_bh ( struct dasd_device device)

Definition at line 2005 of file dasd.c.

void dasd_set_target_state ( struct dasd_device device,
int  target 
)

Definition at line 609 of file dasd.c.

void dasd_sfree_request ( struct dasd_ccw_req cqr,
struct dasd_device device 
)

Definition at line 1291 of file dasd.c.

int dasd_sleep_on ( struct dasd_ccw_req cqr)

Definition at line 2213 of file dasd.c.

int dasd_sleep_on_immediatly ( struct dasd_ccw_req cqr)

Definition at line 2252 of file dasd.c.

int dasd_sleep_on_interruptible ( struct dasd_ccw_req cqr)

Definition at line 2222 of file dasd.c.

struct dasd_ccw_req* dasd_smalloc_request ( int  magic,
int  cplength,
int  datasize,
struct dasd_device device 
)
read

Definition at line 1230 of file dasd.c.

int dasd_start_IO ( struct dasd_ccw_req cqr)

Definition at line 1382 of file dasd.c.

int dasd_stats_generic_show ( struct seq_file m,
void v 
)

Definition at line 1162 of file dasd.c.

int dasd_term_IO ( struct dasd_ccw_req cqr)

Definition at line 1328 of file dasd.c.

void dasd_wakeup_cb ( struct dasd_ccw_req cqr,
void data 
)

Definition at line 2067 of file dasd.c.

EXPORT_SYMBOL ( dasd_reload_device  )
EXPORT_SYMBOL ( dasd_debug_area  )
EXPORT_SYMBOL ( dasd_diag_discipline_pointer  )
EXPORT_SYMBOL ( dasd_add_request_head  )
EXPORT_SYMBOL ( dasd_add_request_tail  )
EXPORT_SYMBOL ( dasd_cancel_req  )
EXPORT_SYMBOL ( dasd_device_clear_timer  )
EXPORT_SYMBOL ( dasd_block_clear_timer  )
EXPORT_SYMBOL ( dasd_enable_device  )
EXPORT_SYMBOL ( dasd_int_handler  )
EXPORT_SYMBOL ( dasd_kfree_request  )
EXPORT_SYMBOL ( dasd_kick_device  )
EXPORT_SYMBOL ( dasd_kmalloc_request  )
EXPORT_SYMBOL ( dasd_schedule_device_bh  )
EXPORT_SYMBOL ( dasd_schedule_block_bh  )
EXPORT_SYMBOL ( dasd_set_target_state  )
EXPORT_SYMBOL ( dasd_device_set_timer  )
EXPORT_SYMBOL ( dasd_block_set_timer  )
EXPORT_SYMBOL ( dasd_sfree_request  )
EXPORT_SYMBOL ( dasd_sleep_on  )
EXPORT_SYMBOL ( dasd_sleep_on_immediatly  )
EXPORT_SYMBOL ( dasd_sleep_on_interruptible  )
EXPORT_SYMBOL ( dasd_smalloc_request  )
EXPORT_SYMBOL ( dasd_start_IO  )
EXPORT_SYMBOL ( dasd_term_IO  )
EXPORT_SYMBOL_GPL ( dasd_generic_uc_handler  )
EXPORT_SYMBOL_GPL ( dasd_device_set_stop_bits  )
EXPORT_SYMBOL_GPL ( dasd_device_remove_stop_bits  )
EXPORT_SYMBOL_GPL ( dasd_wakeup_cb  )
EXPORT_SYMBOL_GPL ( dasd_device_is_ro  )
EXPORT_SYMBOL_GPL ( dasd_generic_last_path_gone  )
EXPORT_SYMBOL_GPL ( dasd_generic_path_operational  )
EXPORT_SYMBOL_GPL ( dasd_generic_path_event  )
EXPORT_SYMBOL_GPL ( dasd_generic_verify_path  )
EXPORT_SYMBOL_GPL ( dasd_generic_pm_freeze  )
EXPORT_SYMBOL_GPL ( dasd_generic_restore_device  )
EXPORT_SYMBOL_GPL ( dasd_generic_read_dev_chars  )
EXPORT_SYMBOL_GPL ( dasd_get_sense  )
EXPORT_SYMBOL_GPL ( dasd_generic_shutdown  )
EXPORT_SYMBOL_GPL ( dasd_generic_probe  )
EXPORT_SYMBOL_GPL ( dasd_generic_remove  )
EXPORT_SYMBOL_GPL ( dasd_generic_notify  )
EXPORT_SYMBOL_GPL ( dasd_generic_set_online  )
EXPORT_SYMBOL_GPL ( dasd_generic_set_offline  )
EXPORT_SYMBOL_GPL ( dasd_generic_handle_state_change  )
EXPORT_SYMBOL_GPL ( dasd_flush_device_queue  )
EXPORT_SYMBOL_GPL ( dasd_alloc_block  )
EXPORT_SYMBOL_GPL ( dasd_free_block  )
MODULE_AUTHOR ( "Holger Smolinski <[email protected]>"  )
MODULE_DESCRIPTION ( "Linux on S/390 DASD device  driver,
""Copyright IBM Corp.2000"   
)
module_exit ( dasd_exit  )
module_init ( dasd_init  )
MODULE_LICENSE ( "GPL"  )
MODULE_SUPPORTED_DEVICE ( "dasd"  )

Variable Documentation

debug_info_t* dasd_debug_area

Definition at line 47 of file dasd.c.

struct block_device_operations dasd_device_operations
Initial value:
= {
.owner = THIS_MODULE,
.open = dasd_open,
.release = dasd_release,
.ioctl = dasd_ioctl,
.compat_ioctl = dasd_ioctl,
.getgeo = dasd_getgeo,
}

Definition at line 2911 of file dasd.c.

struct dasd_discipline* dasd_diag_discipline_pointer

Definition at line 49 of file dasd.c.

unsigned int dasd_global_profile_level = DASD_PROFILE_OFF

Definition at line 653 of file dasd.c.