Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
hcf.c File Reference
#include "hcf.h"
#include "hcfdef.h"
#include "mmd.h"
#include <linux/bug.h>
#include <linux/kernel.h>

Go to the source code of this file.

Macros

#define offsetof(s, m)   ((unsigned int)&(((s *)0)->m))
 
#define IN_PORT_WORD(port)   in_port_word( (hcf_io)(port) )
 
#define OUT_PORT_WORD(port, value)   out_port_word( (hcf_io)(port), (hcf_16)(value) )
 
#define xxxx_PRI_IDENTITY_OFFSET   (ARRAY_SIZE(xxxx) - 3)
 
#define P   ((CFG_REG_MB_STRCT FAR *)ltvp)
 

Functions

HCF_STATIC int cmd_exe (IFBP ifbp, hcf_16 cmd_code, hcf_16 par_0)
 
HCF_STATIC int init (IFBP ifbp)
 
HCF_STATIC int put_info (IFBP ifbp, LTVP ltvp)
 
HCF_STATIC int put_info_mb (IFBP ifbp, CFG_MB_INFO_STRCT FAR *ltvp)
 
HCF_STATIC void calibrate (IFBP ifbp)
 
HCF_STATIC int cmd_cmpl (IFBP ifbp)
 
HCF_STATIC hcf_16 get_fid (IFBP ifbp)
 
HCF_STATIC void isr_info (IFBP ifbp)
 
HCF_STATIC void get_frag (IFBP ifbp, wci_bufp bufp, int len BE_PAR(int word_len))
 
HCF_STATIC void put_frag (IFBP ifbp, wci_bufp bufp, int len BE_PAR(int word_len))
 
HCF_STATIC void put_frag_finalize (IFBP ifbp)
 
HCF_STATIC int setup_bap (IFBP ifbp, hcf_16 fid, int offset, int type)
 
HCF_STATIC int download (IFBP ifbp, CFG_PROG_STRCT FAR *ltvp)
 
HCF_STATIC hcf_8 hcf_encap (wci_bufp type)
 
void IN_PORT_STRING_32 (hcf_io prt, hcf_32 FAR *dst, int n)
 
void IN_PORT_STRING_8_16 (hcf_io prt, hcf_8 FAR *dst, int n)
 
void OUT_PORT_STRING_32 (hcf_io prt, hcf_32 FAR *src, int n)
 
void OUT_PORT_STRING_8_16 (hcf_io prt, hcf_8 FAR *src, int n)
 
int hcf_action (IFBP ifbp, hcf_16 action)
 
int hcf_cntl (IFBP ifbp, hcf_16 cmd)
 
int hcf_connect (IFBP ifbp, hcf_io io_base)
 
int hcf_get_info (IFBP ifbp, LTVP ltvp)
 
int hcf_put_info (IFBP ifbp, LTVP ltvp)
 
int hcf_rcv_msg (IFBP ifbp, DESC_STRCT *descp, unsigned int offset)
 
int hcf_send_msg (IFBP ifbp, DESC_STRCT *descp, hcf_16 tx_cntl)
 
int hcf_service_nic (IFBP ifbp, wci_bufp bufp, unsigned int len)
 

Variables

HCF_STATIC hcf_8 null_addr [4] = { 0, 0, 0, 0 }
 
FILE * log_file
 
HCF_STATIC hcf_8 BASED snap_header []
 
HCF_STATIC LTV_STRCT BASED cfg_null = { 1, CFG_NULL, {0} }
 
HCF_STATIC hcf_16 *BASED xxxx []
 

Macro Definition Documentation

#define IN_PORT_WORD (   port)    in_port_word( (hcf_io)(port) )

Definition at line 140 of file hcf.c.

#define offsetof (   s,
  m 
)    ((unsigned int)&(((s *)0)->m))

Definition at line 98 of file hcf.c.

#define OUT_PORT_WORD (   port,
  value 
)    out_port_word( (hcf_io)(port), (hcf_16)(value) )

Definition at line 150 of file hcf.c.

#define P   ((CFG_REG_MB_STRCT FAR *)ltvp)
#define xxxx_PRI_IDENTITY_OFFSET   (ARRAY_SIZE(xxxx) - 3)

Definition at line 492 of file hcf.c.

Function Documentation

HCF_STATIC void calibrate ( IFBP  ifbp)

Definition at line 3365 of file hcf.c.

HCF_STATIC int cmd_cmpl ( IFBP  ifbp)

Definition at line 3488 of file hcf.c.

HCF_STATIC int cmd_exe ( IFBP  ifbp,
hcf_16  cmd_code,
hcf_16  par_0 
)

