Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
fcx.h File Reference
#include <linux/types.h>

Go to the source code of this file.

Data Structures

struct  tcw
 
struct  tidaw
 
struct  tsa_iostat
 
struct  tsa_ddpc
 
struct  tsa_intrg
 
struct  tsb
 
struct  dcw_intrg_data
 
struct  dcw
 
struct  tccb_tcah
 
struct  tccb_tcat
 
struct  tccb
 

Macros

#define _ASM_S390_FCX_H   _ASM_S390_FCX_H
 
#define TCW_FORMAT_DEFAULT   0
 
#define TCW_TIDAW_FORMAT_DEFAULT   0
 
#define TCW_FLAGS_INPUT_TIDA   1 << (23 - 5)
 
#define TCW_FLAGS_TCCB_TIDA   1 << (23 - 6)
 
#define TCW_FLAGS_OUTPUT_TIDA   1 << (23 - 7)
 
#define TCW_FLAGS_TIDAW_FORMAT(x)   ((x) & 3) << (23 - 9)
 
#define TCW_FLAGS_GET_TIDAW_FORMAT(x)   (((x) >> (23 - 9)) & 3)
 
#define TIDAW_FLAGS_LAST   1 << (7 - 0)
 
#define TIDAW_FLAGS_SKIP   1 << (7 - 1)
 
#define TIDAW_FLAGS_DATA_INT   1 << (7 - 2)
 
#define TIDAW_FLAGS_TTIC   1 << (7 - 3)
 
#define TIDAW_FLAGS_INSERT_CBC   1 << (7 - 4)
 
#define TSA_INTRG_FLAGS_CU_STATE_VALID   1 << (7 - 0)
 
#define TSA_INTRG_FLAGS_DEV_STATE_VALID   1 << (7 - 1)
 
#define TSA_INTRG_FLAGS_OP_STATE_VALID   1 << (7 - 2)
 
#define TSB_FORMAT_NONE   0
 
#define TSB_FORMAT_IOSTAT   1
 
#define TSB_FORMAT_DDPC   2
 
#define TSB_FORMAT_INTRG   3
 
#define TSB_FLAGS_DCW_OFFSET_VALID   1 << (7 - 0)
 
#define TSB_FLAGS_COUNT_VALID   1 << (7 - 1)
 
#define TSB_FLAGS_CACHE_MISS   1 << (7 - 2)
 
#define TSB_FLAGS_TIME_VALID   1 << (7 - 3)
 
#define TSB_FLAGS_FORMAT(x)   ((x) & 7)
 
#define TSB_FORMAT(t)   ((t)->flags & 7)
 
#define DCW_INTRG_FORMAT_DEFAULT   0
 
#define DCW_INTRG_RC_UNSPECIFIED   0
 
#define DCW_INTRG_RC_TIMEOUT   1
 
#define DCW_INTRG_RCQ_UNSPECIFIED   0
 
#define DCW_INTRG_RCQ_PRIMARY   1
 
#define DCW_INTRG_RCQ_SECONDARY   2
 
#define DCW_INTRG_FLAGS_MPM   1 < (7 - 0)
 
#define DCW_INTRG_FLAGS_PPR   1 < (7 - 1)
 
#define DCW_INTRG_FLAGS_CRIT   1 < (7 - 2)
 
#define DCW_FLAGS_CC   1 << (7 - 1)
 
#define DCW_CMD_WRITE   0x01
 
#define DCW_CMD_READ   0x02
 
#define DCW_CMD_CONTROL   0x03
 
#define DCW_CMD_SENSE   0x04
 
#define DCW_CMD_SENSE_ID   0xe4
 
#define DCW_CMD_INTRG   0x40
 
#define TCCB_FORMAT_DEFAULT   0x7f
 
#define TCCB_MAX_DCW   30
 
#define TCCB_MAX_SIZE
 
#define TCCB_SAC_DEFAULT   0x1ffe
 
