Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions | Variables
device.c File Reference
#include <linux/module.h>
#include <linux/init.h>
#include <linux/spinlock.h>
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/list.h>
#include <linux/device.h>
#include <linux/workqueue.h>
#include <linux/timer.h>
#include <linux/kernel_stat.h>
#include <asm/ccwdev.h>
#include <asm/cio.h>
#include <asm/param.h>
#include <asm/cmb.h>
#include <asm/isc.h>
#include "chp.h"
#include "cio.h"
#include "cio_debug.h"
#include "css.h"
#include "device.h"
#include "ioasm.h"
#include "io_sch.h"
#include "blacklist.h"
#include "chsc.h"

Go to the source code of this file.

Macros

#define KMSG_COMPONENT   "cio"
 
#define pr_fmt(fmt)   KMSG_COMPONENT ": " fmt
 

Enumerations

enum  io_sch_action {
  IO_SCH_UNREG, IO_SCH_ORPH_UNREG, IO_SCH_ATTACH, IO_SCH_UNREG_ATTACH,
  IO_SCH_ORPH_ATTACH, IO_SCH_REPROBE, IO_SCH_VERIFY, IO_SCH_DISC,
  IO_SCH_NOP
}
 

Functions

 MODULE_DEVICE_TABLE (css, io_subchannel_ids)
 
int __init io_subchannel_init (void)
 
int ccw_device_is_orphan (struct ccw_device *cdev)
 
int ccw_device_set_offline (struct ccw_device *cdev)
 
int ccw_device_set_online (struct ccw_device *cdev)
 
struct ccw_deviceget_ccwdev_by_dev_id (struct ccw_dev_id *dev_id)
 
 EXPORT_SYMBOL_GPL (get_ccwdev_by_dev_id)
 
void io_subchannel_recog_done (struct ccw_device *cdev)
 
void io_subchannel_init_config (struct subchannel *sch)
 
int ccw_purge_blacklisted (void)
 
void ccw_device_set_disconnected (struct ccw_device *cdev)
 
void ccw_device_set_notoper (struct ccw_device *cdev)
 
struct ccw_deviceget_ccwdev_by_busid (struct ccw_driver *cdrv, const char *bus_id)
 
int ccw_driver_register (struct ccw_driver *cdriver)
 
void ccw_driver_unregister (struct ccw_driver *cdriver)
 
struct subchannel_id ccw_device_get_subchannel_id (struct ccw_device *cdev)
 
void ccw_device_sched_todo (struct ccw_device *cdev, enum cdev_todo todo)
 
int ccw_device_siosl (struct ccw_device *cdev)
 
 EXPORT_SYMBOL_GPL (ccw_device_siosl)
 
 MODULE_LICENSE ("GPL")
 
 EXPORT_SYMBOL (ccw_device_set_online)
 
 EXPORT_SYMBOL (ccw_device_set_offline)
 
 EXPORT_SYMBOL (ccw_driver_register)
 
 EXPORT_SYMBOL (ccw_driver_unregister)
 
 EXPORT_SYMBOL (get_ccwdev_by_busid)
 
 EXPORT_SYMBOL_GPL (ccw_device_get_subchannel_id)
 

Variables

wait_queue_head_t ccw_device_init_wq
 
atomic_t ccw_device_init_count
 
enum io_sch_action __attribute__
 

Macro Definition Documentation

#define KMSG_COMPONENT   "cio"

Definition at line 10 of file device.c.

#define pr_fmt (   fmt)    KMSG_COMPONENT ": " fmt

Definition at line 11 of file device.c.

Enumeration Type Documentation

Enumerator:
IO_SCH_UNREG 
IO_SCH_ORPH_UNREG 
IO_SCH_ATTACH 
IO_SCH_UNREG_ATTACH 
IO_SCH_ORPH_ATTACH 
IO_SCH_REPROBE 
IO_SCH_VERIFY 
IO_SCH_DISC 
IO_SCH_NOP 

Definition at line 1387 of file device.c.

Function Documentation

struct subchannel_id ccw_device_get_subchannel_id ( struct ccw_device cdev)
read

Definition at line 2041 of file device.c.

int ccw_device_is_orphan ( struct ccw_device cdev)

