diff options
Diffstat (limited to 'drivers/net/skfp')
-rw-r--r-- | drivers/net/skfp/cfm.c | 10 | ||||
-rw-r--r-- | drivers/net/skfp/drvfbi.c | 16 | ||||
-rw-r--r-- | drivers/net/skfp/ess.c | 46 | ||||
-rw-r--r-- | drivers/net/skfp/fplustm.c | 24 | ||||
-rw-r--r-- | drivers/net/skfp/hwmtm.c | 30 | ||||
-rw-r--r-- | drivers/net/skfp/hwt.c | 4 | ||||
-rw-r--r-- | drivers/net/skfp/pcmplc.c | 22 | ||||
-rw-r--r-- | drivers/net/skfp/pmf.c | 62 | ||||
-rw-r--r-- | drivers/net/skfp/queue.c | 2 | ||||
-rw-r--r-- | drivers/net/skfp/skfddi.c | 32 | ||||
-rw-r--r-- | drivers/net/skfp/smt.c | 78 | ||||
-rw-r--r-- | drivers/net/skfp/smtdef.c | 4 | ||||
-rw-r--r-- | drivers/net/skfp/smtinit.c | 2 | ||||
-rw-r--r-- | drivers/net/skfp/srf.c | 2 |
14 files changed, 166 insertions, 168 deletions
diff --git a/drivers/net/skfp/cfm.c b/drivers/net/skfp/cfm.c index 5310d39b5737..e395ace3120b 100644 --- a/drivers/net/skfp/cfm.c +++ b/drivers/net/skfp/cfm.c | |||
@@ -542,8 +542,8 @@ static void cfm_fsm(struct s_smc *smc, int cmd) | |||
542 | */ | 542 | */ |
543 | int cfm_get_mac_input(struct s_smc *smc) | 543 | int cfm_get_mac_input(struct s_smc *smc) |
544 | { | 544 | { |
545 | return((smc->mib.fddiSMTCF_State == SC10_C_WRAP_B || | 545 | return (smc->mib.fddiSMTCF_State == SC10_C_WRAP_B || |
546 | smc->mib.fddiSMTCF_State == SC5_THRU_B) ? PB : PA) ; | 546 | smc->mib.fddiSMTCF_State == SC5_THRU_B) ? PB : PA; |
547 | } | 547 | } |
548 | 548 | ||
549 | /* | 549 | /* |
@@ -553,8 +553,8 @@ int cfm_get_mac_input(struct s_smc *smc) | |||
553 | */ | 553 | */ |
554 | int cfm_get_mac_output(struct s_smc *smc) | 554 | int cfm_get_mac_output(struct s_smc *smc) |
555 | { | 555 | { |
556 | return((smc->mib.fddiSMTCF_State == SC10_C_WRAP_B || | 556 | return (smc->mib.fddiSMTCF_State == SC10_C_WRAP_B || |
557 | smc->mib.fddiSMTCF_State == SC4_THRU_A) ? PB : PA) ; | 557 | smc->mib.fddiSMTCF_State == SC4_THRU_A) ? PB : PA; |
558 | } | 558 | } |
559 | 559 | ||
560 | static char path_iso[] = { | 560 | static char path_iso[] = { |
@@ -623,5 +623,5 @@ int cem_build_path(struct s_smc *smc, char *to, int path_index) | |||
623 | 623 | ||
624 | LINT_USE(path_index); | 624 | LINT_USE(path_index); |
625 | 625 | ||
626 | return(len) ; | 626 | return len; |
627 | } | 627 | } |
diff --git a/drivers/net/skfp/drvfbi.c b/drivers/net/skfp/drvfbi.c index c77cc14b3227..07da97c303d6 100644 --- a/drivers/net/skfp/drvfbi.c +++ b/drivers/net/skfp/drvfbi.c | |||
@@ -267,7 +267,7 @@ void timer_irq(struct s_smc *smc) | |||
267 | int pcm_get_s_port(struct s_smc *smc) | 267 | int pcm_get_s_port(struct s_smc *smc) |
268 | { | 268 | { |
269 | SK_UNUSED(smc) ; | 269 | SK_UNUSED(smc) ; |
270 | return(PS) ; | 270 | return PS; |
271 | } | 271 | } |
272 | 272 | ||
273 | /* | 273 | /* |
@@ -366,7 +366,7 @@ void sm_pm_bypass_req(struct s_smc *smc, int mode) | |||
366 | */ | 366 | */ |
367 | int sm_pm_bypass_present(struct s_smc *smc) | 367 | int sm_pm_bypass_present(struct s_smc *smc) |
368 | { | 368 | { |
369 | return( (inp(ADDR(B0_DAS)) & DAS_BYP_ST) ? TRUE: FALSE) ; | 369 | return (inp(ADDR(B0_DAS)) & DAS_BYP_ST) ? TRUE : FALSE; |
370 | } | 370 | } |
371 | 371 | ||
372 | void plc_clear_irq(struct s_smc *smc, int p) | 372 | void plc_clear_irq(struct s_smc *smc, int p) |
@@ -483,9 +483,9 @@ static int is_equal_num(char comp1[], char comp2[], int num) | |||
483 | 483 | ||
484 | for (i = 0 ; i < num ; i++) { | 484 | for (i = 0 ; i < num ; i++) { |
485 | if (comp1[i] != comp2[i]) | 485 | if (comp1[i] != comp2[i]) |
486 | return (0) ; | 486 | return 0; |
487 | } | 487 | } |
488 | return (1) ; | 488 | return 1; |
489 | } /* is_equal_num */ | 489 | } /* is_equal_num */ |
490 | 490 | ||
491 | 491 | ||
@@ -522,18 +522,18 @@ int set_oi_id_def(struct s_smc *smc) | |||
522 | i++ ; | 522 | i++ ; |
523 | break ; /* entry ok */ | 523 | break ; /* entry ok */ |
524 | default: | 524 | default: |
525 | return (1) ; /* invalid oi_status */ | 525 | return 1; /* invalid oi_status */ |
526 | } | 526 | } |
527 | } | 527 | } |
528 | 528 | ||
529 | if (i == 0) | 529 | if (i == 0) |
530 | return (2) ; | 530 | return 2; |
531 | if (!act_entries) | 531 | if (!act_entries) |
532 | return (3) ; | 532 | return 3; |
533 | 533 | ||
534 | /* ok, we have a valid OEM data base with an active entry */ | 534 | /* ok, we have a valid OEM data base with an active entry */ |
535 | smc->hw.oem_id = (struct s_oem_ids *) &oem_ids[sel_id] ; | 535 | smc->hw.oem_id = (struct s_oem_ids *) &oem_ids[sel_id] ; |
536 | return (0) ; | 536 | return 0; |
537 | } | 537 | } |
538 | #endif /* MULT_OEM */ | 538 | #endif /* MULT_OEM */ |
539 | 539 | ||
diff --git a/drivers/net/skfp/ess.c b/drivers/net/skfp/ess.c index e8387d25f24a..8639a0884f5c 100644 --- a/drivers/net/skfp/ess.c +++ b/drivers/net/skfp/ess.c | |||
@@ -135,7 +135,7 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, | |||
135 | */ | 135 | */ |
136 | if (!(p = (void *) sm_to_para(smc,sm,SMT_P0015))) { | 136 | if (!(p = (void *) sm_to_para(smc,sm,SMT_P0015))) { |
137 | DB_ESS("ESS: RAF frame error, parameter type not found\n",0,0) ; | 137 | DB_ESS("ESS: RAF frame error, parameter type not found\n",0,0) ; |
138 | return(fs) ; | 138 | return fs; |
139 | } | 139 | } |
140 | msg_res_type = ((struct smt_p_0015 *)p)->res_type ; | 140 | msg_res_type = ((struct smt_p_0015 *)p)->res_type ; |
141 | 141 | ||
@@ -147,7 +147,7 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, | |||
147 | * error in frame: para ESS command was not found | 147 | * error in frame: para ESS command was not found |
148 | */ | 148 | */ |
149 | DB_ESS("ESS: RAF frame error, parameter command not found\n",0,0); | 149 | DB_ESS("ESS: RAF frame error, parameter command not found\n",0,0); |
150 | return(fs) ; | 150 | return fs; |
151 | } | 151 | } |
152 | 152 | ||
153 | DB_ESSN(2,"fc %x ft %x\n",sm->smt_class,sm->smt_type) ; | 153 | DB_ESSN(2,"fc %x ft %x\n",sm->smt_class,sm->smt_type) ; |
@@ -175,12 +175,12 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, | |||
175 | * local and no static allocation is used | 175 | * local and no static allocation is used |
176 | */ | 176 | */ |
177 | if (!local || smc->mib.fddiESSPayload) | 177 | if (!local || smc->mib.fddiESSPayload) |
178 | return(fs) ; | 178 | return fs; |
179 | 179 | ||
180 | p = (void *) sm_to_para(smc,sm,SMT_P0019) ; | 180 | p = (void *) sm_to_para(smc,sm,SMT_P0019) ; |
181 | for (i = 0; i < 5; i++) { | 181 | for (i = 0; i < 5; i++) { |
182 | if (((struct smt_p_0019 *)p)->alloc_addr.a[i]) { | 182 | if (((struct smt_p_0019 *)p)->alloc_addr.a[i]) { |
183 | return(fs) ; | 183 | return fs; |
184 | } | 184 | } |
185 | } | 185 | } |
186 | 186 | ||
@@ -199,10 +199,10 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, | |||
199 | sm->smt_dest = smt_sba_da ; | 199 | sm->smt_dest = smt_sba_da ; |
200 | 200 | ||
201 | if (smc->ess.local_sba_active) | 201 | if (smc->ess.local_sba_active) |
202 | return(fs | I_INDICATOR) ; | 202 | return fs | I_INDICATOR; |
203 | 203 | ||
204 | if (!(db = smt_get_mbuf(smc))) | 204 | if (!(db = smt_get_mbuf(smc))) |
205 | return(fs) ; | 205 | return fs; |
206 | 206 | ||
207 | db->sm_len = mb->sm_len ; | 207 | db->sm_len = mb->sm_len ; |
208 | db->sm_off = mb->sm_off ; | 208 | db->sm_off = mb->sm_off ; |
@@ -212,7 +212,7 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, | |||
212 | (struct smt_header *)(db->sm_data+db->sm_off), | 212 | (struct smt_header *)(db->sm_data+db->sm_off), |
213 | "RAF") ; | 213 | "RAF") ; |
214 | smt_send_frame(smc,db,FC_SMT_INFO,0) ; | 214 | smt_send_frame(smc,db,FC_SMT_INFO,0) ; |
215 | return(fs) ; | 215 | return fs; |
216 | } | 216 | } |
217 | 217 | ||
218 | /* | 218 | /* |
@@ -221,7 +221,7 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, | |||
221 | */ | 221 | */ |
222 | if (smt_check_para(smc,sm,plist_raf_alc_res)) { | 222 | if (smt_check_para(smc,sm,plist_raf_alc_res)) { |
223 | DB_ESS("ESS: RAF with para problem, ignoring\n",0,0) ; | 223 | DB_ESS("ESS: RAF with para problem, ignoring\n",0,0) ; |
224 | return(fs) ; | 224 | return fs; |
225 | } | 225 | } |
226 | 226 | ||
227 | /* | 227 | /* |
@@ -242,7 +242,7 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, | |||
242 | (sm->smt_tid != smc->ess.alloc_trans_id)) { | 242 | (sm->smt_tid != smc->ess.alloc_trans_id)) { |
243 | 243 | ||
244 | DB_ESS("ESS: Allocation Responce not accepted\n",0,0) ; | 244 | DB_ESS("ESS: Allocation Responce not accepted\n",0,0) ; |
245 | return(fs) ; | 245 | return fs; |
246 | } | 246 | } |
247 | 247 | ||
248 | /* | 248 | /* |
@@ -268,7 +268,7 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, | |||
268 | */ | 268 | */ |
269 | (void)process_bw_alloc(smc,(long)payload,(long)overhead) ; | 269 | (void)process_bw_alloc(smc,(long)payload,(long)overhead) ; |
270 | 270 | ||
271 | return(fs) ; | 271 | return fs; |
272 | /* end of Process Allocation Request */ | 272 | /* end of Process Allocation Request */ |
273 | 273 | ||
274 | /* | 274 | /* |
@@ -280,7 +280,7 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, | |||
280 | */ | 280 | */ |
281 | if (sm->smt_type != SMT_REQUEST) { | 281 | if (sm->smt_type != SMT_REQUEST) { |
282 | DB_ESS("ESS: Do not process Change Responses\n",0,0) ; | 282 | DB_ESS("ESS: Do not process Change Responses\n",0,0) ; |
283 | return(fs) ; | 283 | return fs; |
284 | } | 284 | } |
285 | 285 | ||
286 | /* | 286 | /* |
@@ -288,7 +288,7 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, | |||
288 | */ | 288 | */ |
289 | if (smt_check_para(smc,sm,plist_raf_chg_req)) { | 289 | if (smt_check_para(smc,sm,plist_raf_chg_req)) { |
290 | DB_ESS("ESS: RAF with para problem, ignoring\n",0,0) ; | 290 | DB_ESS("ESS: RAF with para problem, ignoring\n",0,0) ; |
291 | return(fs) ; | 291 | return fs; |
292 | } | 292 | } |
293 | 293 | ||
294 | /* | 294 | /* |
@@ -300,7 +300,7 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, | |||
300 | if ((((struct smt_p_320b *)sm_to_para(smc,sm,SMT_P320B))->path_index | 300 | if ((((struct smt_p_320b *)sm_to_para(smc,sm,SMT_P320B))->path_index |
301 | != PRIMARY_RING) || (msg_res_type != SYNC_BW)) { | 301 | != PRIMARY_RING) || (msg_res_type != SYNC_BW)) { |
302 | DB_ESS("ESS: RAF frame with para problem, ignoring\n",0,0) ; | 302 | DB_ESS("ESS: RAF frame with para problem, ignoring\n",0,0) ; |
303 | return(fs) ; | 303 | return fs; |
304 | } | 304 | } |
305 | 305 | ||
306 | /* | 306 | /* |
@@ -319,14 +319,14 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, | |||
319 | * process the bandwidth allocation | 319 | * process the bandwidth allocation |
320 | */ | 320 | */ |
321 | if(!process_bw_alloc(smc,(long)payload,(long)overhead)) | 321 | if(!process_bw_alloc(smc,(long)payload,(long)overhead)) |
322 | return(fs) ; | 322 | return fs; |
323 | 323 | ||
324 | /* | 324 | /* |
325 | * send an RAF Change Reply | 325 | * send an RAF Change Reply |
326 | */ | 326 | */ |
327 | ess_send_response(smc,sm,CHANGE_ALLOCATION) ; | 327 | ess_send_response(smc,sm,CHANGE_ALLOCATION) ; |
328 | 328 | ||
329 | return(fs) ; | 329 | return fs; |
330 | /* end of Process Change Request */ | 330 | /* end of Process Change Request */ |
331 | 331 | ||
332 | /* | 332 | /* |
@@ -338,7 +338,7 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, | |||
338 | */ | 338 | */ |
339 | if (sm->smt_type != SMT_REQUEST) { | 339 | if (sm->smt_type != SMT_REQUEST) { |
340 | DB_ESS("ESS: Do not process a Report Reply\n",0,0) ; | 340 | DB_ESS("ESS: Do not process a Report Reply\n",0,0) ; |
341 | return(fs) ; | 341 | return fs; |
342 | } | 342 | } |
343 | 343 | ||
344 | DB_ESSN(2,"ESS: Report Request from %s\n", | 344 | DB_ESSN(2,"ESS: Report Request from %s\n", |
@@ -349,7 +349,7 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, | |||
349 | */ | 349 | */ |
350 | if (msg_res_type != SYNC_BW) { | 350 | if (msg_res_type != SYNC_BW) { |
351 | DB_ESS("ESS: ignoring RAF with para problem\n",0,0) ; | 351 | DB_ESS("ESS: ignoring RAF with para problem\n",0,0) ; |
352 | return(fs) ; | 352 | return fs; |
353 | } | 353 | } |
354 | 354 | ||
355 | /* | 355 | /* |
@@ -357,7 +357,7 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, | |||
357 | */ | 357 | */ |
358 | ess_send_response(smc,sm,REPORT_ALLOCATION) ; | 358 | ess_send_response(smc,sm,REPORT_ALLOCATION) ; |
359 | 359 | ||
360 | return(fs) ; | 360 | return fs; |
361 | /* end of Process Report Request */ | 361 | /* end of Process Report Request */ |
362 | 362 | ||
363 | default: | 363 | default: |
@@ -368,7 +368,7 @@ int ess_raf_received_pack(struct s_smc *smc, SMbuf *mb, struct smt_header *sm, | |||
368 | break ; | 368 | break ; |
369 | } | 369 | } |
370 | 370 | ||
371 | return(fs) ; | 371 | return fs; |
372 | } | 372 | } |
373 | 373 | ||
374 | /* | 374 | /* |
@@ -418,17 +418,17 @@ static int process_bw_alloc(struct s_smc *smc, long int payload, long int overhe | |||
418 | */ | 418 | */ |
419 | /* if (smt_set_obj(smc,SMT_P320F,payload,S_SET)) { | 419 | /* if (smt_set_obj(smc,SMT_P320F,payload,S_SET)) { |
420 | DB_ESS("ESS: SMT does not accept the payload value\n",0,0) ; | 420 | DB_ESS("ESS: SMT does not accept the payload value\n",0,0) ; |
421 | return(FALSE) ; | 421 | return FALSE; |
422 | } | 422 | } |
423 | if (smt_set_obj(smc,SMT_P3210,overhead,S_SET)) { | 423 | if (smt_set_obj(smc,SMT_P3210,overhead,S_SET)) { |
424 | DB_ESS("ESS: SMT does not accept the overhead value\n",0,0) ; | 424 | DB_ESS("ESS: SMT does not accept the overhead value\n",0,0) ; |
425 | return(FALSE) ; | 425 | return FALSE; |
426 | } */ | 426 | } */ |
427 | 427 | ||
428 | /* premliminary */ | 428 | /* premliminary */ |
429 | if (payload > MAX_PAYLOAD || overhead > 5000) { | 429 | if (payload > MAX_PAYLOAD || overhead > 5000) { |
430 | DB_ESS("ESS: payload / overhead not accepted\n",0,0) ; | 430 | DB_ESS("ESS: payload / overhead not accepted\n",0,0) ; |
431 | return(FALSE) ; | 431 | return FALSE; |
432 | } | 432 | } |
433 | 433 | ||
434 | /* | 434 | /* |
@@ -468,7 +468,7 @@ static int process_bw_alloc(struct s_smc *smc, long int payload, long int overhe | |||
468 | 468 | ||
469 | ess_config_fifo(smc) ; | 469 | ess_config_fifo(smc) ; |
470 | set_formac_tsync(smc,smc->ess.sync_bw) ; | 470 | set_formac_tsync(smc,smc->ess.sync_bw) ; |
471 | return(TRUE) ; | 471 | return TRUE; |
472 | } | 472 | } |
473 | 473 | ||
474 | static void ess_send_response(struct s_smc *smc, struct smt_header *sm, | 474 | static void ess_send_response(struct s_smc *smc, struct smt_header *sm, |
diff --git a/drivers/net/skfp/fplustm.c b/drivers/net/skfp/fplustm.c index 9d8d1ac48176..ca4e7bb6a5a8 100644 --- a/drivers/net/skfp/fplustm.c +++ b/drivers/net/skfp/fplustm.c | |||
@@ -112,8 +112,8 @@ static u_long mac_get_tneg(struct s_smc *smc) | |||
112 | u_long tneg ; | 112 | u_long tneg ; |
113 | 113 | ||
114 | tneg = (u_long)((long)inpw(FM_A(FM_TNEG))<<5) ; | 114 | tneg = (u_long)((long)inpw(FM_A(FM_TNEG))<<5) ; |
115 | return((u_long)((tneg + ((inpw(FM_A(FM_TMRS))>>10)&0x1f)) | | 115 | return (u_long)((tneg + ((inpw(FM_A(FM_TMRS))>>10)&0x1f)) | |
116 | 0xffe00000L)) ; | 116 | 0xffe00000L) ; |
117 | } | 117 | } |
118 | 118 | ||
119 | void mac_update_counter(struct s_smc *smc) | 119 | void mac_update_counter(struct s_smc *smc) |
@@ -163,7 +163,7 @@ static u_long read_mdr(struct s_smc *smc, unsigned int addr) | |||
163 | /* is used */ | 163 | /* is used */ |
164 | p = (u_long)inpw(FM_A(FM_MDRU))<<16 ; | 164 | p = (u_long)inpw(FM_A(FM_MDRU))<<16 ; |
165 | p += (u_long)inpw(FM_A(FM_MDRL)) ; | 165 | p += (u_long)inpw(FM_A(FM_MDRL)) ; |
166 | return(p) ; | 166 | return p; |
167 | } | 167 | } |
168 | #endif | 168 | #endif |
169 | 169 | ||
@@ -887,7 +887,7 @@ int init_fplus(struct s_smc *smc) | |||
887 | /* make sure all PCI settings are correct */ | 887 | /* make sure all PCI settings are correct */ |
888 | mac_do_pci_fix(smc) ; | 888 | mac_do_pci_fix(smc) ; |
889 | 889 | ||
890 | return(init_mac(smc,1)) ; | 890 | return init_mac(smc, 1); |
891 | /* enable_formac(smc) ; */ | 891 | /* enable_formac(smc) ; */ |
892 | } | 892 | } |
893 | 893 | ||
@@ -989,7 +989,7 @@ static int init_mac(struct s_smc *smc, int all) | |||
989 | } | 989 | } |
990 | smc->hw.hw_state = STARTED ; | 990 | smc->hw.hw_state = STARTED ; |
991 | 991 | ||
992 | return(0) ; | 992 | return 0; |
993 | } | 993 | } |
994 | 994 | ||
995 | 995 | ||
@@ -1049,7 +1049,7 @@ void sm_ma_control(struct s_smc *smc, int mode) | |||
1049 | 1049 | ||
1050 | int sm_mac_get_tx_state(struct s_smc *smc) | 1050 | int sm_mac_get_tx_state(struct s_smc *smc) |
1051 | { | 1051 | { |
1052 | return((inpw(FM_A(FM_STMCHN))>>4)&7) ; | 1052 | return (inpw(FM_A(FM_STMCHN))>>4) & 7; |
1053 | } | 1053 | } |
1054 | 1054 | ||
1055 | /* | 1055 | /* |
@@ -1084,9 +1084,9 @@ static struct s_fpmc* mac_get_mc_table(struct s_smc *smc, | |||
1084 | } | 1084 | } |
1085 | if (memcmp((char *)&tb->a,(char *)own,6)) | 1085 | if (memcmp((char *)&tb->a,(char *)own,6)) |
1086 | continue ; | 1086 | continue ; |
1087 | return(tb) ; | 1087 | return tb; |
1088 | } | 1088 | } |
1089 | return(slot) ; /* return first free or NULL */ | 1089 | return slot; /* return first free or NULL */ |
1090 | } | 1090 | } |
1091 | 1091 | ||
1092 | /* | 1092 | /* |
@@ -1152,12 +1152,12 @@ int mac_add_multicast(struct s_smc *smc, struct fddi_addr *addr, int can) | |||
1152 | */ | 1152 | */ |
1153 | if (can & 0x80) { | 1153 | if (can & 0x80) { |
1154 | if (smc->hw.fp.smt_slots_used >= SMT_MAX_MULTI) { | 1154 | if (smc->hw.fp.smt_slots_used >= SMT_MAX_MULTI) { |
1155 | return(1) ; | 1155 | return 1; |
1156 | } | 1156 | } |
1157 | } | 1157 | } |
1158 | else { | 1158 | else { |
1159 | if (smc->hw.fp.os_slots_used >= FPMAX_MULTICAST-SMT_MAX_MULTI) { | 1159 | if (smc->hw.fp.os_slots_used >= FPMAX_MULTICAST-SMT_MAX_MULTI) { |
1160 | return(1) ; | 1160 | return 1; |
1161 | } | 1161 | } |
1162 | } | 1162 | } |
1163 | 1163 | ||
@@ -1165,7 +1165,7 @@ int mac_add_multicast(struct s_smc *smc, struct fddi_addr *addr, int can) | |||
1165 | * find empty slot | 1165 | * find empty slot |
1166 | */ | 1166 | */ |
1167 | if (!(tb = mac_get_mc_table(smc,addr,&own,0,can & ~0x80))) | 1167 | if (!(tb = mac_get_mc_table(smc,addr,&own,0,can & ~0x80))) |
1168 | return(1) ; | 1168 | return 1; |
1169 | tb->n++ ; | 1169 | tb->n++ ; |
1170 | tb->a = own ; | 1170 | tb->a = own ; |
1171 | tb->perm = (can & 0x80) ? 1 : 0 ; | 1171 | tb->perm = (can & 0x80) ? 1 : 0 ; |
@@ -1175,7 +1175,7 @@ int mac_add_multicast(struct s_smc *smc, struct fddi_addr *addr, int can) | |||
1175 | else | 1175 | else |
1176 | smc->hw.fp.os_slots_used++ ; | 1176 | smc->hw.fp.os_slots_used++ ; |
1177 | 1177 | ||
1178 | return(0) ; | 1178 | return 0; |
1179 | } | 1179 | } |
1180 | 1180 | ||
1181 | /* | 1181 | /* |
diff --git a/drivers/net/skfp/hwmtm.c b/drivers/net/skfp/hwmtm.c index d322f1b702ac..af5a755e269d 100644 --- a/drivers/net/skfp/hwmtm.c +++ b/drivers/net/skfp/hwmtm.c | |||
@@ -232,16 +232,16 @@ u_int mac_drv_check_space(void) | |||
232 | #ifdef COMMON_MB_POOL | 232 | #ifdef COMMON_MB_POOL |
233 | call_count++ ; | 233 | call_count++ ; |
234 | if (call_count == 1) { | 234 | if (call_count == 1) { |
235 | return(EXT_VIRT_MEM) ; | 235 | return EXT_VIRT_MEM; |
236 | } | 236 | } |
237 | else { | 237 | else { |
238 | return(EXT_VIRT_MEM_2) ; | 238 | return EXT_VIRT_MEM_2; |
239 | } | 239 | } |
240 | #else | 240 | #else |
241 | return (EXT_VIRT_MEM) ; | 241 | return EXT_VIRT_MEM; |
242 | #endif | 242 | #endif |
243 | #else | 243 | #else |
244 | return (0) ; | 244 | return 0; |
245 | #endif | 245 | #endif |
246 | } | 246 | } |
247 | 247 | ||
@@ -271,7 +271,7 @@ int mac_drv_init(struct s_smc *smc) | |||
271 | if (!(smc->os.hwm.descr_p = (union s_fp_descr volatile *) | 271 | if (!(smc->os.hwm.descr_p = (union s_fp_descr volatile *) |
272 | mac_drv_get_desc_mem(smc,(u_int) | 272 | mac_drv_get_desc_mem(smc,(u_int) |
273 | (RXD_TXD_COUNT+1)*sizeof(struct s_smt_fp_txd)))) { | 273 | (RXD_TXD_COUNT+1)*sizeof(struct s_smt_fp_txd)))) { |
274 | return(1) ; /* no space the hwm modul can't work */ | 274 | return 1; /* no space the hwm modul can't work */ |
275 | } | 275 | } |
276 | 276 | ||
277 | /* | 277 | /* |
@@ -283,18 +283,18 @@ int mac_drv_init(struct s_smc *smc) | |||
283 | #ifndef COMMON_MB_POOL | 283 | #ifndef COMMON_MB_POOL |
284 | if (!(smc->os.hwm.mbuf_pool.mb_start = (SMbuf *) mac_drv_get_space(smc, | 284 | if (!(smc->os.hwm.mbuf_pool.mb_start = (SMbuf *) mac_drv_get_space(smc, |
285 | MAX_MBUF*sizeof(SMbuf)))) { | 285 | MAX_MBUF*sizeof(SMbuf)))) { |
286 | return(1) ; /* no space the hwm modul can't work */ | 286 | return 1; /* no space the hwm modul can't work */ |
287 | } | 287 | } |
288 | #else | 288 | #else |
289 | if (!mb_start) { | 289 | if (!mb_start) { |
290 | if (!(mb_start = (SMbuf *) mac_drv_get_space(smc, | 290 | if (!(mb_start = (SMbuf *) mac_drv_get_space(smc, |
291 | MAX_MBUF*sizeof(SMbuf)))) { | 291 | MAX_MBUF*sizeof(SMbuf)))) { |
292 | return(1) ; /* no space the hwm modul can't work */ | 292 | return 1; /* no space the hwm modul can't work */ |
293 | } | 293 | } |
294 | } | 294 | } |
295 | #endif | 295 | #endif |
296 | #endif | 296 | #endif |
297 | return (0) ; | 297 | return 0; |
298 | } | 298 | } |
299 | 299 | ||
300 | /* | 300 | /* |
@@ -349,7 +349,7 @@ static u_long init_descr_ring(struct s_smc *smc, | |||
349 | DRV_BUF_FLUSH(&d1->r,DDI_DMA_SYNC_FORDEV) ; | 349 | DRV_BUF_FLUSH(&d1->r,DDI_DMA_SYNC_FORDEV) ; |
350 | d1++; | 350 | d1++; |
351 | } | 351 | } |
352 | return(phys) ; | 352 | return phys; |
353 | } | 353 | } |
354 | 354 | ||
355 | static void init_txd_ring(struct s_smc *smc) | 355 | static void init_txd_ring(struct s_smc *smc) |
@@ -502,7 +502,7 @@ SMbuf *smt_get_mbuf(struct s_smc *smc) | |||
502 | mb->sm_use_count = 1 ; | 502 | mb->sm_use_count = 1 ; |
503 | } | 503 | } |
504 | DB_GEN("get SMbuf: mb = %x",(void *)mb,0,3) ; | 504 | DB_GEN("get SMbuf: mb = %x",(void *)mb,0,3) ; |
505 | return (mb) ; /* May be NULL */ | 505 | return mb; /* May be NULL */ |
506 | } | 506 | } |
507 | 507 | ||
508 | void smt_free_mbuf(struct s_smc *smc, SMbuf *mb) | 508 | void smt_free_mbuf(struct s_smc *smc, SMbuf *mb) |
@@ -621,7 +621,7 @@ static u_long repair_txd_ring(struct s_smc *smc, struct s_smt_tx_queue *queue) | |||
621 | t = t->txd_next ; | 621 | t = t->txd_next ; |
622 | tx_used-- ; | 622 | tx_used-- ; |
623 | } | 623 | } |
624 | return(phys) ; | 624 | return phys; |
625 | } | 625 | } |
626 | 626 | ||
627 | /* | 627 | /* |
@@ -673,7 +673,7 @@ static u_long repair_rxd_ring(struct s_smc *smc, struct s_smt_rx_queue *queue) | |||
673 | r = r->rxd_next ; | 673 | r = r->rxd_next ; |
674 | rx_used-- ; | 674 | rx_used-- ; |
675 | } | 675 | } |
676 | return(phys) ; | 676 | return phys; |
677 | } | 677 | } |
678 | 678 | ||
679 | 679 | ||
@@ -1595,7 +1595,7 @@ int hwm_tx_init(struct s_smc *smc, u_char fc, int frag_count, int frame_len, | |||
1595 | } | 1595 | } |
1596 | DB_TX("frame_status = %x",frame_status,0,3) ; | 1596 | DB_TX("frame_status = %x",frame_status,0,3) ; |
1597 | NDD_TRACE("THiE",frame_status,smc->os.hwm.tx_p->tx_free,0) ; | 1597 | NDD_TRACE("THiE",frame_status,smc->os.hwm.tx_p->tx_free,0) ; |
1598 | return(frame_status) ; | 1598 | return frame_status; |
1599 | } | 1599 | } |
1600 | 1600 | ||
1601 | /* | 1601 | /* |
@@ -1764,7 +1764,7 @@ static SMbuf *get_llc_rx(struct s_smc *smc) | |||
1764 | smc->os.hwm.llc_rx_pipe = mb->sm_next ; | 1764 | smc->os.hwm.llc_rx_pipe = mb->sm_next ; |
1765 | } | 1765 | } |
1766 | DB_GEN("get_llc_rx: mb = 0x%x",(void *)mb,0,4) ; | 1766 | DB_GEN("get_llc_rx: mb = 0x%x",(void *)mb,0,4) ; |
1767 | return(mb) ; | 1767 | return mb; |
1768 | } | 1768 | } |
1769 | 1769 | ||
1770 | /* | 1770 | /* |
@@ -1797,7 +1797,7 @@ static SMbuf *get_txd_mb(struct s_smc *smc) | |||
1797 | smc->os.hwm.txd_tx_pipe = mb->sm_next ; | 1797 | smc->os.hwm.txd_tx_pipe = mb->sm_next ; |
1798 | } | 1798 | } |
1799 | DB_GEN("get_txd_mb: mb = 0x%x",(void *)mb,0,4) ; | 1799 | DB_GEN("get_txd_mb: mb = 0x%x",(void *)mb,0,4) ; |
1800 | return(mb) ; | 1800 | return mb; |
1801 | } | 1801 | } |
1802 | 1802 | ||
1803 | /* | 1803 | /* |
diff --git a/drivers/net/skfp/hwt.c b/drivers/net/skfp/hwt.c index 053151468f93..e6baa53307c7 100644 --- a/drivers/net/skfp/hwt.c +++ b/drivers/net/skfp/hwt.c | |||
@@ -179,7 +179,7 @@ u_long hwt_read(struct s_smc *smc) | |||
179 | else | 179 | else |
180 | smc->hw.t_stop = smc->hw.t_start - tr ; | 180 | smc->hw.t_stop = smc->hw.t_start - tr ; |
181 | } | 181 | } |
182 | return (smc->hw.t_stop) ; | 182 | return smc->hw.t_stop; |
183 | } | 183 | } |
184 | 184 | ||
185 | #ifdef PCI | 185 | #ifdef PCI |
@@ -208,7 +208,7 @@ u_long hwt_quick_read(struct s_smc *smc) | |||
208 | outpw(ADDR(B2_TI_CRTL), TIM_START) ; | 208 | outpw(ADDR(B2_TI_CRTL), TIM_START) ; |
209 | outpd(ADDR(B2_TI_INI),interval) ; | 209 | outpd(ADDR(B2_TI_INI),interval) ; |
210 | 210 | ||
211 | return(time) ; | 211 | return time; |
212 | } | 212 | } |
213 | 213 | ||
214 | /************************ | 214 | /************************ |
diff --git a/drivers/net/skfp/pcmplc.c b/drivers/net/skfp/pcmplc.c index ba45bc794d77..112d35b1bf0e 100644 --- a/drivers/net/skfp/pcmplc.c +++ b/drivers/net/skfp/pcmplc.c | |||
@@ -504,7 +504,7 @@ int sm_pm_get_ls(struct s_smc *smc, int phy) | |||
504 | 504 | ||
505 | #ifdef CONCENTRATOR | 505 | #ifdef CONCENTRATOR |
506 | if (!plc_is_installed(smc,phy)) | 506 | if (!plc_is_installed(smc,phy)) |
507 | return(PC_QLS) ; | 507 | return PC_QLS; |
508 | #endif | 508 | #endif |
509 | 509 | ||
510 | state = inpw(PLC(phy,PL_STATUS_A)) & PL_LINE_ST ; | 510 | state = inpw(PLC(phy,PL_STATUS_A)) & PL_LINE_ST ; |
@@ -528,7 +528,7 @@ int sm_pm_get_ls(struct s_smc *smc, int phy) | |||
528 | default : | 528 | default : |
529 | state = PC_LS_NONE ; | 529 | state = PC_LS_NONE ; |
530 | } | 530 | } |
531 | return(state) ; | 531 | return state; |
532 | } | 532 | } |
533 | 533 | ||
534 | static int plc_send_bits(struct s_smc *smc, struct s_phy *phy, int len) | 534 | static int plc_send_bits(struct s_smc *smc, struct s_phy *phy, int len) |
@@ -547,7 +547,7 @@ static int plc_send_bits(struct s_smc *smc, struct s_phy *phy, int len) | |||
547 | #if 0 | 547 | #if 0 |
548 | printf("PL_PCM_SIGNAL is set\n") ; | 548 | printf("PL_PCM_SIGNAL is set\n") ; |
549 | #endif | 549 | #endif |
550 | return(1) ; | 550 | return 1; |
551 | } | 551 | } |
552 | /* write bit[n] & length = 1 to regs */ | 552 | /* write bit[n] & length = 1 to regs */ |
553 | outpw(PLC(np,PL_VECTOR_LEN),len-1) ; /* len=nr-1 */ | 553 | outpw(PLC(np,PL_VECTOR_LEN),len-1) ; /* len=nr-1 */ |
@@ -562,7 +562,7 @@ static int plc_send_bits(struct s_smc *smc, struct s_phy *phy, int len) | |||
562 | printf("SIGNALING bit %d .. %d\n",phy->bitn,phy->bitn+len-1) ; | 562 | printf("SIGNALING bit %d .. %d\n",phy->bitn,phy->bitn+len-1) ; |
563 | #endif | 563 | #endif |
564 | #endif | 564 | #endif |
565 | return(0) ; | 565 | return 0; |
566 | } | 566 | } |
567 | 567 | ||
568 | /* | 568 | /* |
@@ -1590,12 +1590,12 @@ int pcm_status_twisted(struct s_smc *smc) | |||
1590 | { | 1590 | { |
1591 | int twist = 0 ; | 1591 | int twist = 0 ; |
1592 | if (smc->s.sas != SMT_DAS) | 1592 | if (smc->s.sas != SMT_DAS) |
1593 | return(0) ; | 1593 | return 0; |
1594 | if (smc->y[PA].twisted && (smc->y[PA].mib->fddiPORTPCMState == PC8_ACTIVE)) | 1594 | if (smc->y[PA].twisted && (smc->y[PA].mib->fddiPORTPCMState == PC8_ACTIVE)) |
1595 | twist |= 1 ; | 1595 | twist |= 1 ; |
1596 | if (smc->y[PB].twisted && (smc->y[PB].mib->fddiPORTPCMState == PC8_ACTIVE)) | 1596 | if (smc->y[PB].twisted && (smc->y[PB].mib->fddiPORTPCMState == PC8_ACTIVE)) |
1597 | twist |= 2 ; | 1597 | twist |= 2 ; |
1598 | return(twist) ; | 1598 | return twist; |
1599 | } | 1599 | } |
1600 | 1600 | ||
1601 | /* | 1601 | /* |
@@ -1636,9 +1636,9 @@ int pcm_rooted_station(struct s_smc *smc) | |||
1636 | for (n = 0 ; n < NUMPHYS ; n++) { | 1636 | for (n = 0 ; n < NUMPHYS ; n++) { |
1637 | if (smc->y[n].mib->fddiPORTPCMState == PC8_ACTIVE && | 1637 | if (smc->y[n].mib->fddiPORTPCMState == PC8_ACTIVE && |
1638 | smc->y[n].mib->fddiPORTNeighborType == TM) | 1638 | smc->y[n].mib->fddiPORTNeighborType == TM) |
1639 | return(0) ; | 1639 | return 0; |
1640 | } | 1640 | } |
1641 | return(1) ; | 1641 | return 1; |
1642 | } | 1642 | } |
1643 | 1643 | ||
1644 | /* | 1644 | /* |
@@ -1915,7 +1915,7 @@ int get_pcm_state(struct s_smc *smc, int np) | |||
1915 | case PL_PC9 : pcs = PC_MAINT ; break ; | 1915 | case PL_PC9 : pcs = PC_MAINT ; break ; |
1916 | default : pcs = PC_DISABLE ; break ; | 1916 | default : pcs = PC_DISABLE ; break ; |
1917 | } | 1917 | } |
1918 | return(pcs) ; | 1918 | return pcs; |
1919 | } | 1919 | } |
1920 | 1920 | ||
1921 | char *get_linestate(struct s_smc *smc, int np) | 1921 | char *get_linestate(struct s_smc *smc, int np) |
@@ -1937,7 +1937,7 @@ char *get_linestate(struct s_smc *smc, int np) | |||
1937 | default: ls = "unknown" ; break ; | 1937 | default: ls = "unknown" ; break ; |
1938 | #endif | 1938 | #endif |
1939 | } | 1939 | } |
1940 | return(ls) ; | 1940 | return ls; |
1941 | } | 1941 | } |
1942 | 1942 | ||
1943 | char *get_pcmstate(struct s_smc *smc, int np) | 1943 | char *get_pcmstate(struct s_smc *smc, int np) |
@@ -1959,7 +1959,7 @@ char *get_pcmstate(struct s_smc *smc, int np) | |||
1959 | case PL_PC9 : pcs = "MAINT" ; break ; | 1959 | case PL_PC9 : pcs = "MAINT" ; break ; |
1960 | default : pcs = "UNKNOWN" ; break ; | 1960 | default : pcs = "UNKNOWN" ; break ; |
1961 | } | 1961 | } |
1962 | return(pcs) ; | 1962 | return pcs; |
1963 | } | 1963 | } |
1964 | 1964 | ||
1965 | void list_phy(struct s_smc *smc) | 1965 | void list_phy(struct s_smc *smc) |
diff --git a/drivers/net/skfp/pmf.c b/drivers/net/skfp/pmf.c index a320fdb3727d..9ac4665d7411 100644 --- a/drivers/net/skfp/pmf.c +++ b/drivers/net/skfp/pmf.c | |||
@@ -328,7 +328,7 @@ static SMbuf *smt_build_pmf_response(struct s_smc *smc, struct smt_header *req, | |||
328 | * build SMT header | 328 | * build SMT header |
329 | */ | 329 | */ |
330 | if (!(mb = smt_get_mbuf(smc))) | 330 | if (!(mb = smt_get_mbuf(smc))) |
331 | return(mb) ; | 331 | return mb; |
332 | 332 | ||
333 | smt = smtod(mb, struct smt_header *) ; | 333 | smt = smtod(mb, struct smt_header *) ; |
334 | smt->smt_dest = req->smt_source ; /* DA == source of request */ | 334 | smt->smt_dest = req->smt_source ; /* DA == source of request */ |
@@ -493,7 +493,7 @@ static SMbuf *smt_build_pmf_response(struct s_smc *smc, struct smt_header *req, | |||
493 | smt_add_para(smc,&set_pcon,(u_short) SMT_P1035,0,0) ; | 493 | smt_add_para(smc,&set_pcon,(u_short) SMT_P1035,0,0) ; |
494 | smt_add_para(smc,&set_pcon,(u_short) SMT_P1036,0,0) ; | 494 | smt_add_para(smc,&set_pcon,(u_short) SMT_P1036,0,0) ; |
495 | } | 495 | } |
496 | return(mb) ; | 496 | return mb; |
497 | } | 497 | } |
498 | 498 | ||
499 | static int smt_authorize(struct s_smc *smc, struct smt_header *sm) | 499 | static int smt_authorize(struct s_smc *smc, struct smt_header *sm) |
@@ -511,7 +511,7 @@ static int smt_authorize(struct s_smc *smc, struct smt_header *sm) | |||
511 | if (i != 8) { | 511 | if (i != 8) { |
512 | if (memcmp((char *) &sm->smt_sid, | 512 | if (memcmp((char *) &sm->smt_sid, |
513 | (char *) &smc->mib.fddiPRPMFStation,8)) | 513 | (char *) &smc->mib.fddiPRPMFStation,8)) |
514 | return(1) ; | 514 | return 1; |
515 | } | 515 | } |
516 | /* | 516 | /* |
517 | * check authoriziation parameter if passwd not zero | 517 | * check authoriziation parameter if passwd not zero |
@@ -522,13 +522,13 @@ static int smt_authorize(struct s_smc *smc, struct smt_header *sm) | |||
522 | if (i != 8) { | 522 | if (i != 8) { |
523 | pa = (struct smt_para *) sm_to_para(smc,sm,SMT_P_AUTHOR) ; | 523 | pa = (struct smt_para *) sm_to_para(smc,sm,SMT_P_AUTHOR) ; |
524 | if (!pa) | 524 | if (!pa) |
525 | return(1) ; | 525 | return 1; |
526 | if (pa->p_len != 8) | 526 | if (pa->p_len != 8) |
527 | return(1) ; | 527 | return 1; |
528 | if (memcmp((char *)(pa+1),(char *)smc->mib.fddiPRPMFPasswd,8)) | 528 | if (memcmp((char *)(pa+1),(char *)smc->mib.fddiPRPMFPasswd,8)) |
529 | return(1) ; | 529 | return 1; |
530 | } | 530 | } |
531 | return(0) ; | 531 | return 0; |
532 | } | 532 | } |
533 | 533 | ||
534 | static int smt_check_set_count(struct s_smc *smc, struct smt_header *sm) | 534 | static int smt_check_set_count(struct s_smc *smc, struct smt_header *sm) |
@@ -542,9 +542,9 @@ static int smt_check_set_count(struct s_smc *smc, struct smt_header *sm) | |||
542 | if ((smc->mib.fddiSMTSetCount.count != sc->count) || | 542 | if ((smc->mib.fddiSMTSetCount.count != sc->count) || |
543 | memcmp((char *) smc->mib.fddiSMTSetCount.timestamp, | 543 | memcmp((char *) smc->mib.fddiSMTSetCount.timestamp, |
544 | (char *)sc->timestamp,8)) | 544 | (char *)sc->timestamp,8)) |
545 | return(1) ; | 545 | return 1; |
546 | } | 546 | } |
547 | return(0) ; | 547 | return 0; |
548 | } | 548 | } |
549 | 549 | ||
550 | void smt_add_para(struct s_smc *smc, struct s_pcon *pcon, u_short para, | 550 | void smt_add_para(struct s_smc *smc, struct s_pcon *pcon, u_short para, |
@@ -1109,7 +1109,7 @@ static int smt_set_para(struct s_smc *smc, struct smt_para *pa, int index, | |||
1109 | break ; | 1109 | break ; |
1110 | case 0x2000 : | 1110 | case 0x2000 : |
1111 | if (mac < 0 || mac >= NUMMACS) { | 1111 | if (mac < 0 || mac >= NUMMACS) { |
1112 | return(SMT_RDF_NOPARAM) ; | 1112 | return SMT_RDF_NOPARAM; |
1113 | } | 1113 | } |
1114 | mib_m = &smc->mib.m[mac] ; | 1114 | mib_m = &smc->mib.m[mac] ; |
1115 | mib_addr = (char *) mib_m ; | 1115 | mib_addr = (char *) mib_m ; |
@@ -1118,7 +1118,7 @@ static int smt_set_para(struct s_smc *smc, struct smt_para *pa, int index, | |||
1118 | break ; | 1118 | break ; |
1119 | case 0x3000 : | 1119 | case 0x3000 : |
1120 | if (path < 0 || path >= NUMPATHS) { | 1120 | if (path < 0 || path >= NUMPATHS) { |
1121 | return(SMT_RDF_NOPARAM) ; | 1121 | return SMT_RDF_NOPARAM; |
1122 | } | 1122 | } |
1123 | mib_a = &smc->mib.a[path] ; | 1123 | mib_a = &smc->mib.a[path] ; |
1124 | mib_addr = (char *) mib_a ; | 1124 | mib_addr = (char *) mib_a ; |
@@ -1127,7 +1127,7 @@ static int smt_set_para(struct s_smc *smc, struct smt_para *pa, int index, | |||
1127 | break ; | 1127 | break ; |
1128 | case 0x4000 : | 1128 | case 0x4000 : |
1129 | if (port < 0 || port >= smt_mib_phys(smc)) { | 1129 | if (port < 0 || port >= smt_mib_phys(smc)) { |
1130 | return(SMT_RDF_NOPARAM) ; | 1130 | return SMT_RDF_NOPARAM; |
1131 | } | 1131 | } |
1132 | mib_p = &smc->mib.p[port_to_mib(smc,port)] ; | 1132 | mib_p = &smc->mib.p[port_to_mib(smc,port)] ; |
1133 | mib_addr = (char *) mib_p ; | 1133 | mib_addr = (char *) mib_p ; |
@@ -1151,22 +1151,20 @@ static int smt_set_para(struct s_smc *smc, struct smt_para *pa, int index, | |||
1151 | case SMT_P10F9 : | 1151 | case SMT_P10F9 : |
1152 | #endif | 1152 | #endif |
1153 | case SMT_P20F1 : | 1153 | case SMT_P20F1 : |
1154 | if (!local) { | 1154 | if (!local) |
1155 | return(SMT_RDF_NOPARAM) ; | 1155 | return SMT_RDF_NOPARAM; |
1156 | } | ||
1157 | break ; | 1156 | break ; |
1158 | } | 1157 | } |
1159 | pt = smt_get_ptab(pa->p_type) ; | 1158 | pt = smt_get_ptab(pa->p_type) ; |
1160 | if (!pt) { | 1159 | if (!pt) |
1161 | return( (pa->p_type & 0xff00) ? SMT_RDF_NOPARAM : | 1160 | return (pa->p_type & 0xff00) ? SMT_RDF_NOPARAM : |
1162 | SMT_RDF_ILLEGAL ) ; | 1161 | SMT_RDF_ILLEGAL; |
1163 | } | ||
1164 | switch (pt->p_access) { | 1162 | switch (pt->p_access) { |
1165 | case AC_GR : | 1163 | case AC_GR : |
1166 | case AC_S : | 1164 | case AC_S : |
1167 | break ; | 1165 | break ; |
1168 | default : | 1166 | default : |
1169 | return(SMT_RDF_ILLEGAL) ; | 1167 | return SMT_RDF_ILLEGAL; |
1170 | } | 1168 | } |
1171 | to = mib_addr + pt->p_offset ; | 1169 | to = mib_addr + pt->p_offset ; |
1172 | swap = pt->p_swap ; /* pointer to swap string */ | 1170 | swap = pt->p_swap ; /* pointer to swap string */ |
@@ -1292,7 +1290,7 @@ static int smt_set_para(struct s_smc *smc, struct smt_para *pa, int index, | |||
1292 | break ; | 1290 | break ; |
1293 | default : | 1291 | default : |
1294 | SMT_PANIC(smc,SMT_E0120, SMT_E0120_MSG) ; | 1292 | SMT_PANIC(smc,SMT_E0120, SMT_E0120_MSG) ; |
1295 | return(SMT_RDF_ILLEGAL) ; | 1293 | return SMT_RDF_ILLEGAL; |
1296 | } | 1294 | } |
1297 | } | 1295 | } |
1298 | /* | 1296 | /* |
@@ -1501,15 +1499,15 @@ change_mac_para: | |||
1501 | default : | 1499 | default : |
1502 | break ; | 1500 | break ; |
1503 | } | 1501 | } |
1504 | return(0) ; | 1502 | return 0; |
1505 | 1503 | ||
1506 | val_error: | 1504 | val_error: |
1507 | /* parameter value in frame is out of range */ | 1505 | /* parameter value in frame is out of range */ |
1508 | return(SMT_RDF_RANGE) ; | 1506 | return SMT_RDF_RANGE; |
1509 | 1507 | ||
1510 | len_error: | 1508 | len_error: |
1511 | /* parameter value in frame is too short */ | 1509 | /* parameter value in frame is too short */ |
1512 | return(SMT_RDF_LENGTH) ; | 1510 | return SMT_RDF_LENGTH; |
1513 | 1511 | ||
1514 | #if 0 | 1512 | #if 0 |
1515 | no_author_error: | 1513 | no_author_error: |
@@ -1518,7 +1516,7 @@ no_author_error: | |||
1518 | * because SBA denied is not a valid return code in the | 1516 | * because SBA denied is not a valid return code in the |
1519 | * PMF protocol. | 1517 | * PMF protocol. |
1520 | */ | 1518 | */ |
1521 | return(SMT_RDF_AUTHOR) ; | 1519 | return SMT_RDF_AUTHOR; |
1522 | #endif | 1520 | #endif |
1523 | } | 1521 | } |
1524 | 1522 | ||
@@ -1527,7 +1525,7 @@ static const struct s_p_tab *smt_get_ptab(u_short para) | |||
1527 | const struct s_p_tab *pt ; | 1525 | const struct s_p_tab *pt ; |
1528 | for (pt = p_tab ; pt->p_num && pt->p_num != para ; pt++) | 1526 | for (pt = p_tab ; pt->p_num && pt->p_num != para ; pt++) |
1529 | ; | 1527 | ; |
1530 | return(pt->p_num ? pt : NULL) ; | 1528 | return pt->p_num ? pt : NULL; |
1531 | } | 1529 | } |
1532 | 1530 | ||
1533 | static int smt_mib_phys(struct s_smc *smc) | 1531 | static int smt_mib_phys(struct s_smc *smc) |
@@ -1535,11 +1533,11 @@ static int smt_mib_phys(struct s_smc *smc) | |||
1535 | #ifdef CONCENTRATOR | 1533 | #ifdef CONCENTRATOR |
1536 | SK_UNUSED(smc) ; | 1534 | SK_UNUSED(smc) ; |
1537 | 1535 | ||
1538 | return(NUMPHYS) ; | 1536 | return NUMPHYS; |
1539 | #else | 1537 | #else |
1540 | if (smc->s.sas == SMT_SAS) | 1538 | if (smc->s.sas == SMT_SAS) |
1541 | return(1) ; | 1539 | return 1; |
1542 | return(NUMPHYS) ; | 1540 | return NUMPHYS; |
1543 | #endif | 1541 | #endif |
1544 | } | 1542 | } |
1545 | 1543 | ||
@@ -1548,11 +1546,11 @@ static int port_to_mib(struct s_smc *smc, int p) | |||
1548 | #ifdef CONCENTRATOR | 1546 | #ifdef CONCENTRATOR |
1549 | SK_UNUSED(smc) ; | 1547 | SK_UNUSED(smc) ; |
1550 | 1548 | ||
1551 | return(p) ; | 1549 | return p; |
1552 | #else | 1550 | #else |
1553 | if (smc->s.sas == SMT_SAS) | 1551 | if (smc->s.sas == SMT_SAS) |
1554 | return(PS) ; | 1552 | return PS; |
1555 | return(p) ; | 1553 | return p; |
1556 | #endif | 1554 | #endif |
1557 | } | 1555 | } |
1558 | 1556 | ||
diff --git a/drivers/net/skfp/queue.c b/drivers/net/skfp/queue.c index 09adb3d68b7c..c1a0df455a59 100644 --- a/drivers/net/skfp/queue.c +++ b/drivers/net/skfp/queue.c | |||
@@ -128,7 +128,7 @@ u_short smt_online(struct s_smc *smc, int on) | |||
128 | { | 128 | { |
129 | queue_event(smc,EVENT_ECM,on ? EC_CONNECT : EC_DISCONNECT) ; | 129 | queue_event(smc,EVENT_ECM,on ? EC_CONNECT : EC_DISCONNECT) ; |
130 | ev_dispatcher(smc) ; | 130 | ev_dispatcher(smc) ; |
131 | return(smc->mib.fddiSMTCF_State) ; | 131 | return smc->mib.fddiSMTCF_State; |
132 | } | 132 | } |
133 | 133 | ||
134 | /* | 134 | /* |
diff --git a/drivers/net/skfp/skfddi.c b/drivers/net/skfp/skfddi.c index 8a12bd9d28ba..ba2e8339fe90 100644 --- a/drivers/net/skfp/skfddi.c +++ b/drivers/net/skfp/skfddi.c | |||
@@ -440,7 +440,7 @@ static int skfp_driver_init(struct net_device *dev) | |||
440 | 440 | ||
441 | smt_reset_defaults(smc, 0); | 441 | smt_reset_defaults(smc, 0); |
442 | 442 | ||
443 | return (0); | 443 | return 0; |
444 | 444 | ||
445 | fail: | 445 | fail: |
446 | if (bp->SharedMemAddr) { | 446 | if (bp->SharedMemAddr) { |
@@ -516,7 +516,7 @@ static int skfp_open(struct net_device *dev) | |||
516 | mac_drv_rx_mode(smc, RX_DISABLE_PROMISC); | 516 | mac_drv_rx_mode(smc, RX_DISABLE_PROMISC); |
517 | 517 | ||
518 | netif_start_queue(dev); | 518 | netif_start_queue(dev); |
519 | return (0); | 519 | return 0; |
520 | } // skfp_open | 520 | } // skfp_open |
521 | 521 | ||
522 | 522 | ||
@@ -565,7 +565,7 @@ static int skfp_close(struct net_device *dev) | |||
565 | skb_queue_purge(&bp->SendSkbQueue); | 565 | skb_queue_purge(&bp->SendSkbQueue); |
566 | bp->QueueSkb = MAX_TX_QUEUE_LEN; | 566 | bp->QueueSkb = MAX_TX_QUEUE_LEN; |
567 | 567 | ||
568 | return (0); | 568 | return 0; |
569 | } // skfp_close | 569 | } // skfp_close |
570 | 570 | ||
571 | 571 | ||
@@ -794,7 +794,7 @@ static struct net_device_stats *skfp_ctl_get_stats(struct net_device *dev) | |||
794 | bp->stats.port_lem_cts[1] = bp->cmd_rsp_virt->cntrs_get.cntrs.link_errors[1].ls; | 794 | bp->stats.port_lem_cts[1] = bp->cmd_rsp_virt->cntrs_get.cntrs.link_errors[1].ls; |
795 | 795 | ||
796 | #endif | 796 | #endif |
797 | return ((struct net_device_stats *) &bp->os.MacStat); | 797 | return (struct net_device_stats *)&bp->os.MacStat; |
798 | } // ctl_get_stat | 798 | } // ctl_get_stat |
799 | 799 | ||
800 | 800 | ||
@@ -932,7 +932,7 @@ static int skfp_ctl_set_mac_address(struct net_device *dev, void *addr) | |||
932 | ResetAdapter(smc); | 932 | ResetAdapter(smc); |
933 | spin_unlock_irqrestore(&bp->DriverLock, Flags); | 933 | spin_unlock_irqrestore(&bp->DriverLock, Flags); |
934 | 934 | ||
935 | return (0); /* always return zero */ | 935 | return 0; /* always return zero */ |
936 | } // skfp_ctl_set_mac_address | 936 | } // skfp_ctl_set_mac_address |
937 | 937 | ||
938 | 938 | ||
@@ -1313,7 +1313,7 @@ void *mac_drv_get_space(struct s_smc *smc, unsigned int size) | |||
1313 | 1313 | ||
1314 | if ((smc->os.SharedMemHeap + size) > smc->os.SharedMemSize) { | 1314 | if ((smc->os.SharedMemHeap + size) > smc->os.SharedMemSize) { |
1315 | printk("Unexpected SMT memory size requested: %d\n", size); | 1315 | printk("Unexpected SMT memory size requested: %d\n", size); |
1316 | return (NULL); | 1316 | return NULL; |
1317 | } | 1317 | } |
1318 | smc->os.SharedMemHeap += size; // Move heap pointer. | 1318 | smc->os.SharedMemHeap += size; // Move heap pointer. |
1319 | 1319 | ||
@@ -1322,7 +1322,7 @@ void *mac_drv_get_space(struct s_smc *smc, unsigned int size) | |||
1322 | pr_debug("bus addr: %lx\n", (ulong) | 1322 | pr_debug("bus addr: %lx\n", (ulong) |
1323 | (smc->os.SharedMemDMA + | 1323 | (smc->os.SharedMemDMA + |
1324 | ((char *) virt - (char *)smc->os.SharedMemAddr))); | 1324 | ((char *) virt - (char *)smc->os.SharedMemAddr))); |
1325 | return (virt); | 1325 | return virt; |
1326 | } // mac_drv_get_space | 1326 | } // mac_drv_get_space |
1327 | 1327 | ||
1328 | 1328 | ||
@@ -1363,9 +1363,9 @@ void *mac_drv_get_desc_mem(struct s_smc *smc, unsigned int size) | |||
1363 | 1363 | ||
1364 | if (!mac_drv_get_space(smc, size)) { | 1364 | if (!mac_drv_get_space(smc, size)) { |
1365 | printk("fddi: Unable to align descriptor memory.\n"); | 1365 | printk("fddi: Unable to align descriptor memory.\n"); |
1366 | return (NULL); | 1366 | return NULL; |
1367 | } | 1367 | } |
1368 | return (virt + size); | 1368 | return virt + size; |
1369 | } // mac_drv_get_desc_mem | 1369 | } // mac_drv_get_desc_mem |
1370 | 1370 | ||
1371 | 1371 | ||
@@ -1384,8 +1384,8 @@ void *mac_drv_get_desc_mem(struct s_smc *smc, unsigned int size) | |||
1384 | ************************/ | 1384 | ************************/ |
1385 | unsigned long mac_drv_virt2phys(struct s_smc *smc, void *virt) | 1385 | unsigned long mac_drv_virt2phys(struct s_smc *smc, void *virt) |
1386 | { | 1386 | { |
1387 | return (smc->os.SharedMemDMA + | 1387 | return smc->os.SharedMemDMA + |
1388 | ((char *) virt - (char *)smc->os.SharedMemAddr)); | 1388 | ((char *) virt - (char *)smc->os.SharedMemAddr); |
1389 | } // mac_drv_virt2phys | 1389 | } // mac_drv_virt2phys |
1390 | 1390 | ||
1391 | 1391 | ||
@@ -1419,8 +1419,8 @@ unsigned long mac_drv_virt2phys(struct s_smc *smc, void *virt) | |||
1419 | ************************/ | 1419 | ************************/ |
1420 | u_long dma_master(struct s_smc * smc, void *virt, int len, int flag) | 1420 | u_long dma_master(struct s_smc * smc, void *virt, int len, int flag) |
1421 | { | 1421 | { |
1422 | return (smc->os.SharedMemDMA + | 1422 | return smc->os.SharedMemDMA + |
1423 | ((char *) virt - (char *)smc->os.SharedMemAddr)); | 1423 | ((char *) virt - (char *)smc->os.SharedMemAddr); |
1424 | } // dma_master | 1424 | } // dma_master |
1425 | 1425 | ||
1426 | 1426 | ||
@@ -1904,12 +1904,12 @@ int mac_drv_rx_init(struct s_smc *smc, int len, int fc, | |||
1904 | pr_debug("fddi: Discard invalid local SMT frame\n"); | 1904 | pr_debug("fddi: Discard invalid local SMT frame\n"); |
1905 | pr_debug(" len=%d, la_len=%d, (ULONG) look_ahead=%08lXh.\n", | 1905 | pr_debug(" len=%d, la_len=%d, (ULONG) look_ahead=%08lXh.\n", |
1906 | len, la_len, (unsigned long) look_ahead); | 1906 | len, la_len, (unsigned long) look_ahead); |
1907 | return (0); | 1907 | return 0; |
1908 | } | 1908 | } |
1909 | skb = alloc_skb(len + 3, GFP_ATOMIC); | 1909 | skb = alloc_skb(len + 3, GFP_ATOMIC); |
1910 | if (!skb) { | 1910 | if (!skb) { |
1911 | pr_debug("fddi: Local SMT: skb memory exhausted.\n"); | 1911 | pr_debug("fddi: Local SMT: skb memory exhausted.\n"); |
1912 | return (0); | 1912 | return 0; |
1913 | } | 1913 | } |
1914 | skb_reserve(skb, 3); | 1914 | skb_reserve(skb, 3); |
1915 | skb_put(skb, len); | 1915 | skb_put(skb, len); |
@@ -1919,7 +1919,7 @@ int mac_drv_rx_init(struct s_smc *smc, int len, int fc, | |||
1919 | skb->protocol = fddi_type_trans(skb, smc->os.dev); | 1919 | skb->protocol = fddi_type_trans(skb, smc->os.dev); |
1920 | netif_rx(skb); | 1920 | netif_rx(skb); |
1921 | 1921 | ||
1922 | return (0); | 1922 | return 0; |
1923 | } // mac_drv_rx_init | 1923 | } // mac_drv_rx_init |
1924 | 1924 | ||
1925 | 1925 | ||
diff --git a/drivers/net/skfp/smt.c b/drivers/net/skfp/smt.c index 6f35bb77595f..2d9941c045bc 100644 --- a/drivers/net/skfp/smt.c +++ b/drivers/net/skfp/smt.c | |||
@@ -127,22 +127,22 @@ static inline int is_my_addr(const struct s_smc *smc, | |||
127 | 127 | ||
128 | static inline int is_broadcast(const struct fddi_addr *addr) | 128 | static inline int is_broadcast(const struct fddi_addr *addr) |
129 | { | 129 | { |
130 | return(*(u_short *)(&addr->a[0]) == 0xffff && | 130 | return *(u_short *)(&addr->a[0]) == 0xffff && |
131 | *(u_short *)(&addr->a[2]) == 0xffff && | 131 | *(u_short *)(&addr->a[2]) == 0xffff && |
132 | *(u_short *)(&addr->a[4]) == 0xffff ) ; | 132 | *(u_short *)(&addr->a[4]) == 0xffff; |
133 | } | 133 | } |
134 | 134 | ||
135 | static inline int is_individual(const struct fddi_addr *addr) | 135 | static inline int is_individual(const struct fddi_addr *addr) |
136 | { | 136 | { |
137 | return(!(addr->a[0] & GROUP_ADDR)) ; | 137 | return !(addr->a[0] & GROUP_ADDR); |
138 | } | 138 | } |
139 | 139 | ||
140 | static inline int is_equal(const struct fddi_addr *addr1, | 140 | static inline int is_equal(const struct fddi_addr *addr1, |
141 | const struct fddi_addr *addr2) | 141 | const struct fddi_addr *addr2) |
142 | { | 142 | { |
143 | return(*(u_short *)(&addr1->a[0]) == *(u_short *)(&addr2->a[0]) && | 143 | return *(u_short *)(&addr1->a[0]) == *(u_short *)(&addr2->a[0]) && |
144 | *(u_short *)(&addr1->a[2]) == *(u_short *)(&addr2->a[2]) && | 144 | *(u_short *)(&addr1->a[2]) == *(u_short *)(&addr2->a[2]) && |
145 | *(u_short *)(&addr1->a[4]) == *(u_short *)(&addr2->a[4]) ) ; | 145 | *(u_short *)(&addr1->a[4]) == *(u_short *)(&addr2->a[4]); |
146 | } | 146 | } |
147 | 147 | ||
148 | /* | 148 | /* |
@@ -457,8 +457,8 @@ static int div_ratio(u_long upper, u_long lower) | |||
457 | else | 457 | else |
458 | upper <<= 16L ; | 458 | upper <<= 16L ; |
459 | if (!lower) | 459 | if (!lower) |
460 | return(0) ; | 460 | return 0; |
461 | return((int)(upper/lower)) ; | 461 | return (int)(upper/lower) ; |
462 | } | 462 | } |
463 | 463 | ||
464 | #ifndef SLIM_SMT | 464 | #ifndef SLIM_SMT |
@@ -1111,11 +1111,11 @@ SMbuf *smt_build_frame(struct s_smc *smc, int class, int type, | |||
1111 | 1111 | ||
1112 | #if 0 | 1112 | #if 0 |
1113 | if (!smc->r.sm_ma_avail) { | 1113 | if (!smc->r.sm_ma_avail) { |
1114 | return(0) ; | 1114 | return 0; |
1115 | } | 1115 | } |
1116 | #endif | 1116 | #endif |
1117 | if (!(mb = smt_get_mbuf(smc))) | 1117 | if (!(mb = smt_get_mbuf(smc))) |
1118 | return(mb) ; | 1118 | return mb; |
1119 | 1119 | ||
1120 | mb->sm_len = length ; | 1120 | mb->sm_len = length ; |
1121 | smt = smtod(mb, struct smt_header *) ; | 1121 | smt = smtod(mb, struct smt_header *) ; |
@@ -1136,7 +1136,7 @@ SMbuf *smt_build_frame(struct s_smc *smc, int class, int type, | |||
1136 | smt->smt_tid = smt_get_tid(smc) ; /* set transaction ID */ | 1136 | smt->smt_tid = smt_get_tid(smc) ; /* set transaction ID */ |
1137 | smt->smt_pad = 0 ; | 1137 | smt->smt_pad = 0 ; |
1138 | smt->smt_len = length - sizeof(struct smt_header) ; | 1138 | smt->smt_len = length - sizeof(struct smt_header) ; |
1139 | return(mb) ; | 1139 | return mb; |
1140 | } | 1140 | } |
1141 | 1141 | ||
1142 | static void smt_add_frame_len(SMbuf *mb, int len) | 1142 | static void smt_add_frame_len(SMbuf *mb, int len) |
@@ -1375,7 +1375,7 @@ static int smt_fill_path(struct s_smc *smc, struct smt_p_path *path) | |||
1375 | pd_mac = (struct smt_mac_rec *) phy ; | 1375 | pd_mac = (struct smt_mac_rec *) phy ; |
1376 | pd_mac->mac_addr = smc->mib.m[MAC0].fddiMACSMTAddress ; | 1376 | pd_mac->mac_addr = smc->mib.m[MAC0].fddiMACSMTAddress ; |
1377 | pd_mac->mac_resource_idx = mac_con_resource_index(smc,1) ; | 1377 | pd_mac->mac_resource_idx = mac_con_resource_index(smc,1) ; |
1378 | return(len) ; | 1378 | return len; |
1379 | } | 1379 | } |
1380 | 1380 | ||
1381 | /* | 1381 | /* |
@@ -1563,7 +1563,7 @@ u_long smt_get_tid(struct s_smc *smc) | |||
1563 | u_long tid ; | 1563 | u_long tid ; |
1564 | while ((tid = ++(smc->sm.smt_tid) ^ SMT_TID_MAGIC) == 0) | 1564 | while ((tid = ++(smc->sm.smt_tid) ^ SMT_TID_MAGIC) == 0) |
1565 | ; | 1565 | ; |
1566 | return(tid & 0x3fffffffL) ; | 1566 | return tid & 0x3fffffffL; |
1567 | } | 1567 | } |
1568 | 1568 | ||
1569 | 1569 | ||
@@ -1654,11 +1654,11 @@ int smt_check_para(struct s_smc *smc, struct smt_header *sm, | |||
1654 | while (*p) { | 1654 | while (*p) { |
1655 | if (!sm_to_para(smc,sm,(int) *p)) { | 1655 | if (!sm_to_para(smc,sm,(int) *p)) { |
1656 | DB_SMT("SMT: smt_check_para - missing para %x\n",*p,0); | 1656 | DB_SMT("SMT: smt_check_para - missing para %x\n",*p,0); |
1657 | return(-1) ; | 1657 | return -1; |
1658 | } | 1658 | } |
1659 | p++ ; | 1659 | p++ ; |
1660 | } | 1660 | } |
1661 | return(0) ; | 1661 | return 0; |
1662 | } | 1662 | } |
1663 | 1663 | ||
1664 | void *sm_to_para(struct s_smc *smc, struct smt_header *sm, int para) | 1664 | void *sm_to_para(struct s_smc *smc, struct smt_header *sm, int para) |
@@ -1687,7 +1687,7 @@ void *sm_to_para(struct s_smc *smc, struct smt_header *sm, int para) | |||
1687 | return NULL; | 1687 | return NULL; |
1688 | } | 1688 | } |
1689 | if (found) | 1689 | if (found) |
1690 | return(found) ; | 1690 | return found; |
1691 | } | 1691 | } |
1692 | return NULL; | 1692 | return NULL; |
1693 | } | 1693 | } |
@@ -1732,7 +1732,7 @@ char *addr_to_string(struct fddi_addr *addr) | |||
1732 | string[i * 3 + 2] = ':'; | 1732 | string[i * 3 + 2] = ':'; |
1733 | } | 1733 | } |
1734 | string[5 * 3 + 2] = 0; | 1734 | string[5 * 3 + 2] = 0; |
1735 | return(string); | 1735 | return string; |
1736 | } | 1736 | } |
1737 | #endif | 1737 | #endif |
1738 | 1738 | ||
@@ -1742,9 +1742,9 @@ int smt_ifconfig(int argc, char *argv[]) | |||
1742 | if (argc >= 2 && !strcmp(argv[0],"opt_bypass") && | 1742 | if (argc >= 2 && !strcmp(argv[0],"opt_bypass") && |
1743 | !strcmp(argv[1],"yes")) { | 1743 | !strcmp(argv[1],"yes")) { |
1744 | smc->mib.fddiSMTBypassPresent = 1 ; | 1744 | smc->mib.fddiSMTBypassPresent = 1 ; |
1745 | return(0) ; | 1745 | return 0; |
1746 | } | 1746 | } |
1747 | return(amdfddi_config(0,argc,argv)) ; | 1747 | return amdfddi_config(0, argc, argv); |
1748 | } | 1748 | } |
1749 | #endif | 1749 | #endif |
1750 | 1750 | ||
@@ -1756,9 +1756,9 @@ static int mac_index(struct s_smc *smc, int mac) | |||
1756 | SK_UNUSED(mac) ; | 1756 | SK_UNUSED(mac) ; |
1757 | #ifdef CONCENTRATOR | 1757 | #ifdef CONCENTRATOR |
1758 | SK_UNUSED(smc) ; | 1758 | SK_UNUSED(smc) ; |
1759 | return(NUMPHYS+1) ; | 1759 | return NUMPHYS + 1; |
1760 | #else | 1760 | #else |
1761 | return((smc->s.sas == SMT_SAS) ? 2 : 3) ; | 1761 | return (smc->s.sas == SMT_SAS) ? 2 : 3; |
1762 | #endif | 1762 | #endif |
1763 | } | 1763 | } |
1764 | 1764 | ||
@@ -1768,7 +1768,7 @@ static int mac_index(struct s_smc *smc, int mac) | |||
1768 | static int phy_index(struct s_smc *smc, int phy) | 1768 | static int phy_index(struct s_smc *smc, int phy) |
1769 | { | 1769 | { |
1770 | SK_UNUSED(smc) ; | 1770 | SK_UNUSED(smc) ; |
1771 | return(phy+1); | 1771 | return phy + 1; |
1772 | } | 1772 | } |
1773 | 1773 | ||
1774 | /* | 1774 | /* |
@@ -1779,19 +1779,19 @@ static int mac_con_resource_index(struct s_smc *smc, int mac) | |||
1779 | #ifdef CONCENTRATOR | 1779 | #ifdef CONCENTRATOR |
1780 | SK_UNUSED(smc) ; | 1780 | SK_UNUSED(smc) ; |
1781 | SK_UNUSED(mac) ; | 1781 | SK_UNUSED(mac) ; |
1782 | return(entity_to_index(smc,cem_get_downstream(smc,ENTITY_MAC))) ; | 1782 | return entity_to_index(smc, cem_get_downstream(smc, ENTITY_MAC)); |
1783 | #else | 1783 | #else |
1784 | SK_UNUSED(mac) ; | 1784 | SK_UNUSED(mac) ; |
1785 | switch (smc->mib.fddiSMTCF_State) { | 1785 | switch (smc->mib.fddiSMTCF_State) { |
1786 | case SC9_C_WRAP_A : | 1786 | case SC9_C_WRAP_A : |
1787 | case SC5_THRU_B : | 1787 | case SC5_THRU_B : |
1788 | case SC11_C_WRAP_S : | 1788 | case SC11_C_WRAP_S : |
1789 | return(1) ; | 1789 | return 1; |
1790 | case SC10_C_WRAP_B : | 1790 | case SC10_C_WRAP_B : |
1791 | case SC4_THRU_A : | 1791 | case SC4_THRU_A : |
1792 | return(2) ; | 1792 | return 2; |
1793 | } | 1793 | } |
1794 | return(smc->s.sas == SMT_SAS ? 2 : 3) ; | 1794 | return smc->s.sas == SMT_SAS ? 2 : 3; |
1795 | #endif | 1795 | #endif |
1796 | } | 1796 | } |
1797 | 1797 | ||
@@ -1801,21 +1801,21 @@ static int mac_con_resource_index(struct s_smc *smc, int mac) | |||
1801 | static int phy_con_resource_index(struct s_smc *smc, int phy) | 1801 | static int phy_con_resource_index(struct s_smc *smc, int phy) |
1802 | { | 1802 | { |
1803 | #ifdef CONCENTRATOR | 1803 | #ifdef CONCENTRATOR |
1804 | return(entity_to_index(smc,cem_get_downstream(smc,ENTITY_PHY(phy)))) ; | 1804 | return entity_to_index(smc, cem_get_downstream(smc, ENTITY_PHY(phy))) ; |
1805 | #else | 1805 | #else |
1806 | switch (smc->mib.fddiSMTCF_State) { | 1806 | switch (smc->mib.fddiSMTCF_State) { |
1807 | case SC9_C_WRAP_A : | 1807 | case SC9_C_WRAP_A : |
1808 | return(phy == PA ? 3 : 2) ; | 1808 | return phy == PA ? 3 : 2; |
1809 | case SC10_C_WRAP_B : | 1809 | case SC10_C_WRAP_B : |
1810 | return(phy == PA ? 1 : 3) ; | 1810 | return phy == PA ? 1 : 3; |
1811 | case SC4_THRU_A : | 1811 | case SC4_THRU_A : |
1812 | return(phy == PA ? 3 : 1) ; | 1812 | return phy == PA ? 3 : 1; |
1813 | case SC5_THRU_B : | 1813 | case SC5_THRU_B : |
1814 | return(phy == PA ? 2 : 3) ; | 1814 | return phy == PA ? 2 : 3; |
1815 | case SC11_C_WRAP_S : | 1815 | case SC11_C_WRAP_S : |
1816 | return(2) ; | 1816 | return 2; |
1817 | } | 1817 | } |
1818 | return(phy) ; | 1818 | return phy; |
1819 | #endif | 1819 | #endif |
1820 | } | 1820 | } |
1821 | 1821 | ||
@@ -1823,16 +1823,16 @@ static int phy_con_resource_index(struct s_smc *smc, int phy) | |||
1823 | static int entity_to_index(struct s_smc *smc, int e) | 1823 | static int entity_to_index(struct s_smc *smc, int e) |
1824 | { | 1824 | { |
1825 | if (e == ENTITY_MAC) | 1825 | if (e == ENTITY_MAC) |
1826 | return(mac_index(smc,1)) ; | 1826 | return mac_index(smc, 1); |
1827 | else | 1827 | else |
1828 | return(phy_index(smc,e - ENTITY_PHY(0))) ; | 1828 | return phy_index(smc, e - ENTITY_PHY(0)); |
1829 | } | 1829 | } |
1830 | #endif | 1830 | #endif |
1831 | 1831 | ||
1832 | #ifdef LITTLE_ENDIAN | 1832 | #ifdef LITTLE_ENDIAN |
1833 | static int smt_swap_short(u_short s) | 1833 | static int smt_swap_short(u_short s) |
1834 | { | 1834 | { |
1835 | return(((s>>8)&0xff)|((s&0xff)<<8)) ; | 1835 | return ((s>>8)&0xff) | ((s&0xff)<<8); |
1836 | } | 1836 | } |
1837 | 1837 | ||
1838 | void smt_swap_para(struct smt_header *sm, int len, int direction) | 1838 | void smt_swap_para(struct smt_header *sm, int len, int direction) |
@@ -1996,7 +1996,7 @@ int smt_action(struct s_smc *smc, int class, int code, int index) | |||
1996 | } | 1996 | } |
1997 | break ; | 1997 | break ; |
1998 | default : | 1998 | default : |
1999 | return(1) ; | 1999 | return 1; |
2000 | } | 2000 | } |
2001 | break ; | 2001 | break ; |
2002 | case SMT_PORT_ACTION : | 2002 | case SMT_PORT_ACTION : |
@@ -2017,14 +2017,14 @@ int smt_action(struct s_smc *smc, int class, int code, int index) | |||
2017 | event = PC_STOP ; | 2017 | event = PC_STOP ; |
2018 | break ; | 2018 | break ; |
2019 | default : | 2019 | default : |
2020 | return(1) ; | 2020 | return 1; |
2021 | } | 2021 | } |
2022 | queue_event(smc,EVENT_PCM+index,event) ; | 2022 | queue_event(smc,EVENT_PCM+index,event) ; |
2023 | break ; | 2023 | break ; |
2024 | default : | 2024 | default : |
2025 | return(1) ; | 2025 | return 1; |
2026 | } | 2026 | } |
2027 | return(0) ; | 2027 | return 0; |
2028 | } | 2028 | } |
2029 | 2029 | ||
2030 | /* | 2030 | /* |
diff --git a/drivers/net/skfp/smtdef.c b/drivers/net/skfp/smtdef.c index 4e07ff7073f1..1acab0b368e3 100644 --- a/drivers/net/skfp/smtdef.c +++ b/drivers/net/skfp/smtdef.c | |||
@@ -303,7 +303,7 @@ int smt_set_mac_opvalues(struct s_smc *smc) | |||
303 | FDDI_SMT_EVENT, (u_long) FDDI_REMOTE_T_REQ, | 303 | FDDI_SMT_EVENT, (u_long) FDDI_REMOTE_T_REQ, |
304 | smt_get_event_word(smc)); | 304 | smt_get_event_word(smc)); |
305 | } | 305 | } |
306 | return(st) ; | 306 | return st; |
307 | } | 307 | } |
308 | 308 | ||
309 | void smt_fixup_mib(struct s_smc *smc) | 309 | void smt_fixup_mib(struct s_smc *smc) |
@@ -350,6 +350,6 @@ static int set_min_max(int maxflag, u_long mib, u_long limit, u_long *oper) | |||
350 | *oper = limit ; | 350 | *oper = limit ; |
351 | else | 351 | else |
352 | *oper = mib ; | 352 | *oper = mib ; |
353 | return(old != *oper) ; | 353 | return old != *oper; |
354 | } | 354 | } |
355 | 355 | ||
diff --git a/drivers/net/skfp/smtinit.c b/drivers/net/skfp/smtinit.c index 3c8964ce1837..e3a0c0bc2233 100644 --- a/drivers/net/skfp/smtinit.c +++ b/drivers/net/skfp/smtinit.c | |||
@@ -120,6 +120,6 @@ int init_smt(struct s_smc *smc, u_char *mac_addr) | |||
120 | 120 | ||
121 | PNMI_INIT(smc) ; /* PNMI initialization */ | 121 | PNMI_INIT(smc) ; /* PNMI initialization */ |
122 | 122 | ||
123 | return(0) ; | 123 | return 0; |
124 | } | 124 | } |
125 | 125 | ||
diff --git a/drivers/net/skfp/srf.c b/drivers/net/skfp/srf.c index 40882b3faba6..f6f7baf9f27a 100644 --- a/drivers/net/skfp/srf.c +++ b/drivers/net/skfp/srf.c | |||
@@ -165,7 +165,7 @@ static struct s_srf_evc *smt_get_evc(struct s_smc *smc, int code, int index) | |||
165 | 165 | ||
166 | for (i = 0, evc = smc->evcs ; (unsigned) i < MAX_EVCS ; i++, evc++) { | 166 | for (i = 0, evc = smc->evcs ; (unsigned) i < MAX_EVCS ; i++, evc++) { |
167 | if (evc->evc_code == code && evc->evc_index == index) | 167 | if (evc->evc_code == code && evc->evc_index == index) |
168 | return(evc) ; | 168 | return evc; |
169 | } | 169 | } |
170 | return NULL; | 170 | return NULL; |
171 | } | 171 | } |