#define TCCB_SAC_INTRG   0x1fff
 

Functions

struct tcw __attribute__ ((packed, aligned(64)))
 
struct tidaw __attribute__ ((packed, aligned(16)))
 
struct tsa_iostat __attribute__ ((packed))
 
struct tsb __attribute__ ((packed, aligned(8)))
 
struct tcwtcw_get_intrg (struct tcw *tcw)
 
voidtcw_get_data (struct tcw *tcw)
 
struct tccbtcw_get_tccb (struct tcw *tcw)
 
struct tsbtcw_get_tsb (struct tcw *tcw)
 
void tcw_init (struct tcw *tcw, int r, int w)
 
void tcw_finalize (struct tcw *tcw, int num_tidaws)
 
void tcw_set_intrg (struct tcw *tcw, struct tcw *intrg_tcw)
 
void tcw_set_data (struct tcw *tcw, void *data, int use_tidal)
 
void tcw_set_tccb (struct tcw *tcw, struct tccb *tccb)
 
void tcw_set_tsb (struct tcw *tcw, struct tsb *tsb)
 
void tccb_init (struct tccb *tccb, size_t tccb_size, u32 sac)
 
void tsb_init (struct tsb *tsb)
 
struct dcwtccb_add_dcw (struct tccb *tccb, size_t tccb_size, u8 cmd, u8 flags, void *cd, u8 cd_count, u32 count)
 
struct tidawtcw_add_tidaw (struct tcw *tcw, int num_tidaws, u8 flags, void *addr, u32 count)
 

Variables

u32 format
 
u32 __pad0__
 
u32 flags
 
u32 __pad1__
 
u32 tccbl
 
u32 r
 
u32 w
 
u32 __pad2__
 
u64 output
 
u64 input
 
u64 tsb
 
u64 tccb
 
u32 output_count
 
u32 input_count
 
u32 __pad3__
 
u32 __pad4__
 
u32 __pad5__
 
u32 intrg
 
u32 count
 
u64 addr
 
u32 dev_time
 
u32 def_time
 
u32 queue_time
 
u32 dev_busy_time
 
u32 dev_act_time
 
u8 sense [32]
 
u32 rc
 
u8 rcq [16]
 
u32 cu_state
 
u32 dev_state
 
u32 op_state
 
u8 sd_info [12]
 
u32 dl_id
 
u8 dd_data [28]
 
struct tsa_iostat iostat
 
struct tsa_ddpc ddpc
 
u32 length
 
u32 dcw_offset
 
u32 lpm
 
u32 pam
 
u32 pim
 
u32 timeout = IMX2_WDT_DEFAULT_TIME
 
u64 time
 
u64 prog_id
 
u8 prog_data [0]
 
u32 cmd
 
u32 cd_count
 
u8 cd [0]
 
u32 tcal
 
u32 sac
 
u32 prio
 
struct tccb_tcah tcah
 
u8 tca [0]
 

Macro Definition Documentation

#define _ASM_S390_FCX_H   _ASM_S390_FCX_H

Definition at line 9 of file fcx.h.

#define DCW_CMD_CONTROL   0x03

Definition at line 223 of file fcx.h.

#define DCW_CMD_INTRG   0x40

Definition at line 226 of file fcx.h.

#define DCW_CMD_READ   0x02

Definition at line 222 of file fcx.h.

#define DCW_CMD_SENSE   0x04

Definition at line 224 of file fcx.h.

#define DCW_CMD_SENSE_ID   0xe4

Definition at line 225 of file fcx.h.

#define DCW_CMD_WRITE   0x01

Definition at line 221 of file fcx.h.

#define DCW_FLAGS_CC   1 << (7 - 1)

Definition at line 219 of file fcx.h.

#define DCW_INTRG_FLAGS_CRIT   1 < (7 - 2)

Definition at line 184 of file fcx.h.

#define DCW_INTRG_FLAGS_MPM   1 < (7 - 0)

