Lines Matching refs:smc

70 static void queue_llc_rx(struct s_smc *smc, SMbuf *mb);
71 static void smt_to_llc(struct s_smc *smc, SMbuf *mb);
72 static void init_txd_ring(struct s_smc *smc);
73 static void init_rxd_ring(struct s_smc *smc);
74 static void queue_txd_mb(struct s_smc *smc, SMbuf *mb);
75 static u_long init_descr_ring(struct s_smc *smc, union s_fp_descr volatile *start,
77 static u_long repair_txd_ring(struct s_smc *smc, struct s_smt_tx_queue *queue);
78 static u_long repair_rxd_ring(struct s_smc *smc, struct s_smt_rx_queue *queue);
79 static SMbuf* get_llc_rx(struct s_smc *smc);
80 static SMbuf* get_txd_mb(struct s_smc *smc);
81 static void mac_drv_clear_txd(struct s_smc *smc);
90 extern void* mac_drv_get_space(struct s_smc *smc, unsigned int size);
91 extern void* mac_drv_get_desc_mem(struct s_smc *smc, unsigned int size);
92 extern void mac_drv_fill_rxd(struct s_smc *smc);
93 extern void mac_drv_tx_complete(struct s_smc *smc,
95 extern void mac_drv_rx_complete(struct s_smc *smc,
98 extern void mac_drv_requeue_rxd(struct s_smc *smc,
101 extern void mac_drv_clear_rxd(struct s_smc *smc,
113 extern u_long mac_drv_virt2phys(struct s_smc *smc, void *virt);
114 extern u_long dma_master(struct s_smc *smc, void *virt, int len, int flag);
119 extern void dma_complete(struct s_smc *smc, volatile union s_fp_descr *descr,
123 extern int mac_drv_rx_init(struct s_smc *smc, int len, int fc, char *look_ahead,
131 void process_receive(struct s_smc *smc);
132 void fddi_isr(struct s_smc *smc);
133 void smt_free_mbuf(struct s_smc *smc, SMbuf *mb);
134 void init_driver_fplus(struct s_smc *smc);
135 void mac_drv_rx_mode(struct s_smc *smc, int mode);
136 void init_fddi_driver(struct s_smc *smc, u_char *mac_addr);
137 void mac_drv_clear_tx_queue(struct s_smc *smc);
138 void mac_drv_clear_rx_queue(struct s_smc *smc);
139 void hwm_tx_frag(struct s_smc *smc, char far *virt, u_long phys, int len,
141 void hwm_rx_frag(struct s_smc *smc, char far *virt, u_long phys, int len,
144 int mac_drv_init(struct s_smc *smc);
145 int hwm_tx_init(struct s_smc *smc, u_char fc, int frag_count, int frame_len,
150 SMbuf* smt_get_mbuf(struct s_smc *smc);
153 void mac_drv_debug_lev(struct s_smc *smc, int flag, int lev);
170 #define MA smc->hw.fddi_canon_addr.a
173 #define MA smc->hw.fddi_home_addr.a
251 int mac_drv_init(struct s_smc *smc) in mac_drv_init() argument
254 SMT_PANIC(smc,HWM_E0001,HWM_E0001_MSG) ; in mac_drv_init()
257 SMT_PANIC(smc,HWM_E0002,HWM_E0002_MSG) ; in mac_drv_init()
263 if (!(smc->os.hwm.descr_p = (union s_fp_descr volatile *) in mac_drv_init()
264 mac_drv_get_desc_mem(smc,(u_int) in mac_drv_init()
273 smc->os.hwm.mbuf_pool.mb_start=(SMbuf *)(&smc->os.hwm.mbuf_pool.mb[0]) ; in mac_drv_init()
276 if (!(smc->os.hwm.mbuf_pool.mb_start = (SMbuf *) mac_drv_get_space(smc, in mac_drv_init()
282 if (!(mb_start = (SMbuf *) mac_drv_get_space(smc, in mac_drv_init()
301 void init_driver_fplus(struct s_smc *smc) in init_driver_fplus() argument
303 smc->hw.fp.mdr2init = FM_LSB | FM_BMMODE | FM_ENNPRQ | FM_ENHSRQ | 3 ; in init_driver_fplus()
306 smc->hw.fp.mdr2init |= FM_CHKPAR | FM_PARITY ; in init_driver_fplus()
308 smc->hw.fp.mdr3init = FM_MENRQAUNLCK | FM_MENRS ; in init_driver_fplus()
312 smc->hw.fp.frselreg_init = FM_ENXMTADSWAP | FM_ENRCVADSWAP ; in init_driver_fplus()
316 static u_long init_descr_ring(struct s_smc *smc, in init_descr_ring() argument
331 phys = mac_drv_virt2phys(smc,(void *)d1) ; in init_descr_ring()
337 phys = mac_drv_virt2phys(smc,(void *)start) ; in init_descr_ring()
347 static void init_txd_ring(struct s_smc *smc) in init_txd_ring() argument
356 ds = (struct s_smt_fp_txd volatile *) ((char *)smc->os.hwm.descr_p + in init_txd_ring()
358 queue = smc->hw.fp.tx[QUEUE_A0] ; in init_txd_ring()
360 (void)init_descr_ring(smc,(union s_fp_descr volatile *)ds, in init_txd_ring()
372 queue = smc->hw.fp.tx[QUEUE_S] ; in init_txd_ring()
374 (void)init_descr_ring(smc,(union s_fp_descr volatile *)ds, in init_txd_ring()
384 static void init_rxd_ring(struct s_smc *smc) in init_rxd_ring() argument
393 ds = (struct s_smt_fp_rxd volatile *) smc->os.hwm.descr_p ; in init_rxd_ring()
394 queue = smc->hw.fp.rx[QUEUE_R1] ; in init_rxd_ring()
396 (void)init_descr_ring(smc,(union s_fp_descr volatile *)ds, in init_rxd_ring()
414 void init_fddi_driver(struct s_smc *smc, u_char *mac_addr) in init_fddi_driver() argument
419 init_board(smc,mac_addr) ; in init_fddi_driver()
420 (void)init_fplus(smc) ; in init_fddi_driver()
426 mb = smc->os.hwm.mbuf_pool.mb_start ; in init_fddi_driver()
427 smc->os.hwm.mbuf_pool.mb_free = (SMbuf *)NULL ; in init_fddi_driver()
430 smt_free_mbuf(smc,mb) ; in init_fddi_driver()
439 smt_free_mbuf(smc,mb) ; in init_fddi_driver()
449 smc->os.hwm.llc_rx_pipe = smc->os.hwm.llc_rx_tail = (SMbuf *)NULL ; in init_fddi_driver()
450 smc->os.hwm.txd_tx_pipe = smc->os.hwm.txd_tx_tail = NULL ; in init_fddi_driver()
451 smc->os.hwm.pass_SMT = smc->os.hwm.pass_NSA = smc->os.hwm.pass_DB = 0 ; in init_fddi_driver()
452 smc->os.hwm.pass_llc_promisc = TRUE ; in init_fddi_driver()
453 smc->os.hwm.queued_rx_frames = smc->os.hwm.queued_txd_mb = 0 ; in init_fddi_driver()
454 smc->os.hwm.detec_count = 0 ; in init_fddi_driver()
455 smc->os.hwm.rx_break = 0 ; in init_fddi_driver()
456 smc->os.hwm.rx_len_error = 0 ; in init_fddi_driver()
457 smc->os.hwm.isr_flag = FALSE ; in init_fddi_driver()
462 i = 16 - ((long)smc->os.hwm.descr_p & 0xf) ; in init_fddi_driver()
465 smc->os.hwm.descr_p = (union s_fp_descr volatile *) in init_fddi_driver()
466 ((char *)smc->os.hwm.descr_p+i) ; in init_fddi_driver()
468 DB_GEN(3, "pt to descr area = %p", smc->os.hwm.descr_p); in init_fddi_driver()
470 init_txd_ring(smc) ; in init_fddi_driver()
471 init_rxd_ring(smc) ; in init_fddi_driver()
472 mac_drv_fill_rxd(smc) ; in init_fddi_driver()
474 init_plc(smc) ; in init_fddi_driver()
478 SMbuf *smt_get_mbuf(struct s_smc *smc) in smt_get_mbuf() argument
483 mb = smc->os.hwm.mbuf_pool.mb_free ; in smt_get_mbuf()
489 smc->os.hwm.mbuf_pool.mb_free = mb->sm_next ; in smt_get_mbuf()
500 void smt_free_mbuf(struct s_smc *smc, SMbuf *mb) in smt_free_mbuf() argument
514 mb->sm_next = smc->os.hwm.mbuf_pool.mb_free ; in smt_free_mbuf()
515 smc->os.hwm.mbuf_pool.mb_free = mb ; in smt_free_mbuf()
523 SMT_PANIC(smc,HWM_E0003,HWM_E0003_MSG) ; in smt_free_mbuf()
546 void mac_drv_repair_descr(struct s_smc *smc) in mac_drv_repair_descr() argument
550 if (smc->hw.hw_state != STOPPED) { in mac_drv_repair_descr()
552 SMT_PANIC(smc,HWM_E0013,HWM_E0013_MSG) ; in mac_drv_repair_descr()
559 phys = repair_txd_ring(smc,smc->hw.fp.tx[QUEUE_A0]) ; in mac_drv_repair_descr()
561 if (smc->hw.fp.tx_q[QUEUE_A0].tx_used) { in mac_drv_repair_descr()
564 phys = repair_txd_ring(smc,smc->hw.fp.tx[QUEUE_S]) ; in mac_drv_repair_descr()
566 if (smc->hw.fp.tx_q[QUEUE_S].tx_used) { in mac_drv_repair_descr()
573 phys = repair_rxd_ring(smc,smc->hw.fp.rx[QUEUE_R1]) ; in mac_drv_repair_descr()
578 static u_long repair_txd_ring(struct s_smc *smc, struct s_smt_tx_queue *queue) in repair_txd_ring() argument
586 SK_UNUSED(smc) ; in repair_txd_ring()
630 static u_long repair_rxd_ring(struct s_smc *smc, struct s_smt_rx_queue *queue) in repair_rxd_ring() argument
638 SK_UNUSED(smc) ; in repair_rxd_ring()
701 void fddi_isr(struct s_smc *smc) in fddi_isr() argument
712 if (smc->os.hwm.rx_break) { in fddi_isr()
713 mac_drv_fill_rxd(smc) ; in fddi_isr()
714 if (smc->hw.fp.rx_q[QUEUE_R1].rx_used > 0) { in fddi_isr()
715 smc->os.hwm.rx_break = 0 ; in fddi_isr()
716 process_receive(smc) ; in fddi_isr()
719 smc->os.hwm.detec_count = 0 ; in fddi_isr()
720 smt_force_irq(smc) ; in fddi_isr()
724 smc->os.hwm.isr_flag = TRUE ; in fddi_isr()
728 if (smc->os.hwm.leave_isr) { in fddi_isr()
729 smc->os.hwm.leave_isr = FALSE ; in fddi_isr()
730 process_receive(smc) ; in fddi_isr()
741 plc1_irq(smc) ; in fddi_isr()
744 plc2_irq(smc) ; in fddi_isr()
750 mac1_irq(smc,stu,stl) ; in fddi_isr()
757 mac2_irq(smc,stu,stl) ; in fddi_isr()
763 mac3_irq(smc,stu,stl) ; in fddi_isr()
766 timer_irq(smc) ; in fddi_isr()
773 if (++smc->os.hwm.detec_count > 4) { in fddi_isr()
777 process_receive(smc) ; in fddi_isr()
781 rtm_irq(smc) ; in fddi_isr()
786 SMT_PANIC(smc,HWM_E0004,HWM_E0004_MSG) ; in fddi_isr()
791 SMT_PANIC(smc,HWM_E0005,HWM_E0005_MSG) ; in fddi_isr()
796 SMT_PANIC(smc,HWM_E0006,HWM_E0006_MSG) ; in fddi_isr()
801 SMT_PANIC(smc,HWM_E0007,HWM_E0007_MSG) ; in fddi_isr()
816 mac_drv_clear_txd(smc) ; in fddi_isr()
817 llc_restart_tx(smc) ; in fddi_isr()
828 process_receive(smc) ; in fddi_isr()
830 process_receive(smc) ; in fddi_isr()
831 if (smc->os.hwm.leave_isr) { in fddi_isr()
835 process_receive(smc) ; in fddi_isr()
841 while ((mb = get_llc_rx(smc))) { in fddi_isr()
842 smt_to_llc(smc,mb) ; in fddi_isr()
848 while (!offDepth && (mb = get_llc_rx(smc))) { in fddi_isr()
849 smt_to_llc(smc,mb) ; in fddi_isr()
852 if (!offDepth && smc->os.hwm.rx_break) { in fddi_isr()
853 process_receive(smc) ; in fddi_isr()
856 if (smc->q.ev_get != smc->q.ev_put) { in fddi_isr()
858 ev_dispatcher(smc) ; in fddi_isr()
867 if (smc->os.hwm.leave_isr) { in fddi_isr()
876 if (smc->os.hwm.leave_isr && force_irq) { in fddi_isr()
877 smt_force_irq(smc) ; in fddi_isr()
880 smc->os.hwm.isr_flag = FALSE ; in fddi_isr()
984 void mac_drv_rx_mode(struct s_smc *smc, int mode) in mac_drv_rx_mode() argument
988 smc->os.hwm.pass_SMT = TRUE ; in mac_drv_rx_mode()
991 smc->os.hwm.pass_SMT = FALSE ; in mac_drv_rx_mode()
994 smc->os.hwm.pass_NSA = TRUE ; in mac_drv_rx_mode()
997 smc->os.hwm.pass_NSA = FALSE ; in mac_drv_rx_mode()
1000 smc->os.hwm.pass_DB = TRUE ; in mac_drv_rx_mode()
1003 smc->os.hwm.pass_DB = FALSE ; in mac_drv_rx_mode()
1006 smc->os.hwm.pass_SMT = smc->os.hwm.pass_NSA = FALSE ; in mac_drv_rx_mode()
1007 smc->os.hwm.pass_DB = FALSE ; in mac_drv_rx_mode()
1008 smc->os.hwm.pass_llc_promisc = TRUE ; in mac_drv_rx_mode()
1009 mac_set_rx_mode(smc,RX_DISABLE_NSA) ; in mac_drv_rx_mode()
1012 smc->os.hwm.pass_llc_promisc = FALSE ; in mac_drv_rx_mode()
1015 smc->os.hwm.pass_llc_promisc = TRUE ; in mac_drv_rx_mode()
1024 mac_set_rx_mode(smc,mode) ; in mac_drv_rx_mode()
1033 void process_receive(struct s_smc *smc) in process_receive() argument
1051 smc->os.hwm.detec_count = 0 ; in process_receive()
1052 queue = smc->hw.fp.rx[QUEUE_R1] ; in process_receive()
1060 if (smc->os.hwm.leave_isr) { in process_receive()
1066 smc->os.hwm.rx_break = 1 ; in process_receive()
1069 smc->os.hwm.rx_break = 0 ; in process_receive()
1072 if (smc->os.hwm.rx_break) { in process_receive()
1092 SMT_PANIC(smc,HWM_E0009,HWM_E0009_MSG) ; in process_receive()
1096 smc->hw.hw_state = STOPPED ; in process_receive()
1097 mac_drv_clear_rx_queue(smc) ; in process_receive()
1098 smc->hw.hw_state = STARTED ; in process_receive()
1099 mac_drv_fill_rxd(smc) ; in process_receive()
1100 smc->os.hwm.detec_count = 0 ; in process_receive()
1160 dma_complete(smc,(union s_fp_descr volatile *)r,DMA_WR); in process_receive()
1162 smc->hw.fp.err_stats.err_valid++ ; in process_receive()
1163 smc->mib.m[MAC0].fddiMACCopied_Ct++ ; in process_receive()
1175 smc->hw.fp.err_stats.err_abort++ ; in process_receive()
1182 smc->hw.fp.err_stats.err_e_indicator++ ; in process_receive()
1186 smc->hw.fp.err_stats.err_crc++ ; in process_receive()
1190 smc->hw.fp.err_stats.err_imp_frame++ ; in process_receive()
1196 smc->hw.fp.err_stats.err_too_long++ ; in process_receive()
1210 smc->os.hwm.rx_len_error++ ; in process_receive()
1237 if (!smc->os.hwm.pass_llc_promisc) { in process_receive()
1255 mac_drv_rx_complete(smc,rxd,frag_count,len) ; in process_receive()
1258 if (!(mb = smt_get_mbuf(smc))) { in process_receive()
1259 smc->hw.fp.err_stats.err_no_buf++ ; in process_receive()
1288 smc->hw.fp.err_stats.err_smt_frame++ ; in process_receive()
1291 if (smc->os.hwm.pass_SMT) { in process_receive()
1293 mac_drv_rx_complete(smc, rxd, in process_receive()
1298 mac_drv_requeue_rxd(smc,rxd,frag_count); in process_receive()
1301 smt_received_pack(smc,mb,(int)(rfsw>>25)) ; in process_receive()
1304 smc->hw.fp.err_stats.err_smt_frame++ ; in process_receive()
1310 if (smc->os.hwm.pass_NSA || in process_receive()
1311 (smc->os.hwm.pass_SMT && in process_receive()
1314 mac_drv_rx_complete(smc, rxd, in process_receive()
1319 mac_drv_requeue_rxd(smc,rxd,frag_count); in process_receive()
1322 smt_received_pack(smc,mb,(int)(rfsw>>25)) ; in process_receive()
1325 if (smc->os.hwm.pass_DB) { in process_receive()
1327 mac_drv_rx_complete(smc, rxd, in process_receive()
1332 mac_drv_requeue_rxd(smc,rxd,frag_count); in process_receive()
1334 smt_free_mbuf(smc,mb) ; in process_receive()
1341 smt_free_mbuf(smc,mb) ; in process_receive()
1343 mac_drv_requeue_rxd(smc,rxd,frag_count) ; in process_receive()
1345 smc->hw.fp.err_stats.err_mac_frame++ ; in process_receive()
1347 smc->hw.fp.err_stats.err_imp_frame++ ; in process_receive()
1360 mac_drv_requeue_rxd(smc,rxd,frag_count) ; in process_receive()
1367 mac_drv_all_receives_complete(smc) ; in process_receive()
1372 static void smt_to_llc(struct s_smc *smc, SMbuf *mb) in smt_to_llc() argument
1377 smc->os.hwm.r.len = mb->sm_len ; in smt_to_llc()
1378 smc->os.hwm.r.mb_pos = smtod(mb,char *) ; in smt_to_llc()
1379 fc = *smc->os.hwm.r.mb_pos ; in smt_to_llc()
1380 (void)mac_drv_rx_init(smc,(int)mb->sm_len,(int)fc, in smt_to_llc()
1381 smc->os.hwm.r.mb_pos,(int)mb->sm_len) ; in smt_to_llc()
1382 smt_free_mbuf(smc,mb) ; in smt_to_llc()
1407 void hwm_rx_frag(struct s_smc *smc, char far *virt, u_long phys, int len, in hwm_rx_frag() argument
1415 r = smc->hw.fp.rx_q[QUEUE_R1].rx_curr_put ; in hwm_rx_frag()
1426 smc->hw.fp.rx_q[QUEUE_R1].rx_free-- ; in hwm_rx_frag()
1427 smc->hw.fp.rx_q[QUEUE_R1].rx_used++ ; in hwm_rx_frag()
1428 smc->hw.fp.rx_q[QUEUE_R1].rx_curr_put = r->rxd_next ; in hwm_rx_frag()
1455 void mac_drv_clear_rx_queue(struct s_smc *smc) in mac_drv_clear_rx_queue() argument
1463 if (smc->hw.hw_state != STOPPED) { in mac_drv_clear_rx_queue()
1465 SMT_PANIC(smc,HWM_E0012,HWM_E0012_MSG) ; in mac_drv_clear_rx_queue()
1469 queue = smc->hw.fp.rx[QUEUE_R1] ; in mac_drv_clear_rx_queue()
1498 dma_complete(smc,(union s_fp_descr volatile *)r,DMA_WR); in mac_drv_clear_rx_queue()
1503 mac_drv_clear_rxd(smc,queue->rx_curr_get,frag_count) ; in mac_drv_clear_rx_queue()
1542 int hwm_tx_init(struct s_smc *smc, u_char fc, int frag_count, int frame_len, in hwm_tx_init() argument
1546 smc->os.hwm.tx_p = smc->hw.fp.tx[frame_status & QUEUE_A0] ; in hwm_tx_init()
1547 smc->os.hwm.tx_descr = TX_DESCRIPTOR | (((u_long)(frame_len-1)&3)<<27) ; in hwm_tx_init()
1548 smc->os.hwm.tx_len = frame_len ; in hwm_tx_init()
1566 SMT_PANIC(smc,HWM_E0010,HWM_E0010_MSG) ; in hwm_tx_init()
1569 if (!smc->hw.mac_ring_is_up) { in hwm_tx_init()
1574 if (frag_count > smc->os.hwm.tx_p->tx_free) { in hwm_tx_init()
1576 mac_drv_clear_txd(smc) ; in hwm_tx_init()
1577 if (frag_count > smc->os.hwm.tx_p->tx_free) { in hwm_tx_init()
1589 NDD_TRACE("THiE",frame_status,smc->os.hwm.tx_p->tx_free,0) ; in hwm_tx_init()
1620 void hwm_tx_frag(struct s_smc *smc, char far *virt, u_long phys, int len, in hwm_tx_frag() argument
1627 queue = smc->os.hwm.tx_p ; in hwm_tx_frag()
1642 t->txd_txdscr = cpu_to_le32(smc->os.hwm.tx_descr) ; in hwm_tx_frag()
1665 smc->mib.m[MAC0].fddiMACTransmit_Ct++ ; in hwm_tx_frag()
1671 if(!(smc->os.hwm.tx_mb = smt_get_mbuf(smc))) { in hwm_tx_frag()
1672 smc->hw.fp.err_stats.err_no_buf++ ; in hwm_tx_frag()
1676 smc->os.hwm.tx_data = in hwm_tx_frag()
1677 smtod(smc->os.hwm.tx_mb,char *) - 1 ; in hwm_tx_frag()
1680 hwm_cpy_txd2mb(t,smc->os.hwm.tx_data, in hwm_tx_frag()
1681 smc->os.hwm.tx_len) ; in hwm_tx_frag()
1686 if (smc->os.hwm.tx_mb) { in hwm_tx_frag()
1689 memcpy(smc->os.hwm.tx_data,virt,len) ; in hwm_tx_frag()
1690 smc->os.hwm.tx_data += len ; in hwm_tx_frag()
1702 hwm_cpy_txd2mb(t,smc->os.hwm.tx_data, in hwm_tx_frag()
1703 smc->os.hwm.tx_len) ; in hwm_tx_frag()
1706 smc->os.hwm.tx_data = in hwm_tx_frag()
1707 smtod(smc->os.hwm.tx_mb,char *) - 1 ; in hwm_tx_frag()
1708 *(char *)smc->os.hwm.tx_mb->sm_data = in hwm_tx_frag()
1709 *smc->os.hwm.tx_data ; in hwm_tx_frag()
1710 smc->os.hwm.tx_data++ ; in hwm_tx_frag()
1711 smc->os.hwm.tx_mb->sm_len = in hwm_tx_frag()
1712 smc->os.hwm.tx_len - 1 ; in hwm_tx_frag()
1714 smt_received_pack(smc,smc->os.hwm.tx_mb, in hwm_tx_frag()
1726 static void queue_llc_rx(struct s_smc *smc, SMbuf *mb) in queue_llc_rx() argument
1729 smc->os.hwm.queued_rx_frames++ ; in queue_llc_rx()
1731 if (smc->os.hwm.llc_rx_pipe == NULL) { in queue_llc_rx()
1732 smc->os.hwm.llc_rx_pipe = mb ; in queue_llc_rx()
1735 smc->os.hwm.llc_rx_tail->sm_next = mb ; in queue_llc_rx()
1737 smc->os.hwm.llc_rx_tail = mb ; in queue_llc_rx()
1742 if (!smc->os.hwm.isr_flag) { in queue_llc_rx()
1743 smt_force_irq(smc) ; in queue_llc_rx()
1750 static SMbuf *get_llc_rx(struct s_smc *smc) in get_llc_rx() argument
1754 if ((mb = smc->os.hwm.llc_rx_pipe)) { in get_llc_rx()
1755 smc->os.hwm.queued_rx_frames-- ; in get_llc_rx()
1756 smc->os.hwm.llc_rx_pipe = mb->sm_next ; in get_llc_rx()
1766 static void queue_txd_mb(struct s_smc *smc, SMbuf *mb) in queue_txd_mb() argument
1769 smc->os.hwm.queued_txd_mb++ ; in queue_txd_mb()
1771 if (smc->os.hwm.txd_tx_pipe == NULL) { in queue_txd_mb()
1772 smc->os.hwm.txd_tx_pipe = mb ; in queue_txd_mb()
1775 smc->os.hwm.txd_tx_tail->sm_next = mb ; in queue_txd_mb()
1777 smc->os.hwm.txd_tx_tail = mb ; in queue_txd_mb()
1783 static SMbuf *get_txd_mb(struct s_smc *smc) in get_txd_mb() argument
1787 if ((mb = smc->os.hwm.txd_tx_pipe)) { in get_txd_mb()
1788 smc->os.hwm.queued_txd_mb-- ; in get_txd_mb()
1789 smc->os.hwm.txd_tx_pipe = mb->sm_next ; in get_txd_mb()
1798 void smt_send_mbuf(struct s_smc *smc, SMbuf *mb, int fc) in smt_send_mbuf() argument
1844 queue = smc->hw.fp.tx[QUEUE_A0] ; in smt_send_mbuf()
1850 if ((smc->os.hwm.pass_NSA &&(fc == FC_SMT_NSA)) || in smt_send_mbuf()
1851 (smc->os.hwm.pass_SMT &&(fc == FC_SMT_INFO))) in smt_send_mbuf()
1855 if (!smc->hw.mac_ring_is_up || frag_count > queue->tx_free) { in smt_send_mbuf()
1862 smt_free_mbuf(smc,mb) ; in smt_send_mbuf()
1883 phys = dma_master(smc, (void far *)virt[i], in smt_send_mbuf()
1902 smc->mib.m[MAC0].fddiMACTransmit_Ct++ ; in smt_send_mbuf()
1903 queue_txd_mb(smc,mb) ; in smt_send_mbuf()
1908 queue_llc_rx(smc,mb) ; in smt_send_mbuf()
1915 mac_drv_clear_txd(smc) ; in smt_send_mbuf()
1933 static void mac_drv_clear_txd(struct s_smc *smc) in mac_drv_clear_txd() argument
1946 queue = smc->hw.fp.tx[i] ; in mac_drv_clear_txd()
1969 dma_complete(smc, in mac_drv_clear_txd()
1978 mb = get_txd_mb(smc) ; in mac_drv_clear_txd()
1979 smt_free_mbuf(smc,mb) ; in mac_drv_clear_txd()
1984 mac_drv_tx_complete(smc,t2) ; in mac_drv_clear_txd()
1988 mac_drv_tx_complete(smc,queue->tx_curr_get) ; in mac_drv_clear_txd()
2023 void mac_drv_clear_tx_queue(struct s_smc *smc) in mac_drv_clear_tx_queue() argument
2030 if (smc->hw.hw_state != STOPPED) { in mac_drv_clear_tx_queue()
2032 SMT_PANIC(smc,HWM_E0011,HWM_E0011_MSG) ; in mac_drv_clear_tx_queue()
2037 queue = smc->hw.fp.tx[i] ; in mac_drv_clear_tx_queue()
2058 mac_drv_clear_txd(smc) ; in mac_drv_clear_tx_queue()
2061 queue = smc->hw.fp.tx[i] ; in mac_drv_clear_tx_queue()
2115 void mac_drv_debug_lev(struct s_smc *smc, int flag, int lev) in mac_drv_debug_lev() argument