Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
fcx.c File Reference
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/module.h>
#include <asm/fcx.h>
#include "cio.h"

Go to the source code of this file.

Functions

struct tcwtcw_get_intrg (struct tcw *tcw)
 
 EXPORT_SYMBOL (tcw_get_intrg)
 
voidtcw_get_data (struct tcw *tcw)
 
 EXPORT_SYMBOL (tcw_get_data)
 
struct tccbtcw_get_tccb (struct tcw *tcw)
 
 EXPORT_SYMBOL (tcw_get_tccb)
 
struct tsbtcw_get_tsb (struct tcw *tcw)
 
 EXPORT_SYMBOL (tcw_get_tsb)
 
void tcw_init (struct tcw *tcw, int r, int w)
 
 EXPORT_SYMBOL (tcw_init)
 
void tcw_finalize (struct tcw *tcw, int num_tidaws)
 
 EXPORT_SYMBOL (tcw_finalize)
 
void tcw_set_intrg (struct tcw *tcw, struct tcw *intrg_tcw)
 
 EXPORT_SYMBOL (tcw_set_intrg)
 
void tcw_set_data (struct tcw *tcw, void *data, int use_tidal)
 
 EXPORT_SYMBOL (tcw_set_data)
 
void tcw_set_tccb (struct tcw *tcw, struct tccb *tccb)
 
 EXPORT_SYMBOL (tcw_set_tccb)
 
void tcw_set_tsb (struct tcw *tcw, struct tsb *tsb)
 
 EXPORT_SYMBOL (tcw_set_tsb)
 
void tccb_init (struct tccb *tccb, size_t size, u32 sac)
 
 EXPORT_SYMBOL (tccb_init)
 
void tsb_init (struct tsb *tsb)
 
 EXPORT_SYMBOL (tsb_init)
 
struct dcwtccb_add_dcw (struct tccb *tccb, size_t tccb_size, u8 cmd, u8 flags, void *cd, u8 cd_count, u32 count)
 
 EXPORT_SYMBOL (tccb_add_dcw)
 
struct tidawtcw_add_tidaw (struct tcw *tcw, int num_tidaws, u8 flags, void *addr, u32 count)
 
 EXPORT_SYMBOL (tcw_add_tidaw)
 

Function Documentation

EXPORT_SYMBOL ( tcw_get_intrg  )
EXPORT_SYMBOL ( tcw_get_data  )
EXPORT_SYMBOL ( tcw_get_tccb  )
EXPORT_SYMBOL ( tcw_get_tsb  )
EXPORT_SYMBOL ( tcw_init  )
EXPORT_SYMBOL ( tcw_finalize  )
EXPORT_SYMBOL ( tcw_set_intrg  )
EXPORT_SYMBOL ( tcw_set_data  )
EXPORT_SYMBOL ( tcw_set_tccb  )
EXPORT_SYMBOL ( tcw_set_tsb  )
EXPORT_SYMBOL ( tccb_init  )
EXPORT_SYMBOL ( tsb_init  )
EXPORT_SYMBOL ( tccb_add_dcw  )
EXPORT_SYMBOL ( tcw_add_tidaw  )
struct dcw* tccb_add_dcw ( struct tccb tccb,
size_t  tccb_size,
u8  cmd,
u8  flags,
void cd,
u8  cd_count,
u32  count 
)
read

tccb_add_dcw - add a dcw to the tccb : the tccb address : the maximum tccb size : the dcw command : flags for the dcw : pointer to control data for this dcw or NULL if none is required : number of control data bytes for this dcw : number of data bytes for this dcw

Add a new dcw to the specified tccb by writing the dcw information specified by , , , and to the tca of the tccb. Return a pointer to the newly added dcw on success or -ENOSPC if the new dcw would exceed the available space as defined by .

Note: the tcal field of the tccb header will be updates to reflect added content.

Definition at line 294 of file fcx.c.

void tccb_init ( struct tccb tccb,
size_t  size,
u32  sac 
)

tccb_init - initialize tccb : the tccb address : the maximum size of the tccb : the service-action-code to be user

Initialize the header of the specified tccb by resetting all values to zero and filling in defaults for format, sac and initial tcal fields.