Definition at line 3576 of file hcf.c.

HCF_STATIC int download ( IFBP  ifbp,
CFG_PROG_STRCT FAR ltvp 
)

!!WORD length, cp MUST be a char pointer

Definition at line 3631 of file hcf.c.

HCF_STATIC hcf_16 get_fid ( IFBP  ifbp)

!note that HREG_EV_ALLOC is written only once

Definition at line 3784 of file hcf.c.

HCF_STATIC void get_frag ( IFBP  ifbp,
wci_bufp  bufp,
int len   BE_PARint word_len 
)

Definition at line 3854 of file hcf.c.

int hcf_action ( IFBP  ifbp,
hcf_16  action 
)

rc = 0;

! the assumptions about numerical relationships between CFG_TALLIES etc and HCF_ACT_TALLIES etc are checked by if statements just prior to this routine resulting in: err "maintenance"

do not HCFASSERT( rc == HCF_SUCCESS, rc ) /* 30*/

Definition at line 677 of file hcf.c.

int hcf_cntl ( IFBP  ifbp,
hcf_16  cmd 
)

Definition at line 919 of file hcf.c.

int hcf_connect ( IFBP  ifbp,
hcf_io  io_base 
)

! No asserts before Reset-bit in HREG_IO is cleared

! No asserts before Reset-bit in HREG_IO is cleared

Definition at line 1117 of file hcf.c.

HCF_STATIC hcf_8 hcf_encap ( wci_bufp  type)

Definition at line 1829 of file hcf.c.

int hcf_get_info ( IFBP  ifbp,
LTVP  ltvp 
)

Definition at line 1951 of file hcf.c.

int hcf_put_info ( IFBP  ifbp,
LTVP  ltvp 
)

Definition at line 2134 of file hcf.c.

int hcf_rcv_msg ( IFBP  ifbp,
DESC_STRCT descp,
unsigned int  offset 
)

Definition at line 2365 of file hcf.c.

int hcf_send_msg ( IFBP  ifbp,
DESC_STRCT descp,
hcf_16  tx_cntl 
)

Definition at line 2574 of file hcf.c.

int hcf_service_nic ( IFBP  ifbp,
wci_bufp  bufp,
unsigned int  len 
)

rlav DMA engine will handle the rx event, not the driver

Definition at line 2943 of file hcf.c.

void IN_PORT_STRING_32 ( hcf_io  prt,
hcf_32 FAR dst,
int  n 
)

Definition at line 159 of file hcf.c.

void IN_PORT_STRING_8_16 ( hcf_io  prt,
hcf_8 FAR dst,
int  n 
)

Definition at line 177 of file hcf.c.

HCF_STATIC int init ( IFBP  ifbp)
HCF_STATIC void isr_info ( IFBP  ifbp)

Definition at line 4169 of file hcf.c.

void OUT_PORT_STRING_32 ( hcf_io  prt,
hcf_32 FAR src,
int  n 
)

Definition at line 197 of file hcf.c.

void OUT_PORT_STRING_8_16 ( hcf_io  prt,
hcf_8 FAR src,
int  n 
)

Definition at line 215 of file hcf.c.

HCF_STATIC void put_frag ( IFBP  ifbp,
wci_bufp  bufp,
int len   BE_PARint word_len 
)

Definition at line 4347 of file hcf.c.

HCF_STATIC void put_frag_finalize ( IFBP  ifbp)

Definition at line 4449 of file hcf.c.

HCF_STATIC int put_info ( IFBP  ifbp,
LTVP  ltvp 
)

Definition at line 4499 of file hcf.c.

HCF_STATIC int put_info_mb ( IFBP  ifbp,
CFG_MB_INFO_STRCT FAR ltvp 
)

!!be careful, don't get into an endless recursion

Definition at line 4594 of file hcf.c.

HCF_STATIC int setup_bap ( IFBP  ifbp,
hcf_16  fid,
int  offset,
int  type 
)

Definition at line 4723 of file hcf.c.

Variable Documentation

HCF_STATIC LTV_STRCT BASED cfg_null = { 1, CFG_NULL, {0} }

Definition at line 475 of file hcf.c.

FILE* log_file
HCF_STATIC hcf_8 null_addr[4] = { 0, 0, 0, 0 }

Definition at line 136 of file hcf.c.

HCF_STATIC hcf_8 BASED snap_header[]
Initial value:
= { 0xAA, 0xAA, 0x03, 0x00, 0x00,
0 }

Definition at line 245 of file hcf.c.

Initial value:
= {
&cfg_null.len,
}

Definition at line 477 of file hcf.c.