Go to the documentation of this file.
51 #define LINT_USE(x) (x)=(x)
57 #define DB_PR(flag,a,b,c) { if (flag) printf(a,b,c) ; }
59 #define DB_PR(flag,a,b,c)
63 #define DB_ECM(a,b,c) DB_PR((smc->debug.d_smt&1),a,b,c)
64 #define DB_ECMN(n,a,b,c) DB_PR((smc->debug.d_ecm >=(n)),a,b,c)
65 #define DB_RMT(a,b,c) DB_PR((smc->debug.d_smt&2),a,b,c)
66 #define DB_RMTN(n,a,b,c) DB_PR((smc->debug.d_rmt >=(n)),a,b,c)
67 #define DB_CFM(a,b,c) DB_PR((smc->debug.d_smt&4),a,b,c)
68 #define DB_CFMN(n,a,b,c) DB_PR((smc->debug.d_cfm >=(n)),a,b,c)
69 #define DB_PCM(a,b,c) DB_PR((smc->debug.d_smt&8),a,b,c)
70 #define DB_PCMN(n,a,b,c) DB_PR((smc->debug.d_pcm >=(n)),a,b,c)
71 #define DB_SMT(a,b,c) DB_PR((smc->debug.d_smtf),a,b,c)
72 #define DB_SMTN(n,a,b,c) DB_PR((smc->debug.d_smtf >=(n)),a,b,c)
73 #define DB_SBA(a,b,c) DB_PR((smc->debug.d_sba),a,b,c)
74 #define DB_SBAN(n,a,b,c) DB_PR((smc->debug.d_sba >=(n)),a,b,c)
75 #define DB_ESS(a,b,c) DB_PR((smc->debug.d_ess),a,b,c)
76 #define DB_ESSN(n,a,b,c) DB_PR((smc->debug.d_ess >=(n)),a,b,c)
78 #define DB_ECM(a,b,c) DB_PR((debug.d_smt&1),a,b,c)
79 #define DB_ECMN(n,a,b,c) DB_PR((debug.d_ecm >=(n)),a,b,c)
80 #define DB_RMT(a,b,c) DB_PR((debug.d_smt&2),a,b,c)
81 #define DB_RMTN(n,a,b,c) DB_PR((debug.d_rmt >=(n)),a,b,c)
82 #define DB_CFM(a,b,c) DB_PR((debug.d_smt&4),a,b,c)
83 #define DB_CFMN(n,a,b,c) DB_PR((debug.d_cfm >=(n)),a,b,c)
84 #define DB_PCM(a,b,c) DB_PR((debug.d_smt&8),a,b,c)
85 #define DB_PCMN(n,a,b,c) DB_PR((debug.d_pcm >=(n)),a,b,c)
86 #define DB_SMT(a,b,c) DB_PR((debug.d_smtf),a,b,c)
87 #define DB_SMTN(n,a,b,c) DB_PR((debug.d_smtf >=(n)),a,b,c)
88 #define DB_SBA(a,b,c) DB_PR((debug.d_sba),a,b,c)
89 #define DB_SBAN(n,a,b,c) DB_PR((debug.d_sba >=(n)),a,b,c)
90 #define DB_ESS(a,b,c) DB_PR((debug.d_ess),a,b,c)
91 #define DB_ESSN(n,a,b,c) DB_PR((debug.d_ess >=(n)),a,b,c)
95 #define SK_LOC_DECL(type,var) type var
97 #define SK_LOC_DECL(type,var) static type var
106 #if defined(SUPERNET_3) || defined(CONC_II)
139 #define POLICY_AA (1<<0)
140 #define POLICY_AB (1<<1)
141 #define POLICY_AS (1<<2)
142 #define POLICY_AM (1<<3)
143 #define POLICY_BA (1<<4)
144 #define POLICY_BB (1<<5)
145 #define POLICY_BS (1<<6)
146 #define POLICY_BM (1<<7)
147 #define POLICY_SA (1<<8)
148 #define POLICY_SB (1<<9)
149 #define POLICY_SS (1<<10)
150 #define POLICY_SM (1<<11)
151 #define POLICY_MA (1<<12)
152 #define POLICY_MB (1<<13)
153 #define POLICY_MS (1<<14)
154 #define POLICY_MM (1<<15)
178 #define EV_TOKEN(class,event) (((u_long)(class)<<16L)|((u_long)(event)))
179 #define EV_T_CLASS(token) ((int)((token)>>16)&0xffff)
180 #define EV_T_EVENT(token) ((int)(token)&0xffff)
186 #define EC_DISCONNECT 2
187 #define EC_TRACE_PROP 3
188 #define EC_PATH_TEST 4
189 #define EC_TIMEOUT_TD 5
190 #define EC_TIMEOUT_TMAX 6
191 #define EC_TIMEOUT_IMAX 7
192 #define EC_TIMEOUT_INMAX 8
193 #define EC_TEST_DONE 9
218 #define PC_DISABLE 11
228 #define PC_LS_NONE 17
229 #define LS2MIB(x) ((x)-PC_QLS)
230 #define MIB2LS(x) ((x)+PC_QLS)
232 #define PC_TIMEOUT_TB_MAX 18
233 #define PC_TIMEOUT_TB_MIN 19
234 #define PC_TIMEOUT_C_MIN 20
235 #define PC_TIMEOUT_T_OUT 21
236 #define PC_TIMEOUT_TL_MIN 22
237 #define PC_TIMEOUT_T_NEXT 23
238 #define PC_TIMEOUT_LCT 24
246 #define RM_RING_NON_OP 2
247 #define RM_MY_BEACON 3
248 #define RM_OTHER_BEACON 4
249 #define RM_MY_CLAIM 5
251 #define RM_VALID_CLAIM 7
254 #define RM_DUP_ADDR 10
255 #define RM_ENABLE_FLAG 11
257 #define RM_TIMEOUT_NON_OP 12
258 #define RM_TIMEOUT_T_STUCK 13
259 #define RM_TIMEOUT_ANNOUNCE 14
260 #define RM_TIMEOUT_T_DIRECT 15
261 #define RM_TIMEOUT_D_MAX 16
262 #define RM_TIMEOUT_POLL 17
263 #define RM_TX_STATE_CHANGE 18
282 #define PC_WH_OTHER 2
290 #define LC_EXTENDED 4
314 #define BP_DEINSERT 0
320 #define PM_TRANSMIT_DISABLE 0
321 #define PM_TRANSMIT_ENABLE 1
331 #define MUX_ISOLATE 4
340 #define MA_DIRECTED 3
349 #define ENTITY_MAC (NUMPHYS)
350 #define ENTITY_PHY(p) (p)
351 #define ENTITY_BIT(m) (1<<(m))
368 #define SC0_ISOLATED 0
371 #define SC4_THRU_A 12
374 #define SC9_C_WRAP_A 9
375 #define SC10_C_WRAP_B 10
376 #define SC11_C_WRAP_S 11
381 #define MIB2US(t) ((t)/12)
382 #define SEC2MIB(s) ((s)*12500000L)
475 #include "fddi/driver.pro"
491 #define SK_UNUSED(var) (void)(var)
507 int *remote,
int *
mac);
519 int index,
int local);
532 #if defined(DEBUG) || !defined(NO_SMT_PANIC)
535 #define smt_panic(smc,text)
596 void mac_do_pci_fix(
struct s_smc *
smc);
613 void sba_raf_received_pack();
614 void sba_timer_poll();
621 void ess_timer_poll(
struct s_smc *
smc);
622 void ess_para_change(
struct s_smc *
smc);
629 #define smt_init_evc(smc)
630 #define smt_srf_event(smc,code,index,cond)
633 #ifndef SMT_REAL_TOKEN_CT
637 #if defined(DEBUG) && !defined(BOOT)
640 #define dump_smt(smc,sm,text)
645 void dump_hex(
char *
p,
int len);
652 #define PNMI_INIT(smc)
655 #define PNMI_GET_ID( smc, ndis_oid, buf, len, BytesWritten, BytesNeeded ) \
659 #define PNMI_SET_ID( smc, ndis_oid, buf, len, BytesRead, BytesNeeded, \
660 set_type) ( 1 ? (-1) : (-1) )
667 #define SMT_PANIC(smc,nr,msg) smt_panic (smc, msg)
671 #define SMT_ERR_LOG(smc,nr,msg) SMT_PANIC (smc, nr, msg)
675 #define SMT_EBASE 100
678 #define SMT_E0100 SMT_EBASE + 0
679 #define SMT_E0100_MSG "cfm FSM: invalid ce_type"
680 #define SMT_E0101 SMT_EBASE + 1
681 #define SMT_E0101_MSG "CEM: case ???"
682 #define SMT_E0102 SMT_EBASE + 2
683 #define SMT_E0102_MSG "CEM A: invalid state"
684 #define SMT_E0103 SMT_EBASE + 3
685 #define SMT_E0103_MSG "CEM B: invalid state"
686 #define SMT_E0104 SMT_EBASE + 4
687 #define SMT_E0104_MSG "CEM M: invalid state"
688 #define SMT_E0105 SMT_EBASE + 5
689 #define SMT_E0105_MSG "CEM S: invalid state"
690 #define SMT_E0106 SMT_EBASE + 6
691 #define SMT_E0106_MSG "CFM : invalid state"
692 #define SMT_E0107 SMT_EBASE + 7
693 #define SMT_E0107_MSG "ECM : invalid state"
694 #define SMT_E0108 SMT_EBASE + 8
695 #define SMT_E0108_MSG "prop_actions : NAC in DAS CFM"
696 #define SMT_E0109 SMT_EBASE + 9
697 #define SMT_E0109_MSG "ST2U.FM_SERRSF error in special frame"
698 #define SMT_E0110 SMT_EBASE + 10
699 #define SMT_E0110_MSG "ST2U.FM_SRFRCTOV recv. count. overflow"
700 #define SMT_E0111 SMT_EBASE + 11
701 #define SMT_E0111_MSG "ST2U.FM_SNFSLD NP & FORMAC simult. load"
702 #define SMT_E0112 SMT_EBASE + 12
703 #define SMT_E0112_MSG "ST2U.FM_SRCVFRM single-frame recv.-mode"
704 #define SMT_E0113 SMT_EBASE + 13
705 #define SMT_E0113_MSG "FPLUS: Buffer Memory Error"
706 #define SMT_E0114 SMT_EBASE + 14
707 #define SMT_E0114_MSG "ST2U.FM_SERRSF error in special frame"
708 #define SMT_E0115 SMT_EBASE + 15
709 #define SMT_E0115_MSG "ST3L: parity error in receive queue 2"
710 #define SMT_E0116 SMT_EBASE + 16
711 #define SMT_E0116_MSG "ST3L: parity error in receive queue 1"
712 #define SMT_E0117 SMT_EBASE + 17
713 #define SMT_E0117_MSG "E_SMT_001: RxD count for receive queue 1 = 0"
714 #define SMT_E0118 SMT_EBASE + 18
715 #define SMT_E0118_MSG "PCM : invalid state"
716 #define SMT_E0119 SMT_EBASE + 19
717 #define SMT_E0119_MSG "smt_add_para"
718 #define SMT_E0120 SMT_EBASE + 20
719 #define SMT_E0120_MSG "smt_set_para"
720 #define SMT_E0121 SMT_EBASE + 21
721 #define SMT_E0121_MSG "invalid event in dispatcher"
722 #define SMT_E0122 SMT_EBASE + 22
723 #define SMT_E0122_MSG "RMT : invalid state"
724 #define SMT_E0123 SMT_EBASE + 23
725 #define SMT_E0123_MSG "SBA: state machine has invalid state"
726 #define SMT_E0124 SMT_EBASE + 24
727 #define SMT_E0124_MSG "sba_free_session() called with NULL pointer"
728 #define SMT_E0125 SMT_EBASE + 25
729 #define SMT_E0125_MSG "SBA : invalid session pointer"
730 #define SMT_E0126 SMT_EBASE + 26
731 #define SMT_E0126_MSG "smt_free_mbuf() called with NULL pointer\n"
732 #define SMT_E0127 SMT_EBASE + 27
733 #define SMT_E0127_MSG "sizeof evcs"
734 #define SMT_E0128 SMT_EBASE + 28
735 #define SMT_E0128_MSG "evc->evc_cond_state = 0"
736 #define SMT_E0129 SMT_EBASE + 29
737 #define SMT_E0129_MSG "evc->evc_multiple = 0"
738 #define SMT_E0130 SMT_EBASE + 30
739 #define SMT_E0130_MSG write_mdr_warning
740 #define SMT_E0131 SMT_EBASE + 31
741 #define SMT_E0131_MSG cam_warning
742 #define SMT_E0132 SMT_EBASE + 32
743 #define SMT_E0132_MSG "ST1L.FM_SPCEPDx parity/coding error"
744 #define SMT_E0133 SMT_EBASE + 33
745 #define SMT_E0133_MSG "ST1L.FM_STBURx tx buffer underrun"
746 #define SMT_E0134 SMT_EBASE + 34
747 #define SMT_E0134_MSG "ST1L.FM_SPCEPDx parity error"
748 #define SMT_E0135 SMT_EBASE + 35
749 #define SMT_E0135_MSG "RMT: duplicate MAC address detected. Ring left!"
750 #define SMT_E0136 SMT_EBASE + 36
751 #define SMT_E0136_MSG "Elasticity Buffer hang-up"
752 #define SMT_E0137 SMT_EBASE + 37
753 #define SMT_E0137_MSG "SMT: queue overrun"
754 #define SMT_E0138 SMT_EBASE + 38
755 #define SMT_E0138_MSG "RMT: duplicate MAC address detected. Ring NOT left!"