Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
device.c File Reference
#include <linux/module.h>
#include <linux/i2o.h>
#include <linux/delay.h>
#include <linux/string.h>
#include <linux/slab.h>
#include "core.h"

Go to the source code of this file.

Functions

int i2o_device_claim (struct i2o_device *dev)
 
int i2o_device_claim_release (struct i2o_device *dev)
 
void i2o_device_remove (struct i2o_device *i2o_dev)
 
int i2o_device_parse_lct (struct i2o_controller *c)
 
int i2o_parm_issue (struct i2o_device *i2o_dev, int cmd, void *oplist, int oplen, void *reslist, int reslen)
 
int i2o_parm_field_get (struct i2o_device *i2o_dev, int group, int field, void *buf, int buflen)
 
int i2o_parm_table_get (struct i2o_device *dev, int oper, int group, int fieldcount, void *ibuf, int ibuflen, void *resblk, int reslen)
 
 EXPORT_SYMBOL (i2o_device_claim)
 
 EXPORT_SYMBOL (i2o_device_claim_release)
 
 EXPORT_SYMBOL (i2o_parm_field_get)
 
 EXPORT_SYMBOL (i2o_parm_table_get)
 
 EXPORT_SYMBOL (i2o_parm_issue)
 

Variables

struct device_attribute i2o_device_attrs []
 

Function Documentation

EXPORT_SYMBOL ( i2o_device_claim  )
EXPORT_SYMBOL ( i2o_device_claim_release  )
EXPORT_SYMBOL ( i2o_parm_field_get  )
EXPORT_SYMBOL ( i2o_parm_table_get  )
EXPORT_SYMBOL ( i2o_parm_issue  )
int i2o_device_claim ( struct i2o_device dev)

i2o_device_claim - claim a device for use by an OSM : I2O device to claim

Do the leg work to assign a device to a given OSM. If the claim succeeds, the owner is the primary. If the attempt fails a negative errno code is returned. On success zero is returned.

Definition at line 60 of file device.c.

int i2o_device_claim_release ( struct i2o_device dev)

i2o_device_claim_release - release a device that the OSM is using : device to release

Drop a claim by an OSM on a given I2O device.

AC - some devices seem to want to refuse an unclaim until they have finished internal processing. It makes sense since you don't want a new device to go reconfiguring the entire system until you are done. Thus we are prepared to wait briefly.

Returns 0 on success or negative error code on failure.

Definition at line 92 of file device.c.

int i2o_device_parse_lct ( struct i2o_controller c)

i2o_device_parse_lct - Parse a previously fetched LCT and create devices : I2O controller from which the LCT should be parsed.

The Logical Configuration Table tells us what we can talk to on the board. For every entry we create an I2O device, which is registered in the I2O core.

Returns 0 on success or negative error code on failure.

Definition at line 348 of file device.c.

void i2o_device_remove ( struct i2o_device i2o_dev)

i2o_device_remove - remove an I2O device from the I2O core : I2O device which should be released

Is used on I2O controller removal or LCT modification, when the device is removed from the system. Note that the device could still hang around until the refcount reaches 0.

Definition at line 317 of file device.c.

int i2o_parm_field_get ( struct i2o_device i2o_dev,
int  group,
int  field,
void buf,
int  buflen 
)

Definition at line 506 of file device.c.

int i2o_parm_issue ( struct i2o_device i2o_dev,
int  cmd,
void oplist,
int  oplen,
void reslist,
int  reslen 
)

Definition at line 456 of file device.c.

int i2o_parm_table_get ( struct i2o_device dev,
int  oper,
int  group,
int  fieldcount,
void ibuf,
int  ibuflen,
void resblk,
int  reslen 
)

Definition at line 546 of file device.c.

Variable Documentation

struct device_attribute i2o_device_attrs[]
Initial value:
= {
__ATTR(class_id, S_IRUGO, i2o_device_show_class_id, NULL),
__ATTR(tid, S_IRUGO, i2o_device_show_tid, NULL),
}

Definition at line 176 of file device.c.