Lines Matching refs:smc

39 static void build_claim_beacon(struct s_smc *smc, u_long t_request);
40 static int init_mac(struct s_smc *smc, int all);
41 static void rtm_init(struct s_smc *smc);
42 static void smt_split_up_fifo(struct s_smc *smc);
49 #define DUMMY_READ() smc->hw.mc_dummy = (u_short) inp(ADDR(B0_RAP))
54 SMT_PANIC(smc,SMT_E0130, SMT_E0130_MSG) ; \
61 SMT_PANIC(smc,SMT_E0131, SMT_E0131_MSG) ; \
76 #define MA smc->hw.fddi_canon_addr
78 #define MA smc->hw.fddi_home_addr
103 static u_long mac_get_tneg(struct s_smc *smc) in mac_get_tneg() argument
112 void mac_update_counter(struct s_smc *smc) in mac_update_counter() argument
114 smc->mib.m[MAC0].fddiMACFrame_Ct = in mac_update_counter()
115 (smc->mib.m[MAC0].fddiMACFrame_Ct & 0xffff0000L) in mac_update_counter()
117 smc->mib.m[MAC0].fddiMACLost_Ct = in mac_update_counter()
118 (smc->mib.m[MAC0].fddiMACLost_Ct & 0xffff0000L) in mac_update_counter()
120 smc->mib.m[MAC0].fddiMACError_Ct = in mac_update_counter()
121 (smc->mib.m[MAC0].fddiMACError_Ct & 0xffff0000L) in mac_update_counter()
123 smc->mib.m[MAC0].fddiMACT_Neg = mac_get_tneg(smc) ; in mac_update_counter()
130 smt_emulate_token_ct( smc, MAC0 ); in mac_update_counter()
137 static void write_mdr(struct s_smc *smc, u_long val) in write_mdr() argument
147 static u_long read_mdr(struct s_smc *smc, unsigned int addr)
166 static void init_ram(struct s_smc *smc) in init_ram() argument
170 smc->hw.fp.fifo.rbc_ram_start = 0 ; in init_ram()
171 smc->hw.fp.fifo.rbc_ram_end = in init_ram()
172 smc->hw.fp.fifo.rbc_ram_start + RBC_MEM_SIZE ; in init_ram()
174 MARW(smc->hw.fp.fifo.rbc_ram_start) ; in init_ram()
175 for (i = smc->hw.fp.fifo.rbc_ram_start; in init_ram()
176 i < (u_short) (smc->hw.fp.fifo.rbc_ram_end-1); i++) in init_ram()
177 write_mdr(smc,0L) ; in init_ram()
179 write_mdr(smc,0L) ; in init_ram()
185 static void set_recvptr(struct s_smc *smc) in set_recvptr() argument
190 outpw(FM_A(FM_RPR1),smc->hw.fp.fifo.rx1_fifo_start) ; /* RPR1 */ in set_recvptr()
191 outpw(FM_A(FM_SWPR1),smc->hw.fp.fifo.rx1_fifo_start) ; /* SWPR1 */ in set_recvptr()
192 outpw(FM_A(FM_WPR1),smc->hw.fp.fifo.rx1_fifo_start) ; /* WPR1 */ in set_recvptr()
193 outpw(FM_A(FM_EARV1),smc->hw.fp.fifo.tx_s_start-1) ; /* EARV1 */ in set_recvptr()
198 if (smc->hw.fp.fifo.rx2_fifo_size) { in set_recvptr()
199 outpw(FM_A(FM_RPR2),smc->hw.fp.fifo.rx2_fifo_start) ; in set_recvptr()
200 outpw(FM_A(FM_SWPR2),smc->hw.fp.fifo.rx2_fifo_start) ; in set_recvptr()
201 outpw(FM_A(FM_WPR2),smc->hw.fp.fifo.rx2_fifo_start) ; in set_recvptr()
202 outpw(FM_A(FM_EARV2),smc->hw.fp.fifo.rbc_ram_end-1) ; in set_recvptr()
205 outpw(FM_A(FM_RPR2),smc->hw.fp.fifo.rbc_ram_end-1) ; in set_recvptr()
206 outpw(FM_A(FM_SWPR2),smc->hw.fp.fifo.rbc_ram_end-1) ; in set_recvptr()
207 outpw(FM_A(FM_WPR2),smc->hw.fp.fifo.rbc_ram_end-1) ; in set_recvptr()
208 outpw(FM_A(FM_EARV2),smc->hw.fp.fifo.rbc_ram_end-1) ; in set_recvptr()
215 static void set_txptr(struct s_smc *smc) in set_txptr() argument
222 outpw(FM_A(FM_RPXA0),smc->hw.fp.fifo.tx_a0_start) ; /* RPXA0 */ in set_txptr()
223 outpw(FM_A(FM_SWPXA0),smc->hw.fp.fifo.tx_a0_start) ; /* SWPXA0 */ in set_txptr()
224 outpw(FM_A(FM_WPXA0),smc->hw.fp.fifo.tx_a0_start) ; /* WPXA0 */ in set_txptr()
225 outpw(FM_A(FM_EAA0),smc->hw.fp.fifo.rx2_fifo_start-1) ; /* EAA0 */ in set_txptr()
230 if (smc->hw.fp.fifo.tx_s_size) { in set_txptr()
231 outpw(FM_A(FM_RPXS),smc->hw.fp.fifo.tx_s_start) ; in set_txptr()
232 outpw(FM_A(FM_SWPXS),smc->hw.fp.fifo.tx_s_start) ; in set_txptr()
233 outpw(FM_A(FM_WPXS),smc->hw.fp.fifo.tx_s_start) ; in set_txptr()
234 outpw(FM_A(FM_EAS),smc->hw.fp.fifo.tx_a0_start-1) ; in set_txptr()
237 outpw(FM_A(FM_RPXS),smc->hw.fp.fifo.tx_a0_start-1) ; in set_txptr()
238 outpw(FM_A(FM_SWPXS),smc->hw.fp.fifo.tx_a0_start-1) ; in set_txptr()
239 outpw(FM_A(FM_WPXS),smc->hw.fp.fifo.tx_a0_start-1) ; in set_txptr()
240 outpw(FM_A(FM_EAS),smc->hw.fp.fifo.tx_a0_start-1) ; in set_txptr()
247 static void init_rbc(struct s_smc *smc) in init_rbc() argument
254 rbc_ram_addr = smc->hw.fp.fifo.rx2_fifo_start - 1 ; in init_rbc()
261 set_recvptr(smc) ; in init_rbc()
262 set_txptr(smc) ; in init_rbc()
268 static void init_rx(struct s_smc *smc) in init_rx() argument
275 smc->hw.fp.rx[QUEUE_R1] = queue = &smc->hw.fp.rx_q[QUEUE_R1] ; in init_rx()
282 smc->hw.fp.rx[QUEUE_R2] = queue = &smc->hw.fp.rx_q[QUEUE_R2] ; in init_rx()
290 void set_formac_tsync(struct s_smc *smc, long sync_bw) in set_formac_tsync() argument
298 static void init_tx(struct s_smc *smc) in init_tx() argument
305 smc->hw.fp.tx[QUEUE_S] = queue = &smc->hw.fp.tx_q[QUEUE_S] ; in init_tx()
310 set_formac_tsync(smc,smc->ess.sync_bw) ; in init_tx()
316 smc->hw.fp.tx[QUEUE_A0] = queue = &smc->hw.fp.tx_q[QUEUE_A0] ; in init_tx()
321 llc_recover_tx(smc) ; in init_tx()
324 static void mac_counter_init(struct s_smc *smc) in mac_counter_init() argument
338 ec = (u_long *)&smc->hw.fp.err_stats ; in mac_counter_init()
341 smc->mib.m[MAC0].fddiMACRingOp_Ct = 0 ; in mac_counter_init()
347 static void set_formac_addr(struct s_smc *smc) in set_formac_addr() argument
349 long t_requ = smc->mib.m[MAC0].fddiMACT_Req ; in set_formac_addr()
352 outpw(FM_A(FM_LAIL),(unsigned short)((smc->hw.fddi_home_addr.a[4]<<8) + in set_formac_addr()
353 smc->hw.fddi_home_addr.a[5])) ; in set_formac_addr()
354 outpw(FM_A(FM_LAIC),(unsigned short)((smc->hw.fddi_home_addr.a[2]<<8) + in set_formac_addr()
355 smc->hw.fddi_home_addr.a[3])) ; in set_formac_addr()
356 outpw(FM_A(FM_LAIM),(unsigned short)((smc->hw.fddi_home_addr.a[0]<<8) + in set_formac_addr()
357 smc->hw.fddi_home_addr.a[1])) ; in set_formac_addr()
361 outpw(FM_A(FM_LAGL),(unsigned short)((smc->hw.fp.group_addr.a[4]<<8) + in set_formac_addr()
362 smc->hw.fp.group_addr.a[5])) ; in set_formac_addr()
363 outpw(FM_A(FM_LAGC),(unsigned short)((smc->hw.fp.group_addr.a[2]<<8) + in set_formac_addr()
364 smc->hw.fp.group_addr.a[3])) ; in set_formac_addr()
365 outpw(FM_A(FM_LAGM),(unsigned short)((smc->hw.fp.group_addr.a[0]<<8) + in set_formac_addr()
366 smc->hw.fp.group_addr.a[1])) ; in set_formac_addr()
389 static void copy_tx_mac(struct s_smc *smc, u_long td, struct fddi_mac *mac, in copy_tx_mac() argument
408 write_mdr(smc,le32_to_cpu(*p)) ; in copy_tx_mac()
413 write_mdr(smc,td) ; /* write over memory data reg to buffer */ in copy_tx_mac()
438 static void directed_beacon(struct s_smc *smc) in directed_beacon() argument
449 memcpy((char *)a+1, (char *) &smc->mib.m[MAC0].fddiMACUpstreamNbr, ETH_ALEN); in directed_beacon()
453 MARW(smc->hw.fp.fifo.rbc_ram_start+DBEACON_FRAME_OFF+4) ; in directed_beacon()
454 write_mdr(smc,le32_to_cpu(a[0])) ; in directed_beacon()
456 write_mdr(smc,le32_to_cpu(a[1])) ; in directed_beacon()
458 outpw(FM_A(FM_SABC),smc->hw.fp.fifo.rbc_ram_start + DBEACON_FRAME_OFF) ; in directed_beacon()
467 static void build_claim_beacon(struct s_smc *smc, u_long t_request) in build_claim_beacon() argument
478 mac = &smc->hw.fp.mac_sfb ; in build_claim_beacon()
485 copy_tx_mac(smc,td,(struct fddi_mac *)mac, in build_claim_beacon()
486 smc->hw.fp.fifo.rbc_ram_start + CLAIM_FRAME_OFF,len) ; in build_claim_beacon()
488 outpw(FM_A(FM_SACL),smc->hw.fp.fifo.rbc_ram_start + CLAIM_FRAME_OFF) ; in build_claim_beacon()
500 copy_tx_mac(smc,td,(struct fddi_mac *)mac, in build_claim_beacon()
501 smc->hw.fp.fifo.rbc_ram_start + BEACON_FRAME_OFF,len) ; in build_claim_beacon()
503 outpw(FM_A(FM_SABC),smc->hw.fp.fifo.rbc_ram_start + BEACON_FRAME_OFF) ; in build_claim_beacon()
518 copy_tx_mac(smc,td,(struct fddi_mac *)mac, in build_claim_beacon()
519 smc->hw.fp.fifo.rbc_ram_start + DBEACON_FRAME_OFF,len) ; in build_claim_beacon()
522 outpw(FM_A(FM_EACB),smc->hw.fp.fifo.rx1_fifo_start-1) ; in build_claim_beacon()
528 static void formac_rcv_restart(struct s_smc *smc) in formac_rcv_restart() argument
531 SETMASK(FM_A(FM_MDREG1),smc->hw.fp.rx_mode,FM_ADDRX) ; in formac_rcv_restart()
536 void formac_tx_restart(struct s_smc *smc) in formac_tx_restart() argument
542 static void enable_formac(struct s_smc *smc) in enable_formac() argument
582 void enable_tx_irq(struct s_smc *smc, u_short queue)
617 void disable_tx_irq(struct s_smc *smc, u_short queue)
633 static void disable_formac(struct s_smc *smc) in disable_formac() argument
645 static void mac_ring_up(struct s_smc *smc, int up) in mac_ring_up() argument
648 formac_rcv_restart(smc) ; /* enable receive function */ in mac_ring_up()
649 smc->hw.mac_ring_is_up = TRUE ; in mac_ring_up()
650 llc_restart_tx(smc) ; /* TX queue */ in mac_ring_up()
659 smc->hw.mac_ring_is_up = FALSE ; in mac_ring_up()
672 void mac2_irq(struct s_smc *smc, u_short code_s2u, u_short code_s2l) in mac2_irq() argument
681 queue_event(smc,EVENT_RMT,RM_TX_STATE_CHANGE) ; in mac2_irq()
684 queue_event(smc,EVENT_RMT,RM_TX_STATE_CHANGE) ; in mac2_irq()
690 change_s2l = smc->hw.fp.s2l ^ code_s2l ; in mac2_irq()
691 change_s2u = smc->hw.fp.s2u ^ code_s2u ; in mac2_irq()
694 (!smc->hw.mac_ring_is_up && ((code_s2l & FM_SRNGOP)))) { in mac2_irq()
696 mac_ring_up(smc,1) ; in mac2_irq()
697 queue_event(smc,EVENT_RMT,RM_RING_OP) ; in mac2_irq()
698 smc->mib.m[MAC0].fddiMACRingOp_Ct++ ; in mac2_irq()
701 mac_ring_up(smc,0) ; in mac2_irq()
702 queue_event(smc,EVENT_RMT,RM_RING_NON_OP) ; in mac2_irq()
707 smc->mib.m[MAC0].fddiMACNotCopied_Ct++ ; in mac2_irq()
711 smc->hw.mac_ct.mac_r_restart_counter++ ; in mac2_irq()
713 smt_stat_counter(smc,1) ; in mac2_irq()
717 queue_event(smc,EVENT_RMT,RM_OTHER_BEACON) ; in mac2_irq()
719 queue_event(smc,EVENT_RMT,RM_MY_BEACON) ; in mac2_irq()
728 queue_event(smc,EVENT_RMT,RM_MY_CLAIM) ; in mac2_irq()
738 queue_event(smc,EVENT_RMT,RM_VALID_CLAIM) ; in mac2_irq()
745 queue_event(smc,EVENT_RMT,RM_TRT_EXP) ; in mac2_irq()
752 smc->r.dup_addr_test = DA_FAILED ; in mac2_irq()
753 queue_event(smc,EVENT_RMT,RM_DUP_ADDR) ; in mac2_irq()
756 smc->hw.fp.err_stats.err_bec_stat++ ; in mac2_irq()
758 smc->hw.fp.err_stats.err_clm_stat++ ; in mac2_irq()
760 smc->mib.m[MAC0].fddiMACTvxExpired_Ct++ ; in mac2_irq()
762 if (!(change_s2l & FM_SRNGOP) && (smc->hw.fp.s2l & FM_SRNGOP)) { in mac2_irq()
763 mac_ring_up(smc,0) ; in mac2_irq()
764 queue_event(smc,EVENT_RMT,RM_RING_NON_OP) ; in mac2_irq()
766 mac_ring_up(smc,1) ; in mac2_irq()
767 queue_event(smc,EVENT_RMT,RM_RING_OP) ; in mac2_irq()
768 smc->mib.m[MAC0].fddiMACRingOp_Ct++ ; in mac2_irq()
772 smc->hw.fp.err_stats.err_phinv++ ; in mac2_irq()
774 smc->hw.fp.err_stats.err_sifg_det++ ; in mac2_irq()
776 smc->hw.fp.err_stats.err_tkiss++ ; in mac2_irq()
778 smc->hw.fp.err_stats.err_tkerr++ ; in mac2_irq()
780 smc->mib.m[MAC0].fddiMACFrame_Ct += 0x10000L ; in mac2_irq()
782 smc->mib.m[MAC0].fddiMACError_Ct += 0x10000L ; in mac2_irq()
784 smc->mib.m[MAC0].fddiMACLost_Ct += 0x10000L ; in mac2_irq()
786 SMT_PANIC(smc,SMT_E0114, SMT_E0114_MSG) ; in mac2_irq()
790 smc->hw.fp.s2l = code_s2l ; in mac2_irq()
791 smc->hw.fp.s2u = code_s2u ; in mac2_irq()
798 void mac3_irq(struct s_smc *smc, u_short code_s3u, u_short code_s3l) in mac3_irq() argument
804 smc->hw.mac_ct.mac_r_restart_counter++ ; in mac3_irq()
805 smt_stat_counter(smc,1); in mac3_irq()
810 SMT_PANIC(smc,SMT_E0115, SMT_E0115_MSG) ; in mac3_irq()
813 SMT_PANIC(smc,SMT_E0116, SMT_E0116_MSG) ; in mac3_irq()
821 static void formac_offline(struct s_smc *smc) in formac_offline() argument
831 disable_formac(smc) ; in formac_offline()
832 smc->hw.mac_ring_is_up = FALSE ; in formac_offline()
833 smc->hw.hw_state = STOPPED ; in formac_offline()
839 static void formac_online(struct s_smc *smc) in formac_online() argument
841 enable_formac(smc) ; in formac_online()
843 smc->hw.fp.rx_mode, FM_MMODE | FM_SELRA | FM_ADDRX) ; in formac_online()
849 int init_fplus(struct s_smc *smc) in init_fplus() argument
851 smc->hw.fp.nsa_mode = FM_MRNNSAFNMA ; in init_fplus()
852 smc->hw.fp.rx_mode = FM_MDAMA ; in init_fplus()
853 smc->hw.fp.group_addr = fddi_broadcast ; in init_fplus()
854 smc->hw.fp.func_addr = 0 ; in init_fplus()
855 smc->hw.fp.frselreg_init = 0 ; in init_fplus()
857 init_driver_fplus(smc) ; in init_fplus()
858 if (smc->s.sas == SMT_DAS) in init_fplus()
859 smc->hw.fp.mdr3init |= FM_MENDAS ; in init_fplus()
861 smc->hw.mac_ct.mac_nobuf_counter = 0 ; in init_fplus()
862 smc->hw.mac_ct.mac_r_restart_counter = 0 ; in init_fplus()
864 smc->hw.fp.fm_st1u = (HW_PTR) ADDR(B0_ST1U) ; in init_fplus()
865 smc->hw.fp.fm_st1l = (HW_PTR) ADDR(B0_ST1L) ; in init_fplus()
866 smc->hw.fp.fm_st2u = (HW_PTR) ADDR(B0_ST2U) ; in init_fplus()
867 smc->hw.fp.fm_st2l = (HW_PTR) ADDR(B0_ST2L) ; in init_fplus()
868 smc->hw.fp.fm_st3u = (HW_PTR) ADDR(B0_ST3U) ; in init_fplus()
869 smc->hw.fp.fm_st3l = (HW_PTR) ADDR(B0_ST3L) ; in init_fplus()
871 smc->hw.fp.s2l = smc->hw.fp.s2u = 0 ; in init_fplus()
872 smc->hw.mac_ring_is_up = 0 ; in init_fplus()
874 mac_counter_init(smc) ; in init_fplus()
877 smc->hw.mac_pa.t_neg = (u_long)0 ; in init_fplus()
878 smc->hw.mac_pa.t_pri = (u_long)0 ; in init_fplus()
881 mac_do_pci_fix(smc) ; in init_fplus()
883 return init_mac(smc, 1); in init_fplus()
887 static int init_mac(struct s_smc *smc, int all) in init_mac() argument
896 set_formac_addr(smc) ; in init_mac()
899 outpw(FM_A(FM_MDREG2),smc->hw.fp.mdr2init) ; in init_mac()
902 init_ram(smc) ; in init_mac()
909 time = hwt_quick_read(smc) ; in init_mac()
915 smt_split_up_fifo(smc) ; in init_mac()
917 init_tx(smc) ; in init_mac()
918 init_rx(smc) ; in init_mac()
919 init_rbc(smc) ; in init_mac()
921 build_claim_beacon(smc,smc->mib.m[MAC0].fddiMACT_Req) ; in init_mac()
928 outpw(FM_A(FM_MDREG1),MDR1INIT | FM_SELRA | smc->hw.fp.rx_mode) ; in init_mac()
929 outpw(FM_A(FM_MDREG2),smc->hw.fp.mdr2init) ; in init_mac()
930 outpw(FM_A(FM_MDREG3),smc->hw.fp.mdr3init) ; in init_mac()
931 outpw(FM_A(FM_FRSELREG),smc->hw.fp.frselreg_init) ; in init_mac()
939 t_max = (u_short)(smc->mib.m[MAC0].fddiMACT_Max/32) ; in init_mac()
947 if (smc->mib.m[MAC0].fddiMACTvxValue < (u_long) (- US2BCLK(52))) { in init_mac()
951 (u_short)((smc->mib.m[MAC0].fddiMACTvxValue/255) & MB)) ; in init_mac()
961 rtm_init(smc) ; /* RT-Monitor */ in init_mac()
967 hwt_wait_time(smc,time,MS2BCLK(10)) ; in init_mac()
975 if (!smc->hw.hw_is_64bit) { in init_mac()
980 smc->hw.hw_state = STOPPED ; in init_mac()
981 mac_drv_repair_descr(smc) ; in init_mac()
983 smc->hw.hw_state = STARTED ; in init_mac()
992 void config_mux(struct s_smc *smc, int mux) in config_mux() argument
994 plc_config_mux(smc,mux) ; in config_mux()
1006 void sm_mac_check_beacon_claim(struct s_smc *smc) in sm_mac_check_beacon_claim() argument
1011 formac_rcv_restart(smc) ; in sm_mac_check_beacon_claim()
1012 process_receive(smc) ; in sm_mac_check_beacon_claim()
1019 void sm_ma_control(struct s_smc *smc, int mode) in sm_ma_control() argument
1024 formac_offline(smc) ; in sm_ma_control()
1027 (void)init_mac(smc,0) ; in sm_ma_control()
1030 formac_online(smc) ; in sm_ma_control()
1033 directed_beacon(smc) ; in sm_ma_control()
1043 int sm_mac_get_tx_state(struct s_smc *smc) in sm_mac_get_tx_state() argument
1052 static struct s_fpmc* mac_get_mc_table(struct s_smc *smc, in mac_get_mc_table() argument
1072 for (i = 0, tb = smc->hw.fp.mc.table ; i < FPMAX_MULTICAST ; i++, tb++){ in mac_get_mc_table()
1096 void mac_clear_multicast(struct s_smc *smc) in mac_clear_multicast() argument
1101 smc->hw.fp.os_slots_used = 0 ; /* note the SMT addresses */ in mac_clear_multicast()
1103 for (i = 0, tb = smc->hw.fp.mc.table ; i < FPMAX_MULTICAST ; i++, tb++){ in mac_clear_multicast()
1138 int mac_add_multicast(struct s_smc *smc, struct fddi_addr *addr, int can) in mac_add_multicast() argument
1147 if (smc->hw.fp.smt_slots_used >= SMT_MAX_MULTI) { in mac_add_multicast()
1152 if (smc->hw.fp.os_slots_used >= FPMAX_MULTICAST-SMT_MAX_MULTI) { in mac_add_multicast()
1160 if (!(tb = mac_get_mc_table(smc,addr,&own,0,can & ~0x80))) in mac_add_multicast()
1167 smc->hw.fp.smt_slots_used++ ; in mac_add_multicast()
1169 smc->hw.fp.os_slots_used++ ; in mac_add_multicast()
1192 void mac_update_multicast(struct s_smc *smc) in mac_update_multicast() argument
1206 if (smc->hw.fp.func_addr) { in mac_update_multicast()
1207 fu = (u_char *) &smc->hw.fp.func_addr ; in mac_update_multicast()
1226 for (i = 0, tb = smc->hw.fp.mc.table; i < FPMAX_MULTICAST; i++, tb++) { in mac_update_multicast()
1268 void mac_set_rx_mode(struct s_smc *smc, int mode) in mac_set_rx_mode() argument
1272 smc->hw.fp.rx_prom |= RX_MODE_ALL_MULTI ; in mac_set_rx_mode()
1275 smc->hw.fp.rx_prom &= ~RX_MODE_ALL_MULTI ; in mac_set_rx_mode()
1278 smc->hw.fp.rx_prom |= RX_MODE_PROM ; in mac_set_rx_mode()
1281 smc->hw.fp.rx_prom &= ~RX_MODE_PROM ; in mac_set_rx_mode()
1284 smc->hw.fp.nsa_mode = FM_MDAMA ; in mac_set_rx_mode()
1285 smc->hw.fp.rx_mode = (smc->hw.fp.rx_mode & ~FM_ADDET) | in mac_set_rx_mode()
1286 smc->hw.fp.nsa_mode ; in mac_set_rx_mode()
1289 smc->hw.fp.nsa_mode = FM_MRNNSAFNMA ; in mac_set_rx_mode()
1290 smc->hw.fp.rx_mode = (smc->hw.fp.rx_mode & ~FM_ADDET) | in mac_set_rx_mode()
1291 smc->hw.fp.nsa_mode ; in mac_set_rx_mode()
1294 if (smc->hw.fp.rx_prom & RX_MODE_PROM) { in mac_set_rx_mode()
1295 smc->hw.fp.rx_mode = FM_MLIMPROM ; in mac_set_rx_mode()
1297 else if (smc->hw.fp.rx_prom & RX_MODE_ALL_MULTI) { in mac_set_rx_mode()
1298 smc->hw.fp.rx_mode = smc->hw.fp.nsa_mode | FM_EXGPA0 ; in mac_set_rx_mode()
1301 smc->hw.fp.rx_mode = smc->hw.fp.nsa_mode ; in mac_set_rx_mode()
1302 SETMASK(FM_A(FM_MDREG1),smc->hw.fp.rx_mode,FM_ADDRX) ; in mac_set_rx_mode()
1303 mac_update_multicast(smc) ; in mac_set_rx_mode()
1324 void rtm_irq(struct s_smc *smc) in rtm_irq() argument
1330 AIX_EVENT(smc, (u_long) FDDI_RING_STATUS, in rtm_irq()
1332 (u_long) FDDI_RTT, smt_get_event_word(smc)); in rtm_irq()
1337 static void rtm_init(struct s_smc *smc) in rtm_init() argument
1343 void rtm_set_timer(struct s_smc *smc) in rtm_set_timer() argument
1349 (int)smc->mib.a[PATH0].fddiPATHT_Rmode); in rtm_set_timer()
1350 outpd(ADDR(B2_RTM_INI),smc->mib.a[PATH0].fddiPATHT_Rmode) ; in rtm_set_timer()
1353 static void smt_split_up_fifo(struct s_smc *smc) in smt_split_up_fifo() argument
1382 SMT_PANIC(smc,SMT_E0117, SMT_E0117_MSG) ; in smt_split_up_fifo()
1387 smc->hw.fp.fifo.rx1_fifo_size = RX_FIFO_SPACE ; in smt_split_up_fifo()
1388 smc->hw.fp.fifo.rx2_fifo_size = 0 ; in smt_split_up_fifo()
1393 smc->hw.fp.fifo.rx1_fifo_size = RX_LARGE_FIFO ; in smt_split_up_fifo()
1394 smc->hw.fp.fifo.rx2_fifo_size = RX_SMALL_FIFO ; in smt_split_up_fifo()
1397 smc->hw.fp.fifo.rx1_fifo_size = RX_FIFO_SPACE * in smt_split_up_fifo()
1399 smc->hw.fp.fifo.rx2_fifo_size = RX_FIFO_SPACE * in smt_split_up_fifo()
1426 if (smc->mib.a[PATH0].fddiPATHSbaPayload) { in smt_split_up_fifo()
1428 smc->hw.fp.fifo.fifo_config_mode |= in smt_split_up_fifo()
1429 smc->mib.fddiESSSynchTxMode | SYNC_TRAFFIC_ON ; in smt_split_up_fifo()
1433 smc->hw.fp.fifo.fifo_config_mode &= in smt_split_up_fifo()
1440 if (smc->hw.fp.fifo.fifo_config_mode & SYNC_TRAFFIC_ON) { in smt_split_up_fifo()
1441 if (smc->hw.fp.fifo.fifo_config_mode & SEND_ASYNC_AS_SYNC) { in smt_split_up_fifo()
1442 smc->hw.fp.fifo.tx_s_size = TX_LARGE_FIFO ; in smt_split_up_fifo()
1443 smc->hw.fp.fifo.tx_a0_size = TX_SMALL_FIFO ; in smt_split_up_fifo()
1446 smc->hw.fp.fifo.tx_s_size = TX_MEDIUM_FIFO ; in smt_split_up_fifo()
1447 smc->hw.fp.fifo.tx_a0_size = TX_MEDIUM_FIFO ; in smt_split_up_fifo()
1451 smc->hw.fp.fifo.tx_s_size = 0 ; in smt_split_up_fifo()
1452 smc->hw.fp.fifo.tx_a0_size = TX_FIFO_SPACE ; in smt_split_up_fifo()
1455 smc->hw.fp.fifo.rx1_fifo_start = smc->hw.fp.fifo.rbc_ram_start + in smt_split_up_fifo()
1457 smc->hw.fp.fifo.tx_s_start = smc->hw.fp.fifo.rx1_fifo_start + in smt_split_up_fifo()
1458 smc->hw.fp.fifo.rx1_fifo_size ; in smt_split_up_fifo()
1459 smc->hw.fp.fifo.tx_a0_start = smc->hw.fp.fifo.tx_s_start + in smt_split_up_fifo()
1460 smc->hw.fp.fifo.tx_s_size ; in smt_split_up_fifo()
1461 smc->hw.fp.fifo.rx2_fifo_start = smc->hw.fp.fifo.tx_a0_start + in smt_split_up_fifo()
1462 smc->hw.fp.fifo.tx_a0_size ; in smt_split_up_fifo()
1464 DB_SMT("FIFO split: mode = %x", smc->hw.fp.fifo.fifo_config_mode); in smt_split_up_fifo()
1466 smc->hw.fp.fifo.rbc_ram_start, smc->hw.fp.fifo.rbc_ram_end); in smt_split_up_fifo()
1468 smc->hw.fp.fifo.rx1_fifo_start, smc->hw.fp.fifo.tx_s_start); in smt_split_up_fifo()
1470 smc->hw.fp.fifo.tx_a0_start, smc->hw.fp.fifo.rx2_fifo_start); in smt_split_up_fifo()
1473 void formac_reinit_tx(struct s_smc *smc) in formac_reinit_tx() argument
1480 if (!smc->hw.fp.fifo.tx_s_size && smc->mib.a[PATH0].fddiPATHSbaPayload){ in formac_reinit_tx()
1481 (void)init_mac(smc,0) ; in formac_reinit_tx()