Definition at line 182 of file fcx.h.

#define DCW_INTRG_FLAGS_PPR   1 < (7 - 1)

Definition at line 183 of file fcx.h.

#define DCW_INTRG_FORMAT_DEFAULT   0

Definition at line 173 of file fcx.h.

#define DCW_INTRG_RC_TIMEOUT   1

Definition at line 176 of file fcx.h.

#define DCW_INTRG_RC_UNSPECIFIED   0

Definition at line 175 of file fcx.h.

#define DCW_INTRG_RCQ_PRIMARY   1

Definition at line 179 of file fcx.h.

#define DCW_INTRG_RCQ_SECONDARY   2

Definition at line 180 of file fcx.h.

#define DCW_INTRG_RCQ_UNSPECIFIED   0

Definition at line 178 of file fcx.h.

#define TCCB_FORMAT_DEFAULT   0x7f

Definition at line 246 of file fcx.h.

#define TCCB_MAX_DCW   30

Definition at line 247 of file fcx.h.

#define TCCB_MAX_SIZE
Value:
(sizeof(struct tccb_tcah) + \
TCCB_MAX_DCW * sizeof(struct dcw) + \

Definition at line 248 of file fcx.h.

#define TCCB_SAC_DEFAULT   0x1ffe

Definition at line 251 of file fcx.h.

#define TCCB_SAC_INTRG   0x1fff

Definition at line 252 of file fcx.h.

#define TCW_FLAGS_GET_TIDAW_FORMAT (   x)    (((x) >> (23 - 9)) & 3)

Definition at line 19 of file fcx.h.

#define TCW_FLAGS_INPUT_TIDA   1 << (23 - 5)

Definition at line 15 of file fcx.h.

#define TCW_FLAGS_OUTPUT_TIDA   1 << (23 - 7)

Definition at line 17 of file fcx.h.

#define TCW_FLAGS_TCCB_TIDA   1 << (23 - 6)

Definition at line 16 of file fcx.h.

#define TCW_FLAGS_TIDAW_FORMAT (   x)    ((x) & 3) << (23 - 9)

Definition at line 18 of file fcx.h.

#define TCW_FORMAT_DEFAULT   0

Definition at line 13 of file fcx.h.

#define TCW_TIDAW_FORMAT_DEFAULT   0

Definition at line 14 of file fcx.h.

#define TIDAW_FLAGS_DATA_INT   1 << (7 - 2)

Definition at line 59 of file fcx.h.

#define TIDAW_FLAGS_INSERT_CBC   1 << (7 - 4)

Definition at line 61 of file fcx.h.

#define TIDAW_FLAGS_LAST   1 << (7 - 0)

Definition at line 57 of file fcx.h.

#define TIDAW_FLAGS_SKIP   1 << (7 - 1)

Definition at line 58 of file fcx.h.

#define TIDAW_FLAGS_TTIC   1 << (7 - 3)

Definition at line 60 of file fcx.h.

#define TSA_INTRG_FLAGS_CU_STATE_VALID   1 << (7 - 0)

Definition at line 109 of file fcx.h.

#define TSA_INTRG_FLAGS_DEV_STATE_VALID   1 << (7 - 1)

Definition at line 110 of file fcx.h.

#define TSA_INTRG_FLAGS_OP_STATE_VALID   1 << (7 - 2)

Definition at line 111 of file fcx.h.

#define TSB_FLAGS_CACHE_MISS   1 << (7 - 2)

Definition at line 145 of file fcx.h.

#define TSB_FLAGS_COUNT_VALID   1 << (7 - 1)

Definition at line 144 of file fcx.h.

#define TSB_FLAGS_DCW_OFFSET_VALID   1 << (7 - 0)

Definition at line 143 of file fcx.h.

#define TSB_FLAGS_FORMAT (   x)    ((x) & 7)

Definition at line 147 of file fcx.h.

#define TSB_FLAGS_TIME_VALID   1 << (7 - 3)

Definition at line 146 of file fcx.h.

#define TSB_FORMAT (   t)    ((t)->flags & 7)

Definition at line 148 of file fcx.h.

#define TSB_FORMAT_DDPC   2

Definition at line 140 of file fcx.h.

#define TSB_FORMAT_INTRG   3

Definition at line 141 of file fcx.h.

#define TSB_FORMAT_IOSTAT   1

Definition at line 139 of file fcx.h.

#define TSB_FORMAT_NONE   0

Definition at line 138 of file fcx.h.

Function Documentation

struct tcw __attribute__ ( (packed, aligned(64))  )
struct tidaw __attribute__ ( (packed, aligned(16))  )
struct tsa_iostat __attribute__ ( (packed)  )
read

Definition at line 171 of file esd_usb2.c.

struct tsb __attribute__ ( (packed, aligned(8))  )
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.

Variable Documentation

u32 __pad0__

Definition at line 57 of file fcx.h.

u32 __pad1__

Definition at line 59 of file fcx.h.

u32 __pad2__

Definition at line 63 of file fcx.h.

u32 __pad3__

Definition at line 70 of file fcx.h.

u32 __pad4__

Definition at line 71 of file fcx.h.

u32 __pad5__

Definition at line 72 of file fcx.h.

u64 addr

Definition at line 80 of file fcx.h.

u8 cd[0]

Definition at line 250 of file fcx.h.

u32 cd_count

Definition at line 248 of file fcx.h.

Definition at line 245 of file fcx.h.

u32 count

Definition at line 79 of file fcx.h.

u32 cu_state

Definition at line 139 of file fcx.h.

u32 dcw_offset

Definition at line 174 of file fcx.h.

void * dd_data

Definition at line 145 of file fcx.h.

Definition at line 172 of file fcx.h.

u32 def_time

Definition at line 96 of file fcx.h.

u32 dev_act_time

Definition at line 99 of file fcx.h.

u32 dev_busy_time

Definition at line 98 of file fcx.h.

Definition at line 140 of file fcx.h.

u32 dev_time

Definition at line 95 of file fcx.h.

u32 dl_id

Definition at line 144 of file fcx.h.

u32 flags

Definition at line 58 of file fcx.h.

Definition at line 56 of file fcx.h.

u64 input

Definition at line 65 of file fcx.h.

u32 input_count

Definition at line 69 of file fcx.h.

Definition at line 73 of file fcx.h.

Definition at line 171 of file fcx.h.

u32 length

Definition at line 172 of file fcx.h.

u32 lpm

Definition at line 221 of file fcx.h.

u32 op_state

Definition at line 141 of file fcx.h.

u64 output

Definition at line 64 of file fcx.h.

u32 output_count

Definition at line 68 of file fcx.h.

u32 pam

Definition at line 222 of file fcx.h.

u32 pim

Definition at line 223 of file fcx.h.

u32 prio

Definition at line 277 of file fcx.h.

u8 prog_data[0]

Definition at line 230 of file fcx.h.

Definition at line 229 of file fcx.h.

u32 queue_time

Definition at line 97 of file fcx.h.

u32 r

Definition at line 61 of file fcx.h.

Definition at line 109 of file fcx.h.

u32 rcq

Definition at line 110 of file fcx.h.

u32 sac

Definition at line 275 of file fcx.h.

u8 sd_info[12]

Definition at line 143 of file fcx.h.

u8 sense

Definition at line 100 of file fcx.h.

u8 tca[0]

Definition at line 291 of file fcx.h.

Definition at line 290 of file fcx.h.

u32 tcal

Definition at line 274 of file fcx.h.

Definition at line 67 of file fcx.h.

u32 tccbl

Definition at line 60 of file fcx.h.

u64 time

Definition at line 228 of file fcx.h.

Definition at line 224 of file fcx.h.

Definition at line 66 of file fcx.h.

u32 w

Definition at line 62 of file fcx.h.