Definition at line 292 of file device.c.

void ccw_device_sched_todo ( struct ccw_device cdev,
enum cdev_todo  todo 
)

ccw_device_sched_todo - schedule ccw device operation : ccw device

Todo:
: todo

Schedule the operation identified by

Todo:
to be performed on the slow path workqueue. Do nothing if another operation with higher priority is already scheduled. Needs to be called with ccwdev lock held.

Definition at line 2103 of file device.c.

void ccw_device_set_disconnected ( struct ccw_device cdev)

Definition at line 1365 of file device.c.

void ccw_device_set_notoper ( struct ccw_device cdev)

Definition at line 1376 of file device.c.

int ccw_device_set_offline ( struct ccw_device cdev)

ccw_device_set_offline() - disable a ccw device for I/O : target ccw device

This function calls the driver's set_offline() function for , if given, and then disables . Returns: %0 on success and a negative error value on failure. Context: enabled, ccw device lock not held

Definition at line 323 of file device.c.

int ccw_device_set_online ( struct ccw_device cdev)

ccw_device_set_online() - enable a ccw device for I/O : target ccw device

This function first enables and then calls the driver's set_online() function for , if given. If set_online() returns an error, is disabled again. Returns: %0 on success and a negative error value on failure. Context: enabled, ccw device lock not held

Definition at line 400 of file device.c.

int ccw_device_siosl ( struct ccw_device cdev)

ccw_device_siosl() - initiate logging : ccw device

This function is used to invoke model-dependent logging within the channel subsystem.

Definition at line 2127 of file device.c.

int ccw_driver_register ( struct ccw_driver cdriver)

ccw_driver_register() - register a ccw driver : driver to be registered

This function is mainly a wrapper around driver_register(). Returns: %0 on success and a negative error value on failure.

Definition at line 2019 of file device.c.

void ccw_driver_unregister ( struct ccw_driver cdriver)

ccw_driver_unregister() - deregister a ccw driver : driver to be deregistered

This function is mainly a wrapper around driver_unregister().

Definition at line 2034 of file device.c.

int ccw_purge_blacklisted ( void  )

ccw_purge_blacklisted - purge unused, blacklisted devices

Unregister all ccw devices that are offline and on the blacklist.

Definition at line 1358 of file device.c.

EXPORT_SYMBOL ( ccw_device_set_online  )
EXPORT_SYMBOL ( ccw_device_set_offline  )
EXPORT_SYMBOL ( ccw_driver_register  )
EXPORT_SYMBOL ( ccw_driver_unregister  )
EXPORT_SYMBOL ( get_ccwdev_by_busid  )
EXPORT_SYMBOL_GPL ( get_ccwdev_by_dev_id  )
EXPORT_SYMBOL_GPL ( ccw_device_siosl  )
EXPORT_SYMBOL_GPL ( ccw_device_get_subchannel_id  )
struct ccw_device* get_ccwdev_by_busid ( struct ccw_driver cdrv,
const char bus_id 
)
read

get_ccwdev_by_busid() - obtain device from a bus id : driver the device is owned by : bus id of the device to be searched

This function searches all devices owned by for a device with a bus id matching . Returns: If a match is found, its reference count of the found device is increased and it is returned; else NULL is returned.

Definition at line 1684 of file device.c.

struct ccw_device* get_ccwdev_by_dev_id ( struct ccw_dev_id dev_id)
read

get_ccwdev_by_dev_id() - obtain device from a ccw device id : id of the device to be searched

This function searches all devices attached to the ccw bus for a device matching . Returns: If a device is found its reference count is increased and returned; else NULL is returned.

Definition at line 707 of file device.c.

int __init io_subchannel_init ( void  )

Definition at line 190 of file device.c.

void io_subchannel_init_config ( struct subchannel sch)

Definition at line 1029 of file device.c.

void io_subchannel_recog_done ( struct ccw_device cdev)

Definition at line 891 of file device.c.

MODULE_DEVICE_TABLE ( css  ,
io_subchannel_ids   
)
MODULE_LICENSE ( "GPL"  )

Variable Documentation

atomic_t ccw_device_init_count

Definition at line 141 of file device.c.

wait_queue_head_t ccw_device_init_wq

Definition at line 140 of file device.c.