Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions
chp.c File Reference
#include <linux/bug.h>
#include <linux/workqueue.h>
#include <linux/spinlock.h>
#include <linux/export.h>
#include <linux/sched.h>
#include <linux/init.h>
#include <linux/jiffies.h>
#include <linux/wait.h>
#include <linux/mutex.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <asm/chpid.h>
#include <asm/sclp.h>
#include <asm/crw.h>
#include "cio.h"
#include "css.h"
#include "ioasm.h"
#include "cio_debug.h"
#include "chp.h"

Go to the source code of this file.

Macros

#define to_channelpath(device)   container_of(device, struct channel_path, dev)
 
#define CHP_INFO_UPDATE_INTERVAL   1*HZ
 

Enumerations

enum  cfg_task_t { cfg_none, cfg_configure, cfg_deconfigure }
 

Functions

int chp_get_status (struct chp_id chpid)
 
u8 chp_get_sch_opm (struct subchannel *sch)
 
 EXPORT_SYMBOL_GPL (chp_get_sch_opm)
 
int chp_is_registered (struct chp_id chpid)
 
void chp_remove_cmg_attr (struct channel_path *chp)
 
int chp_add_cmg_attr (struct channel_path *chp)
 
int chp_new (struct chp_id chpid)
 
voidchp_get_chp_desc (struct chp_id chpid)
 
int chp_ssd_get_mask (struct chsc_ssd_info *ssd, struct chp_link *link)
 
 EXPORT_SYMBOL_GPL (chp_ssd_get_mask)
 
int chp_info_get_status (struct chp_id chpid)
 
void chp_cfg_schedule (struct chp_id chpid, int configure)
 
void chp_cfg_cancel_deconfigure (struct chp_id chpid)
 
 subsys_initcall (chp_init)
 

Macro Definition Documentation

#define CHP_INFO_UPDATE_INTERVAL   1*HZ

Definition at line 30 of file chp.c.

#define to_channelpath (   device)    container_of(device, struct channel_path, dev)

Definition at line 29 of file chp.c.

Enumeration Type Documentation

enum cfg_task_t
Enumerator:
cfg_none 
cfg_configure 
cfg_deconfigure 

Definition at line 32 of file chp.c.

Function Documentation

int chp_add_cmg_attr ( struct channel_path chp)

Definition at line 218 of file chp.c.

void chp_cfg_cancel_deconfigure ( struct chp_id  chpid)

chp_cfg_cancel_deconfigure - cancel chpid deconfiguration request - channel-path ID

Cancel an active channel-path deconfiguration request if it has not yet been performed.

Definition at line 694 of file chp.c.

void chp_cfg_schedule ( struct chp_id  chpid,
int  configure 
)

chp_cfg_schedule - schedule chpid configuration request - channel-path ID - Non-zero for configure, zero for deconfigure

Schedule a channel-path configuration/deconfiguration request.

Definition at line 676 of file chp.c.

void* chp_get_chp_desc ( struct chp_id  chpid)

chp_get_chp_desc - return newly allocated channel-path description : channel-path ID

On success return a newly allocated copy of the channel-path description data associated with the given channel-path ID. Return NULL on error.

Definition at line 456 of file chp.c.

u8 chp_get_sch_opm ( struct subchannel sch)

chp_get_sch_opm - return opm for subchannel : subchannel

Calculate and return the operational path mask (opm) based on the chpids used by the subchannel and the status of the associated channel-paths.

Definition at line 77 of file chp.c.

int chp_get_status ( struct chp_id  chpid)

Definition at line 65 of file chp.c.

int chp_info_get_status ( struct chp_id  chpid)

chp_info_get_status - retrieve configure status of a channel-path : channel-path ID

On success, return 0 for standby, 1 for configured, 2 for reserved, 3 for not recognized. Return negative error code on error.

Definition at line 581 of file chp.c.

int chp_is_registered ( struct chp_id  chpid)

chp_is_registered - check if a channel-path is registered : channel-path ID

Return non-zero if a channel-path with the given chpid is registered, zero otherwise.

Definition at line 102 of file chp.c.

int chp_new ( struct chp_id  chpid)

chp_new - register a new channel-path - channel-path ID

Create and register data structure representing new channel-path. Return zero on success, non-zero otherwise.

Definition at line 386 of file chp.c.

void chp_remove_cmg_attr ( struct channel_path chp)

Definition at line 212 of file chp.c.

int chp_ssd_get_mask ( struct chsc_ssd_info ssd,
struct chp_link link 
)

Definition at line 524 of file chp.c.

EXPORT_SYMBOL_GPL ( chp_get_sch_opm  )
EXPORT_SYMBOL_GPL ( chp_ssd_get_mask  )
subsys_initcall ( chp_init  )