Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions
hcf.h File Reference
#include "hcfcfg.h"
#include "mdd.h"

Go to the source code of this file.

Data Structures

struct  DESC_STRCT
 
struct  CFG_HERMES_TALLIES_STRCT
 
struct  CFG_HCF_TALLIES_STRCT
 
struct  IFB_STRCT
 

Macros

#define LOF(x)   (sizeof(x)/sizeof(hcf_16)-1)
 
#define CNV_END_SHORT(w)   (hcf_16)( ((hcf_16)(w) & 0x00FF) << 8 | ((hcf_16)(w) & 0xFF00) >> 8 )
 
#define CNV_END_LONG(dw)   (hcf_32)( (dw >> 24) | ((dw >> 8) & 0xff00) | ((dw << 8) & 0xff0000) | (dw << 24) )
 
#define CNV_LITTLE_TO_SHORT(w)   (w)
 
#define CNV_BIG_TO_SHORT(w)   CNV_END_SHORT(w)
 
#define CNV_LITTLE_TO_LONG(dw)   (dw)
 
#define CNV_LONG_TO_LITTLE(dw)   (dw)
 
#define CNV_LONGP_TO_LITTLE(pdw)   (*(hcf_32 *)pdw)
 
#define CNV_SHORTP_TO_LITTLE(pw)   (*(hcf_16 *)pw)
 
#define CNV_SHORT_TO_LITTLE(w)   CNV_LITTLE_TO_SHORT(w)
 
#define CNV_SHORT_TO_BIG(w)   CNV_BIG_TO_SHORT(w)
 
#define HFS_STAT   0x0000
 
#define HFS_SWSUP   0x0006
 
#define HFS_Q_INFO   0x0006
 
#define HFS_RATE   0x0008
 
#define HFS_STAT_ERR   RX_STAT_ERR
 
#define HFS_TX_CNTL   0x0036
 
#define HFS_DAT_LEN   (HFS_ADDR_DEST - 2)
 
#define HFS_ADDR_DEST   0x003A
 
#define HFS_ADDR_SRC   (HFS_ADDR_DEST + 6)
 
#define HFS_LEN   (HFS_ADDR_SRC + 6)
 
#define HFS_DAT   (HFS_LEN + 2)
 
#define HFS_TYPE   (HFS_DAT + 6)
 
#define DESC_STRCT_CNT   1
 
#define DESC_STRCT_SIZE   0
 
#define BUF_CNT   buf_dim[DESC_STRCT_CNT]
 
#define BUF_SIZE   buf_dim[DESC_STRCT_SIZE]
 
#define HCF_DASA_SIZE   12
 
#define DESC_CNT_MASK   0x0FFF
 
#define GET_BUF_SIZE(descp)   ((descp)->BUF_SIZE)
 
#define GET_BUF_CNT(descp)   ((descp)->BUF_CNT)
 
#define SET_BUF_SIZE(descp, size)   (descp)->BUF_SIZE = size;
 
#define SET_BUF_CNT(descp, count)   (descp)->BUF_CNT = count;
 
#define HCF_NIC_TAL_CNT   (sizeof(CFG_HERMES_TALLIES_STRCT)/ sizeof(hcf_32))
 
#define HCF_HCF_TAL_CNT   (sizeof(CFG_HCF_TALLIES_STRCT) / sizeof(hcf_32))
 
#define HCF_TOT_TAL_CNT   ( HCF_NIC_TAL_CNT + HCF_NIC_TAL_CNT )
 
#define IFB_VERSION   0x0E
 

Typedefs

typedef struct DESC_STRCT DESC_STRCT
 
typedef IFB_STRCTIFBP
 

Functions

EXTERN_C int hcf_action (IFBP ifbp, hcf_16 cmd)
 
EXTERN_C int hcf_connect (IFBP ifbp, hcf_io io_base)
 
EXTERN_C int hcf_get_info (IFBP ifbp, LTVP ltvp)
 
EXTERN_C int hcf_service_nic (IFBP ifbp, wci_bufp bufp, unsigned int len)
 
EXTERN_C int hcf_cntl (IFBP ifbp, hcf_16 cmd)
 
EXTERN_C int hcf_put_info (IFBP ifbp, LTVP ltvp)
 
EXTERN_C int hcf_rcv_msg (IFBP ifbp, DESC_STRCT *descp, unsigned int offset)
 
EXTERN_C int hcf_send_msg (IFBP ifbp, DESC_STRCT *dp, hcf_16 tx_cntl)
 

Macro Definition Documentation

#define BUF_CNT   buf_dim[DESC_STRCT_CNT]

Definition at line 172 of file hcf.h.

#define BUF_SIZE   buf_dim[DESC_STRCT_SIZE]

Definition at line 173 of file hcf.h.

#define CNV_BIG_TO_SHORT (   w)    CNV_END_SHORT(w)

Definition at line 118 of file hcf.h.

#define CNV_END_LONG (   dw)    (hcf_32)( (dw >> 24) | ((dw >> 8) & 0xff00) | ((dw << 8) & 0xff0000) | (dw << 24) )

