Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
smc.h File Reference
#include "smt.h"
#include "cmtdef.h"
#include "fddimib.h"
#include "targethw.h"
#include "targetos.h"

Go to the source code of this file.

Data Structures

struct  event_queue
 
struct  s_queue
 
struct  s_ecm
 
struct  s_rmt
 
struct  s_cfm
 
struct  s_pcm
 
struct  s_phy
 
struct  s_timer
 
struct  s_srf
 
struct  s_srf_evc
 
struct  smt_values
 
struct  smt_config
 
struct  s_smc
 

Macros

#define MAX_EVENT   64
 
#define PCM_DISABLED   0
 
#define PCM_CONNECTING   1
 
#define PCM_STANDBY   2
 
#define PCM_ACTIVE   3
 
#define PMD_SK_CONN   0 /* pmd_type[PMD_SK_CONN] = Connector */
 
#define PMD_SK_PMD   1 /* pmd_type[PMD_SK_PMD] = Xver */
 
#define SMT_EVENT_BASE   1
 
#define SMT_EVENT_MAC_PATH_CHANGE   (SMT_EVENT_BASE+0)
 
#define SMT_EVENT_MAC_NEIGHBOR_CHANGE   (SMT_EVENT_BASE+1)
 
#define SMT_EVENT_PORT_PATH_CHANGE   (SMT_EVENT_BASE+2)
 
#define SMT_EVENT_PORT_CONNECTION   (SMT_EVENT_BASE+3)
 
#define SMT_IS_CONDITION(x)   ((x)>=SMT_COND_BASE)
 
#define SMT_COND_BASE   (SMT_EVENT_PORT_CONNECTION+1)
 
#define SMT_COND_SMT_PEER_WRAP   (SMT_COND_BASE+0)
 
#define SMT_COND_SMT_HOLD   (SMT_COND_BASE+1)
 
#define SMT_COND_MAC_FRAME_ERROR   (SMT_COND_BASE+2)
 
#define SMT_COND_MAC_DUP_ADDR   (SMT_COND_BASE+3)
 
#define SMT_COND_MAC_NOT_COPIED   (SMT_COND_BASE+4)
 
#define SMT_COND_PORT_EB_ERROR   (SMT_COND_BASE+5)
 
#define SMT_COND_PORT_LER   (SMT_COND_BASE+6)
 
#define SR0_WAIT   0
 
#define SR1_HOLDOFF   1
 
#define SR2_DISABLED   2
 
#define RS_RES15   (1<<15) /* reserved */
 
#define RS_HARDERROR   (1<<14) /* ring down */
 
#define RS_SOFTERROR   (1<<13) /* sent SRF */
 
#define RS_BEACON   (1<<12) /* transmitted beacon */
 
#define RS_PATHTEST   (1<<11) /* path test failed */
 
#define RS_SELFTEST   (1<<10) /* selftest required */
 
#define RS_RES9   (1<< 9) /* reserved */
 
#define RS_DISCONNECT   (1<< 8) /* remote disconnect */
 
#define RS_RES7   (1<< 7) /* reserved */
 
#define RS_DUPADDR   (1<< 6) /* duplicate address */
 
#define RS_NORINGOP   (1<< 5) /* no ring op */
 
#define RS_VERSION   (1<< 4) /* SMT version mismatch */
 
#define RS_STUCKBYPASSS   (1<< 3) /* stuck bypass */
 
#define RS_EVENT   (1<< 2) /* FDDI event occurred */
 
#define RS_RINGOPCHANGE   (1<< 1) /* ring op changed */
 
#define RS_RES0   (1<< 0) /* reserved */
 
#define RS_SET(smc, bit)   ring_status_indication(smc,smc->srf.ring_status |= bit)
 
#define RS_CLEAR(smc, bit)   ring_status_indication(smc,smc->srf.ring_status &= ~bit)
 
#define RS_CLEAR_EVENT   (0xffff & ~(RS_NORINGOP))
 
#define AIX_EVENT(smc, opt0, opt1, opt2, opt3)   /* nothing */
 
#define SMT_MAX_TEST   5
 
#define SMT_TID_NIF   0 /* pending NIF request */
 
#define SMT_TID_NIF_TEST   1 /* pending NIF test */
 
#define SMT_TID_ECF_UNA   2 /* pending ECF UNA test */
 
#define SMT_TID_ECF_DNA   3 /* pending ECF DNA test */
 
#define SMT_TID_ECF   4 /* pending ECF test */
 