Definition at line 255 of file fcx.c.

struct tidaw* tcw_add_tidaw ( struct tcw tcw,
int  num_tidaws,
u8  flags,
void addr,
u32  count 
)
read

tcw_add_tidaw - add a tidaw to a tcw : the tcw address : the current number of tidaws : flags for the new tidaw : address value for the new tidaw : count value for the new tidaw

Add a new tidaw to the input/output data tidaw-list of the specified tcw (depending on the value of the r-flag and w-flag) and return a pointer to the new tidaw.

Note: the tidaw-list is assumed to be contiguous with no ttics. The caller must ensure that there is enough space for the new tidaw. The last-tidaw flag for the last tidaw in the list will be set by tcw_finalize.

Definition at line 337 of file fcx.c.

void tcw_finalize ( struct tcw tcw,
int  num_tidaws 
)

tcw_finalize - finalize tcw length fields and tidaw list : pointer to the tcw : the number of tidaws used to address input/output data or zero if no tida is used

Calculate the input-/output-count and tccbl field in the tcw, add a tcat the tccb and terminate the data tidaw list if used.

Note: in case input- or output-tida is used, the tidaw-list must be stored in contiguous storage (no ttic). The tcal field in the tccb must be up-to-date.

Definition at line 152 of file fcx.c.

void* tcw_get_data ( struct tcw tcw)

tcw_get_data - return pointer to input/output data associated with tcw : pointer to the tcw

Return the input or output data address specified in the tcw depending on whether the r-bit or the w-bit is set. If neither bit is set, return NULL.

Definition at line 38 of file fcx.c.

struct tcw* tcw_get_intrg ( struct tcw tcw)
read

tcw_get_intrg - return pointer to associated interrogate tcw : pointer to the original tcw

Return a pointer to the interrogate tcw associated with the specified tcw or NULL if there is no associated interrogate tcw.

Definition at line 24 of file fcx.c.

struct tccb* tcw_get_tccb ( struct tcw tcw)
read

tcw_get_tccb - return pointer to tccb associated with tcw : pointer to the tcw

Return pointer to the tccb associated with this tcw.

Definition at line 54 of file fcx.c.

struct tsb* tcw_get_tsb ( struct tcw tcw)
read

tcw_get_tsb - return pointer to tsb associated with tcw : pointer to the tcw

Return pointer to the tsb associated with this tcw.

Definition at line 66 of file fcx.c.

void tcw_init ( struct tcw tcw,
int  r,
int  w 
)

tcw_init - initialize tcw data structure : pointer to the tcw to be initialized : initial value of the r-bit : initial value of the w-bit

Initialize all fields of the specified tcw data structure with zero and fill in the format, flags, r and w fields.

Definition at line 81 of file fcx.c.

void tcw_set_data ( struct tcw tcw,
void data,
int  use_tidal 
)

tcw_set_data - set data address and tida flag of a tcw : the tcw address : the data address : zero of the data address specifies a contiguous block of data, non-zero if it specifies a list if tidaws.

Set the input/output data address of a tcw (depending on the value of the r-flag and w-flag). If is non-zero, the corresponding tida flag is set as well.

Definition at line 206 of file fcx.c.

void tcw_set_intrg ( struct tcw tcw,
struct tcw intrg_tcw 
)

tcw_set_intrg - set the interrogate tcw address of a tcw : the tcw address : the address of the interrogate tcw

Set the address of the interrogate tcw in the specified tcw.

Definition at line 189 of file fcx.c.

void tcw_set_tccb ( struct tcw tcw,
struct tccb tccb 
)

tcw_set_tccb - set tccb address of a tcw : the tcw address : the tccb address

Set the address of the tccb in the specified tcw.

Definition at line 227 of file fcx.c.

void tcw_set_tsb ( struct tcw tcw,
struct tsb tsb 
)

tcw_set_tsb - set tsb address of a tcw : the tcw address : the tsb address

Set the address of the tsb in the specified tcw.

Definition at line 240 of file fcx.c.

void tsb_init ( struct tsb tsb)

tsb_init - initialize tsb : the tsb address

Initialize the specified tsb by resetting all values to zero.

Definition at line 270 of file fcx.c.