Definition at line 107 of file hcf.h.

#define CNV_END_SHORT (   w)    (hcf_16)( ((hcf_16)(w) & 0x00FF) << 8 | ((hcf_16)(w) & 0xFF00) >> 8 )

Definition at line 106 of file hcf.h.

#define CNV_LITTLE_TO_LONG (   dw)    (dw)

Definition at line 119 of file hcf.h.

#define CNV_LITTLE_TO_SHORT (   w)    (w)

Definition at line 117 of file hcf.h.

#define CNV_LONG_TO_LITTLE (   dw)    (dw)

Definition at line 120 of file hcf.h.

#define CNV_LONGP_TO_LITTLE (   pdw)    (*(hcf_32 *)pdw)

Definition at line 127 of file hcf.h.

#define CNV_SHORT_TO_BIG (   w)    CNV_BIG_TO_SHORT(w)

Definition at line 135 of file hcf.h.

#define CNV_SHORT_TO_LITTLE (   w)    CNV_LITTLE_TO_SHORT(w)

Definition at line 134 of file hcf.h.

#define CNV_SHORTP_TO_LITTLE (   pw)    (*(hcf_16 *)pw)

Definition at line 128 of file hcf.h.

#define DESC_CNT_MASK   0x0FFF

Definition at line 189 of file hcf.h.

#define DESC_STRCT_CNT   1

Definition at line 168 of file hcf.h.

#define DESC_STRCT_SIZE   0

Definition at line 169 of file hcf.h.

#define GET_BUF_CNT (   descp)    ((descp)->BUF_CNT)

Definition at line 192 of file hcf.h.

#define GET_BUF_SIZE (   descp)    ((descp)->BUF_SIZE)

Definition at line 191 of file hcf.h.

#define HCF_DASA_SIZE   12

Definition at line 187 of file hcf.h.

#define HCF_HCF_TAL_CNT   (sizeof(CFG_HCF_TALLIES_STRCT) / sizeof(hcf_32))

Definition at line 248 of file hcf.h.

#define HCF_NIC_TAL_CNT   (sizeof(CFG_HERMES_TALLIES_STRCT)/ sizeof(hcf_32))

Definition at line 243 of file hcf.h.

#define HCF_TOT_TAL_CNT   ( HCF_NIC_TAL_CNT + HCF_NIC_TAL_CNT )

Definition at line 252 of file hcf.h.

#define HFS_ADDR_DEST   0x003A

Definition at line 154 of file hcf.h.

#define HFS_ADDR_SRC   (HFS_ADDR_DEST + 6)

Definition at line 155 of file hcf.h.

#define HFS_DAT   (HFS_LEN + 2)

Definition at line 157 of file hcf.h.

#define HFS_DAT_LEN   (HFS_ADDR_DEST - 2)

Definition at line 153 of file hcf.h.

#define HFS_LEN   (HFS_ADDR_SRC + 6)

Definition at line 156 of file hcf.h.

#define HFS_Q_INFO   0x0006

Definition at line 148 of file hcf.h.

#define HFS_RATE   0x0008

Definition at line 149 of file hcf.h.

#define HFS_STAT   0x0000

Definition at line 146 of file hcf.h.

#define HFS_STAT_ERR   RX_STAT_ERR

Definition at line 150 of file hcf.h.

#define HFS_SWSUP   0x0006

Definition at line 147 of file hcf.h.

#define HFS_TX_CNTL   0x0036

Definition at line 151 of file hcf.h.

#define HFS_TYPE   (HFS_DAT + 6)

Definition at line 158 of file hcf.h.

#define IFB_VERSION   0x0E

Definition at line 260 of file hcf.h.

#define LOF (   x)    (sizeof(x)/sizeof(hcf_16)-1)

Definition at line 90 of file hcf.h.

#define SET_BUF_CNT (   descp,
  count 
)    (descp)->BUF_CNT = count;

Definition at line 194 of file hcf.h.

#define SET_BUF_SIZE (   descp,
  size 
)    (descp)->BUF_SIZE = size;

Definition at line 193 of file hcf.h.

Typedef Documentation

typedef IFB_STRCT* IFBP

Definition at line 368 of file hcf.h.

Function Documentation

EXTERN_C int hcf_action ( IFBP  ifbp,
hcf_16  cmd 
)

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.

EXTERN_C int hcf_cntl ( IFBP  ifbp,
hcf_16  cmd 
)

Definition at line 919 of file hcf.c.

EXTERN_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.

EXTERN_C int hcf_get_info ( IFBP  ifbp,
LTVP  ltvp 
)

Definition at line 1951 of file hcf.c.

EXTERN_C int hcf_put_info ( IFBP  ifbp,
LTVP  ltvp 
)

Definition at line 2134 of file hcf.c.

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

Definition at line 2365 of file hcf.c.

EXTERN_C int hcf_send_msg ( IFBP  ifbp,
DESC_STRCT dp,
hcf_16  tx_cntl 
)

Definition at line 2574 of file hcf.c.

EXTERN_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.