#define SMT_DAS   0 /* dual attach */
 
#define SMT_SAS   1 /* single attach */
 
#define SMT_NAC   2 /* null attach concentrator */
 

Functions

void all_selection_criteria (struct s_smc *smc)
 
void card_stop (struct s_smc *smc)
 
void init_board (struct s_smc *smc, u_char *mac_addr)
 
int init_fplus (struct s_smc *smc)
 
void init_plc (struct s_smc *smc)
 
int init_smt (struct s_smc *smc, u_char *mac_addr)
 
void mac1_irq (struct s_smc *smc, u_short stu, u_short stl)
 
void mac2_irq (struct s_smc *smc, u_short code_s2u, u_short code_s2l)
 
void mac3_irq (struct s_smc *smc, u_short code_s3u, u_short code_s3l)
 
int pcm_status_twisted (struct s_smc *smc)
 
void plc1_irq (struct s_smc *smc)
 
void plc2_irq (struct s_smc *smc)
 
void read_address (struct s_smc *smc, u_char *mac_addr)
 
void timer_irq (struct s_smc *smc)
 

Variables

struct fddi_addr fddi_broadcast
 

Macro Definition Documentation

#define AIX_EVENT (   smc,
  opt0,
  opt1,
  opt2,
  opt3 
)    /* nothing */

Definition at line 314 of file smc.h.

#define MAX_EVENT   64

Definition at line 73 of file smc.h.

#define PCM_ACTIVE   3

Definition at line 188 of file smc.h.

#define PCM_CONNECTING   1

Definition at line 186 of file smc.h.

#define PCM_DISABLED   0

Definition at line 185 of file smc.h.

#define PCM_STANDBY   2

Definition at line 187 of file smc.h.

#define PMD_SK_CONN   0 /* pmd_type[PMD_SK_CONN] = Connector */

Definition at line 212 of file smc.h.

#define PMD_SK_PMD   1 /* pmd_type[PMD_SK_PMD] = Xver */

Definition at line 213 of file smc.h.

#define RS_BEACON   (1<<12) /* transmitted beacon */

Definition at line 290 of file smc.h.

#define RS_CLEAR (   smc,
  bit 
)    ring_status_indication(smc,smc->srf.ring_status &= ~bit)

Definition at line 306 of file smc.h.

#define RS_CLEAR_EVENT   (0xffff & ~(RS_NORINGOP))

Definition at line 309 of file smc.h.

#define RS_DISCONNECT   (1<< 8) /* remote disconnect */

Definition at line 294 of file smc.h.

#define RS_DUPADDR   (1<< 6) /* duplicate address */

Definition at line 296 of file smc.h.

#define RS_EVENT   (1<< 2) /* FDDI event occurred */

Definition at line 300 of file smc.h.

#define RS_HARDERROR   (1<<14) /* ring down */

Definition at line 288 of file smc.h.

#define RS_NORINGOP   (1<< 5) /* no ring op */

Definition at line 297 of file smc.h.

#define RS_PATHTEST   (1<<11) /* path test failed */

Definition at line 291 of file smc.h.

#define RS_RES0   (1<< 0) /* reserved */

Definition at line 302 of file smc.h.

#define RS_RES15   (1<<15) /* reserved */

Definition at line 287 of file smc.h.

#define RS_RES7   (1<< 7) /* reserved */

Definition at line 295 of file smc.h.

#define RS_RES9   (1<< 9) /* reserved */

Definition at line 293 of file smc.h.

#define RS_RINGOPCHANGE   (1<< 1) /* ring op changed */

Definition at line 301 of file smc.h.

#define RS_SELFTEST   (1<<10) /* selftest required */

Definition at line 292 of file smc.h.

#define RS_SET (   smc,
  bit 
)    ring_status_indication(smc,smc->srf.ring_status |= bit)

Definition at line 304 of file smc.h.

#define RS_SOFTERROR   (1<<13) /* sent SRF */

Definition at line 289 of file smc.h.

#define RS_STUCKBYPASSS   (1<< 3) /* stuck bypass */

Definition at line 299 of file smc.h.

#define RS_VERSION   (1<< 4) /* SMT version mismatch */

Definition at line 298 of file smc.h.

#define SMT_COND_BASE   (SMT_EVENT_PORT_CONNECTION+1)

Definition at line 262 of file smc.h.

#define SMT_COND_MAC_DUP_ADDR   (SMT_COND_BASE+3)

