26 #define OEM_USER_DATA "SK-NET FDDI V2.0 Userdata"
30 static const char ID_sccs[] =
"@(#)smtdef.c 2.53 99/08/11 (C) SK " ;
36 #define TTMS(x) ((u_long)(x)*1000L)
37 #define TTS(x) ((u_long)(x)*1000000L)
38 #define TTUS(x) ((u_long)(x))
40 #define DEFAULT_TB_MIN TTMS(5)
41 #define DEFAULT_TB_MAX TTMS(50)
42 #define DEFAULT_C_MIN TTUS(1600)
43 #define DEFAULT_T_OUT TTMS(100+5)
44 #define DEFAULT_TL_MIN TTUS(30)
45 #define DEFAULT_LC_SHORT TTMS(50+5)
46 #define DEFAULT_LC_MEDIUM TTMS(500+20)
47 #define DEFAULT_LC_LONG TTS(5)+TTMS(50)
48 #define DEFAULT_LC_EXTENDED TTS(50)+TTMS(50)
49 #define DEFAULT_T_NEXT_9 TTMS(200+10)
50 #define DEFAULT_NS_MAX TTUS(1310)
51 #define DEFAULT_I_MAX TTMS(25)
52 #define DEFAULT_IN_MAX TTMS(40)
53 #define DEFAULT_TD_MIN TTMS(5)
54 #define DEFAULT_T_NON_OP TTS(1)
55 #define DEFAULT_T_STUCK TTS(8)
56 #define DEFAULT_T_DIRECT TTMS(370)
57 #define DEFAULT_T_JAM TTMS(370)
58 #define DEFAULT_T_ANNOUNCE TTMS(2500)
59 #define DEFAULT_D_MAX TTUS(1617)
60 #define DEFAULT_LEM_ALARM (8)
61 #define DEFAULT_LEM_CUTOFF (7)
62 #define DEFAULT_TEST_DONE TTS(1)
63 #define DEFAULT_CHECK_POLL TTS(1)
64 #define DEFAULT_POLL TTMS(50)
69 #define DEFAULT_LCT_SHORT 1
70 #define DEFAULT_LCT_MEDIUM 3
71 #define DEFAULT_LCT_LONG 5
72 #define DEFAULT_LCT_EXTEND 50
79 #define MS2BCLK(x) ((x)*12500L)
80 #define US2BCLK(x) ((x)*1250L)
89 smt_init_mib(smc,level) ;
94 smc->
sm.last_tok_time[i] = smt_boot_time ;
133 smc->ess.sync_bw_available =
FALSE ;
134 smc->
mib.fddiESSPayload = 0 ;
135 smc->
mib.fddiESSOverhead = 0 ;
137 smc->
mib.fddiESSMinSegmentSize = 1 ;
139 smc->
mib.fddiESSSynchTxMode =
FALSE ;
140 smc->ess.raf_act_timer_poll =
FALSE ;
141 smc->ess.timer_count = 7 ;
143 smc->ess.local_sba_active =
FALSE ;
144 smc->ess.sba_reply_pend =
NULL ;
147 smt_init_sba(smc,level) ;
152 smc->
hw.pci_fix_value = 0 ;
160 static const char man_data[32] =
162 "xxxSK-NET FDDI SMT 7.3 - V2.8.8" ;
167 struct fddi_mib_p *
pm ;
179 sizeof(
struct s_smc) -
213 mib->
m[
MAC0].fddiMACRequestedPaths =
230 mib->
m[
MAC0].fddiMACHardwarePresent =
TRUE ;
231 mib->
m[
MAC0].fddiMACMA_UnitdataEnable =
TRUE ;
232 mib->
m[
MAC0].fddiMACFrameErrorThreshold = 1 ;
233 mib->
m[
MAC0].fddiMACNotCopiedThreshold = 1 ;
237 for (path = 0 ; path <
NUMPATHS ; path++) {
240 mib->
a[
path].fddiPATHTVXLowerBound =
242 mib->
a[
path].fddiPATHT_MaxLowerBound =
244 mib->
a[
path].fddiPATHMaxT_Req =
254 for (port = 0 ; port <
NUMPHYS ; port++) {
264 pm->fddiPORTHardwarePresent =
TRUE ;
273 pm->fddiPORTRequestedPaths[1] = 0 ;
274 pm->fddiPORTRequestedPaths[2] = 0 ;
275 pm->fddiPORTRequestedPaths[3] = 0 ;
289 st = set_min_max(1,smc->
mib.m[
MAC0].fddiMACTvxValueMIB,
290 smc->
mib.a[
PATH0].fddiPATHTVXLowerBound,
291 &smc->
mib.m[
MAC0].fddiMACTvxValue) ;
292 st |= set_min_max(0,smc->
mib.m[
MAC0].fddiMACT_MaxMIB,
293 smc->
mib.a[
PATH0].fddiPATHT_MaxLowerBound,
294 &smc->
mib.m[
MAC0].fddiMACT_Max) ;
295 st |= (st2 = set_min_max(0,smc->
mib.m[
MAC0].fddiMACT_ReqMIB,
297 &smc->
mib.m[
MAC0].fddiMACT_Req)) ;
303 FDDI_SMT_EVENT, (
u_long) FDDI_REMOTE_T_REQ,
304 smt_get_event_word(smc));
312 switch (smc->
s.sas) {
314 smc->
mib.fddiSMTNonMaster_Ct = 1 ;
317 smc->
mib.fddiSMTNonMaster_Ct = 2 ;
320 smc->
mib.fddiSMTNonMaster_Ct = 0 ;
323 smc->
mib.fddiSMTMaster_Ct = NUMPHYS - smc->
mib.fddiSMTNonMaster_Ct ;
325 switch (smc->
s.sas) {
327 smc->
mib.fddiSMTNonMaster_Ct = 1 ;
330 smc->
mib.fddiSMTNonMaster_Ct = 2 ;
333 smc->
mib.fddiSMTMaster_Ct = 0 ;
349 if ((limit > mib) ^ maxflag)