Lines Matching +full:port +full:- +full:level
1 // SPDX-License-Identifier: GPL-2.0-or-later
22 #define OEM_USER_DATA "SK-NET FDDI V2.0 Userdata"
67 void smt_reset_defaults(struct s_smc *smc, int level);
68 static void smt_init_mib(struct s_smc *smc, int level);
74 void smt_reset_defaults(struct s_smc *smc, int level) in smt_reset_defaults() argument
81 smt_init_mib(smc,level) ; in smt_reset_defaults()
83 smc->os.smc_version = SMC_VERSION ; in smt_reset_defaults()
86 smc->sm.last_tok_time[i] = smt_boot_time ; in smt_reset_defaults()
87 smt = &smc->s ; in smt_reset_defaults()
88 smt->attach_s = 0 ; in smt_reset_defaults()
89 smt->build_ring_map = 1 ; in smt_reset_defaults()
90 smt->sas = SMT_DAS ; in smt_reset_defaults()
91 smt->numphys = NUMPHYS ; in smt_reset_defaults()
92 smt->pcm_tb_min = DEFAULT_TB_MIN ; in smt_reset_defaults()
93 smt->pcm_tb_max = DEFAULT_TB_MAX ; in smt_reset_defaults()
94 smt->pcm_c_min = DEFAULT_C_MIN ; in smt_reset_defaults()
95 smt->pcm_t_out = DEFAULT_T_OUT ; in smt_reset_defaults()
96 smt->pcm_tl_min = DEFAULT_TL_MIN ; in smt_reset_defaults()
97 smt->pcm_lc_short = DEFAULT_LC_SHORT ; in smt_reset_defaults()
98 smt->pcm_lc_medium = DEFAULT_LC_MEDIUM ; in smt_reset_defaults()
99 smt->pcm_lc_long = DEFAULT_LC_LONG ; in smt_reset_defaults()
100 smt->pcm_lc_extended = DEFAULT_LC_EXTENDED ; in smt_reset_defaults()
101 smt->pcm_t_next_9 = DEFAULT_T_NEXT_9 ; in smt_reset_defaults()
102 smt->pcm_ns_max = DEFAULT_NS_MAX ; in smt_reset_defaults()
103 smt->ecm_i_max = DEFAULT_I_MAX ; in smt_reset_defaults()
104 smt->ecm_in_max = DEFAULT_IN_MAX ; in smt_reset_defaults()
105 smt->ecm_td_min = DEFAULT_TD_MIN ; in smt_reset_defaults()
106 smt->ecm_test_done = DEFAULT_TEST_DONE ; in smt_reset_defaults()
107 smt->ecm_check_poll = DEFAULT_CHECK_POLL ; in smt_reset_defaults()
108 smt->rmt_t_non_op = DEFAULT_T_NON_OP ; in smt_reset_defaults()
109 smt->rmt_t_stuck = DEFAULT_T_STUCK ; in smt_reset_defaults()
110 smt->rmt_t_direct = DEFAULT_T_DIRECT ; in smt_reset_defaults()
111 smt->rmt_t_jam = DEFAULT_T_JAM ; in smt_reset_defaults()
112 smt->rmt_t_announce = DEFAULT_T_ANNOUNCE ; in smt_reset_defaults()
113 smt->rmt_t_poll = DEFAULT_POLL ; in smt_reset_defaults()
114 smt->rmt_dup_mac_behavior = FALSE ; /* See Struct smt_config */ in smt_reset_defaults()
115 smt->mac_d_max = DEFAULT_D_MAX ; in smt_reset_defaults()
117 smt->lct_short = DEFAULT_LCT_SHORT ; in smt_reset_defaults()
118 smt->lct_medium = DEFAULT_LCT_MEDIUM ; in smt_reset_defaults()
119 smt->lct_long = DEFAULT_LCT_LONG ; in smt_reset_defaults()
120 smt->lct_extended = DEFAULT_LCT_EXTEND ; in smt_reset_defaults()
124 if (level == 0) { in smt_reset_defaults()
125 smc->ess.sync_bw_available = FALSE ; in smt_reset_defaults()
126 smc->mib.fddiESSPayload = 0 ; in smt_reset_defaults()
127 smc->mib.fddiESSOverhead = 0 ; in smt_reset_defaults()
128 smc->mib.fddiESSMaxTNeg = (u_long)(- MS2BCLK(25)) ; in smt_reset_defaults()
129 smc->mib.fddiESSMinSegmentSize = 1 ; in smt_reset_defaults()
130 smc->mib.fddiESSCategory = SB_STATIC ; in smt_reset_defaults()
131 smc->mib.fddiESSSynchTxMode = FALSE ; in smt_reset_defaults()
132 smc->ess.raf_act_timer_poll = FALSE ; in smt_reset_defaults()
133 smc->ess.timer_count = 7 ; /* first RAF alc req after 3s */ in smt_reset_defaults()
135 smc->ess.local_sba_active = FALSE ; in smt_reset_defaults()
136 smc->ess.sba_reply_pend = NULL ; in smt_reset_defaults()
139 smt_init_sba(smc,level) ; in smt_reset_defaults()
143 if (level == 0) { in smt_reset_defaults()
144 smc->hw.pci_fix_value = 0 ; in smt_reset_defaults()
154 "xxxSK-NET FDDI SMT 7.3 - V2.8.8" ;
156 static void smt_init_mib(struct s_smc *smc, int level) in smt_init_mib() argument
160 int port ; in smt_init_mib() local
163 mib = &smc->mib ; in smt_init_mib()
164 if (level == 0) { in smt_init_mib()
171 sizeof(struct s_smc) - in smt_init_mib()
172 sizeof(struct s_smt_os) - sizeof(struct s_smt_hw)) ; in smt_init_mib()
175 mib->fddiSMTRemoteDisconnectFlag = 0 ; in smt_init_mib()
176 mib->fddiSMTPeerWrapFlag = 0 ; in smt_init_mib()
179 mib->fddiSMTOpVersionId = 2 ; in smt_init_mib()
180 mib->fddiSMTHiVersionId = 2 ; in smt_init_mib()
181 mib->fddiSMTLoVersionId = 2 ; in smt_init_mib()
182 memcpy((char *) mib->fddiSMTManufacturerData,man_data,32) ; in smt_init_mib()
183 if (level == 0) { in smt_init_mib()
184 strcpy(mib->fddiSMTUserData,OEM_USER_DATA) ; in smt_init_mib()
186 mib->fddiSMTMIBVersionId = 1 ; in smt_init_mib()
187 mib->fddiSMTMac_Ct = NUMMACS ; in smt_init_mib()
188 mib->fddiSMTConnectionPolicy = POLICY_MM | POLICY_AA | POLICY_BB ; in smt_init_mib()
194 mib->fddiSMTAvailablePaths = MIB_PATH_P | MIB_PATH_S ; in smt_init_mib()
196 mib->fddiSMTConfigCapabilities = 0 ; /* no hold,no wrap_ab*/ in smt_init_mib()
197 mib->fddiSMTTT_Notify = 10 ; in smt_init_mib()
198 mib->fddiSMTStatRptPolicy = TRUE ; in smt_init_mib()
199 mib->fddiSMTTrace_MaxExpiration = SEC2MIB(7) ; in smt_init_mib()
200 mib->fddiSMTMACIndexes = INDEX_MAC ; in smt_init_mib()
201 mib->fddiSMTStationStatus = MIB_SMT_STASTA_SEPA ; /* separated */ in smt_init_mib()
203 mib->m[MAC0].fddiMACIndex = INDEX_MAC ; in smt_init_mib()
204 mib->m[MAC0].fddiMACFrameStatusFunctions = FSC_TYPE0 ; in smt_init_mib()
205 mib->m[MAC0].fddiMACRequestedPaths = in smt_init_mib()
209 mib->m[MAC0].fddiMACAvailablePaths = MIB_PATH_P ; in smt_init_mib()
210 mib->m[MAC0].fddiMACCurrentPath = MIB_PATH_PRIMARY ; in smt_init_mib()
211 mib->m[MAC0].fddiMACT_MaxCapabilitiy = (u_long)(- MS2BCLK(165)) ; in smt_init_mib()
212 mib->m[MAC0].fddiMACTVXCapabilitiy = (u_long)(- US2BCLK(52)) ; in smt_init_mib()
213 if (level == 0) { in smt_init_mib()
214 mib->m[MAC0].fddiMACTvxValue = (u_long)(- US2BCLK(27)) ; in smt_init_mib()
215 mib->m[MAC0].fddiMACTvxValueMIB = (u_long)(- US2BCLK(27)) ; in smt_init_mib()
216 mib->m[MAC0].fddiMACT_Req = (u_long)(- MS2BCLK(165)) ; in smt_init_mib()
217 mib->m[MAC0].fddiMACT_ReqMIB = (u_long)(- MS2BCLK(165)) ; in smt_init_mib()
218 mib->m[MAC0].fddiMACT_Max = (u_long)(- MS2BCLK(165)) ; in smt_init_mib()
219 mib->m[MAC0].fddiMACT_MaxMIB = (u_long)(- MS2BCLK(165)) ; in smt_init_mib()
220 mib->m[MAC0].fddiMACT_Min = (u_long)(- MS2BCLK(4)) ; in smt_init_mib()
222 mib->m[MAC0].fddiMACHardwarePresent = TRUE ; in smt_init_mib()
223 mib->m[MAC0].fddiMACMA_UnitdataEnable = TRUE ; in smt_init_mib()
224 mib->m[MAC0].fddiMACFrameErrorThreshold = 1 ; in smt_init_mib()
225 mib->m[MAC0].fddiMACNotCopiedThreshold = 1 ; in smt_init_mib()
230 mib->a[path].fddiPATHIndex = INDEX_PATH + path ; in smt_init_mib()
231 if (level == 0) { in smt_init_mib()
232 mib->a[path].fddiPATHTVXLowerBound = in smt_init_mib()
233 (u_long)(- US2BCLK(27)) ; in smt_init_mib()
234 mib->a[path].fddiPATHT_MaxLowerBound = in smt_init_mib()
235 (u_long)(- MS2BCLK(165)) ; in smt_init_mib()
236 mib->a[path].fddiPATHMaxT_Req = in smt_init_mib()
237 (u_long)(- MS2BCLK(165)) ; in smt_init_mib()
243 * Port attributes in smt_init_mib()
245 pm = mib->p ; in smt_init_mib()
246 for (port = 0 ; port < NUMPHYS ; port++) { in smt_init_mib()
252 smc->y[port].mib = NULL; in smt_init_mib()
253 mib->fddiSMTPORTIndexes[port] = port+INDEX_PORT ; in smt_init_mib()
255 pm->fddiPORTIndex = port+INDEX_PORT ; in smt_init_mib()
256 pm->fddiPORTHardwarePresent = TRUE ; in smt_init_mib()
257 if (level == 0) { in smt_init_mib()
258 pm->fddiPORTLer_Alarm = DEFAULT_LEM_ALARM ; in smt_init_mib()
259 pm->fddiPORTLer_Cutoff = DEFAULT_LEM_CUTOFF ; in smt_init_mib()
263 * we don't know the port type yet ! in smt_init_mib()
265 pm->fddiPORTRequestedPaths[1] = 0 ; in smt_init_mib()
266 pm->fddiPORTRequestedPaths[2] = 0 ; in smt_init_mib()
267 pm->fddiPORTRequestedPaths[3] = 0 ; in smt_init_mib()
268 pm->fddiPORTAvailablePaths = MIB_PATH_P ; in smt_init_mib()
269 pm->fddiPORTPMDClass = MIB_PMDCLASS_MULTI ; in smt_init_mib()
281 st = set_min_max(1,smc->mib.m[MAC0].fddiMACTvxValueMIB, in smt_set_mac_opvalues()
282 smc->mib.a[PATH0].fddiPATHTVXLowerBound, in smt_set_mac_opvalues()
283 &smc->mib.m[MAC0].fddiMACTvxValue) ; in smt_set_mac_opvalues()
284 st |= set_min_max(0,smc->mib.m[MAC0].fddiMACT_MaxMIB, in smt_set_mac_opvalues()
285 smc->mib.a[PATH0].fddiPATHT_MaxLowerBound, in smt_set_mac_opvalues()
286 &smc->mib.m[MAC0].fddiMACT_Max) ; in smt_set_mac_opvalues()
287 st |= (st2 = set_min_max(0,smc->mib.m[MAC0].fddiMACT_ReqMIB, in smt_set_mac_opvalues()
288 smc->mib.a[PATH0].fddiPATHMaxT_Req, in smt_set_mac_opvalues()
289 &smc->mib.m[MAC0].fddiMACT_Req)) ; in smt_set_mac_opvalues()
304 switch (smc->s.sas) { in smt_fixup_mib()
306 smc->mib.fddiSMTNonMaster_Ct = 1 ; in smt_fixup_mib()
309 smc->mib.fddiSMTNonMaster_Ct = 2 ; in smt_fixup_mib()
312 smc->mib.fddiSMTNonMaster_Ct = 0 ; in smt_fixup_mib()
315 smc->mib.fddiSMTMaster_Ct = NUMPHYS - smc->mib.fddiSMTNonMaster_Ct ; in smt_fixup_mib()
317 switch (smc->s.sas) { in smt_fixup_mib()
319 smc->mib.fddiSMTNonMaster_Ct = 1 ; in smt_fixup_mib()
322 smc->mib.fddiSMTNonMaster_Ct = 2 ; in smt_fixup_mib()
325 smc->mib.fddiSMTMaster_Ct = 0 ; in smt_fixup_mib()