Definition at line 266 of file smc.h.

#define SMT_COND_MAC_FRAME_ERROR   (SMT_COND_BASE+2)

Definition at line 265 of file smc.h.

#define SMT_COND_MAC_NOT_COPIED   (SMT_COND_BASE+4)

Definition at line 267 of file smc.h.

#define SMT_COND_PORT_EB_ERROR   (SMT_COND_BASE+5)

Definition at line 268 of file smc.h.

#define SMT_COND_PORT_LER   (SMT_COND_BASE+6)

Definition at line 269 of file smc.h.

#define SMT_COND_SMT_HOLD   (SMT_COND_BASE+1)

Definition at line 264 of file smc.h.

#define SMT_COND_SMT_PEER_WRAP   (SMT_COND_BASE+0)

Definition at line 263 of file smc.h.

#define SMT_DAS   0 /* dual attach */

Definition at line 354 of file smc.h.

#define SMT_EVENT_BASE   1

Definition at line 254 of file smc.h.

#define SMT_EVENT_MAC_NEIGHBOR_CHANGE   (SMT_EVENT_BASE+1)

Definition at line 256 of file smc.h.

#define SMT_EVENT_MAC_PATH_CHANGE   (SMT_EVENT_BASE+0)

Definition at line 255 of file smc.h.

#define SMT_EVENT_PORT_CONNECTION   (SMT_EVENT_BASE+3)

Definition at line 258 of file smc.h.

#define SMT_EVENT_PORT_PATH_CHANGE   (SMT_EVENT_BASE+2)

Definition at line 257 of file smc.h.

#define SMT_IS_CONDITION (   x)    ((x)>=SMT_COND_BASE)

Definition at line 260 of file smc.h.

#define SMT_MAX_TEST   5

Definition at line 330 of file smc.h.

#define SMT_NAC   2 /* null attach concentrator */

Definition at line 356 of file smc.h.

#define SMT_SAS   1 /* single attach */

Definition at line 355 of file smc.h.

#define SMT_TID_ECF   4 /* pending ECF test */

Definition at line 335 of file smc.h.

#define SMT_TID_ECF_DNA   3 /* pending ECF DNA test */

Definition at line 334 of file smc.h.

#define SMT_TID_ECF_UNA   2 /* pending ECF UNA test */

Definition at line 333 of file smc.h.

#define SMT_TID_NIF   0 /* pending NIF request */

Definition at line 331 of file smc.h.

#define SMT_TID_NIF_TEST   1 /* pending NIF test */

Definition at line 332 of file smc.h.

#define SR0_WAIT   0

Definition at line 271 of file smc.h.

#define SR1_HOLDOFF   1

Definition at line 272 of file smc.h.

#define SR2_DISABLED   2

Definition at line 273 of file smc.h.

Function Documentation

void all_selection_criteria ( struct s_smc smc)

Definition at line 146 of file cfm.c.

void card_stop ( struct s_smc smc)

Definition at line 163 of file drvfbi.c.

void init_board ( struct s_smc smc,
u_char mac_addr 
)

Definition at line 323 of file drvfbi.c.

int init_fplus ( struct s_smc smc)

Definition at line 856 of file fplustm.c.

void init_plc ( struct s_smc smc)

Definition at line 401 of file pcmplc.c.

int init_smt ( struct s_smc smc,
u_char mac_addr 
)

Definition at line 68 of file smtinit.c.

void mac1_irq ( struct s_smc smc,
u_short  stu,
u_short  stl 
)

Definition at line 186 of file drvfbi.c.

void mac2_irq ( struct s_smc smc,
u_short  code_s2u,
u_short  code_s2l 
)

Definition at line 679 of file fplustm.c.

void mac3_irq ( struct s_smc smc,
u_short  code_s3u,
u_short  code_s3l 
)

Definition at line 805 of file fplustm.c.

int pcm_status_twisted ( struct s_smc smc)

Definition at line 1589 of file pcmplc.c.

void plc1_irq ( struct s_smc smc)

Definition at line 235 of file drvfbi.c.

void plc2_irq ( struct s_smc smc)

Definition at line 246 of file drvfbi.c.

void read_address ( struct s_smc smc,
u_char mac_addr 
)

Definition at line 284 of file drvfbi.c.

void timer_irq ( struct s_smc smc)

Definition at line 257 of file drvfbi.c.

Variable Documentation

struct fddi_addr fddi_broadcast

Definition at line 72 of file fplustm.c.