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

Go to the source code of this file.

Macros

#define OSM_NAME   "i2o"
 
#define OSM_VERSION   "1.325"
 
#define OSM_DESCRIPTION   "I2O subsystem"
 

Functions

 LIST_HEAD (i2o_controllers)
 
struct i2o_messagei2o_msg_get_wait (struct i2o_controller *c, int wait)
 
struct i2o_controlleri2o_find_iop (int unit)
 
struct i2o_devicei2o_iop_find_device (struct i2o_controller *c, u16 tid)
 
void i2o_iop_remove (struct i2o_controller *c)
 
int i2o_status_get (struct i2o_controller *c)
 
struct i2o_controlleri2o_iop_alloc (void)
 
int i2o_iop_add (struct i2o_controller *c)
 
int i2o_event_register (struct i2o_device *dev, struct i2o_driver *drv, int tcntxt, u32 evt_mask)
 
 module_init (i2o_iop_init)
 
 module_exit (i2o_iop_exit)
 
 MODULE_AUTHOR ("Red Hat Software")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_DESCRIPTION (OSM_DESCRIPTION)
 
 MODULE_VERSION (OSM_VERSION)
 
 EXPORT_SYMBOL (i2o_msg_get_wait)
 
 EXPORT_SYMBOL (i2o_find_iop)
 
 EXPORT_SYMBOL (i2o_iop_find_device)
 
 EXPORT_SYMBOL (i2o_event_register)
 
 EXPORT_SYMBOL (i2o_status_get)
 
 EXPORT_SYMBOL (i2o_controllers)
 

Macro Definition Documentation

#define OSM_DESCRIPTION   "I2O subsystem"

Definition at line 37 of file iop.c.

#define OSM_NAME   "i2o"

Definition at line 35 of file iop.c.

#define OSM_VERSION   "1.325"

Definition at line 36 of file iop.c.

Function Documentation

EXPORT_SYMBOL ( i2o_msg_get_wait  )
EXPORT_SYMBOL ( i2o_find_iop  )
EXPORT_SYMBOL ( i2o_iop_find_device  )
EXPORT_SYMBOL ( i2o_event_register  )
EXPORT_SYMBOL ( i2o_status_get  )
EXPORT_SYMBOL ( i2o_controllers  )
int i2o_event_register ( struct i2o_device dev,
struct i2o_driver drv,
int  tcntxt,
u32  evt_mask 
)

i2o_event_register - Turn on/off event notification for a I2O device : I2O device which should receive the event registration request : driver which want to get notified : transaction context to use with this notifier : mask of events

Create and posts an event registration message to the task. No reply is waited for, or expected. If you do not want further notifications, call the i2o_event_register again with a evt_mask of 0.

Returns 0 on success or negative error code on failure.

Definition at line 1159 of file iop.c.

struct i2o_controller* i2o_find_iop ( int  unit)
read

i2o_iop_find - Find an I2O controller by id : unit number of the I2O controller to search for

Lookup the I2O controller on the controller list.

Returns pointer to the I2O controller on success or NULL if not found.

Definition at line 238 of file iop.c.

int i2o_iop_add ( struct i2o_controller c)

i2o_iop_add - Initialize the I2O controller and add him to the I2O core : controller

Initialize the I2O controller and if no error occurs add him to the I2O core.

Returns 0 on success or negative error code on failure.

Definition at line 1096 of file iop.c.

struct i2o_controller* i2o_iop_alloc ( void  )
read

i2o_iop_alloc - Allocate and initialize a i2o_controller struct

Allocate the necessary memory for a i2o_controller struct and initialize the lists and message mempool.

Returns a pointer to the I2O controller or a negative error code on failure.

Definition at line 1044 of file iop.c.

struct i2o_device* i2o_iop_find_device ( struct i2o_controller c,
u16  tid 
)
read

i2o_iop_find_device - Find a I2O device on an I2O controller : I2O controller where the I2O device hangs on : TID of the I2O device to search for

Searches the devices of the I2O controller for a device with TID tid and returns it.

Returns a pointer to the I2O device if found, otherwise NULL.

Definition at line 260 of file iop.c.

void i2o_iop_remove ( struct i2o_controller c)

i2o_iop_remove - Remove the I2O controller from the I2O core : I2O controller

Remove the I2O controller from the I2O core. If devices are attached to the controller remove these also and finally reset the controller.

Definition at line 792 of file iop.c.

struct i2o_message* i2o_msg_get_wait ( struct i2o_controller c,
int  wait 
)
read

i2o_msg_get_wait - obtain an I2O message from the IOP : I2O controller : how long to wait until timeout

This function waits up to wait seconds for a message slot to be available.

On a success the message is returned and the pointer to the message is set in msg. The returned message is the physical page frame offset address from the read port (see the i2o spec). If no message is available returns I2O_QUEUE_EMPTY and msg is leaved untouched.

Definition at line 63 of file iop.c.

int i2o_status_get ( struct i2o_controller c)

i2o_status_get - Get the status block from the I2O controller : I2O controller

Issue a status query on the controller. This updates the attached status block. The status block could then be accessed through c->status_block.

Returns 0 on success or negative error code on failure.

Definition at line 921 of file iop.c.

LIST_HEAD ( i2o_controllers  )
MODULE_AUTHOR ( "Red Hat Software"  )
MODULE_DESCRIPTION ( OSM_DESCRIPTION  )
module_exit ( i2o_iop_exit  )
module_init ( i2o_iop_init  )
MODULE_LICENSE ( "GPL"  )
MODULE_VERSION ( OSM_VERSION  )