Lines Matching refs:mb

78 static void queue_llc_rx(struct s_smc *smc, SMbuf *mb);
79 static void smt_to_llc(struct s_smc *smc, SMbuf *mb);
82 static void queue_txd_mb(struct s_smc *smc, SMbuf *mb);
141 void smt_free_mbuf(struct s_smc *smc, SMbuf *mb);
281 smc->os.hwm.mbuf_pool.mb_start=(SMbuf *)(&smc->os.hwm.mbuf_pool.mb[0]) ; in mac_drv_init()
424 SMbuf *mb ; in init_fddi_driver() local
434 mb = smc->os.hwm.mbuf_pool.mb_start ; in init_fddi_driver()
437 mb->sm_use_count = 1 ; in init_fddi_driver()
438 smt_free_mbuf(smc,mb) ; in init_fddi_driver()
439 mb++ ; in init_fddi_driver()
442 mb = mb_start ; in init_fddi_driver()
446 mb->sm_use_count = 1 ; in init_fddi_driver()
447 smt_free_mbuf(smc,mb) ; in init_fddi_driver()
448 mb++ ; in init_fddi_driver()
488 register SMbuf *mb ; in smt_get_mbuf() local
491 mb = smc->os.hwm.mbuf_pool.mb_free ; in smt_get_mbuf()
493 mb = mb_free ; in smt_get_mbuf()
495 if (mb) { in smt_get_mbuf()
497 smc->os.hwm.mbuf_pool.mb_free = mb->sm_next ; in smt_get_mbuf()
499 mb_free = mb->sm_next ; in smt_get_mbuf()
501 mb->sm_off = 8 ; in smt_get_mbuf()
502 mb->sm_use_count = 1 ; in smt_get_mbuf()
504 DB_GEN("get SMbuf: mb = %x",(void *)mb,0,3) ; in smt_get_mbuf()
505 return mb; /* May be NULL */ in smt_get_mbuf()
508 void smt_free_mbuf(struct s_smc *smc, SMbuf *mb) in smt_free_mbuf() argument
511 if (mb) { in smt_free_mbuf()
512 mb->sm_use_count-- ; in smt_free_mbuf()
513 DB_GEN("free_mbuf: sm_use_count = %d",mb->sm_use_count,0,3) ; in smt_free_mbuf()
519 if (!mb->sm_use_count) { in smt_free_mbuf()
520 DB_GEN("free SMbuf: mb = %x",(void *)mb,0,3) ; in smt_free_mbuf()
522 mb->sm_next = smc->os.hwm.mbuf_pool.mb_free ; in smt_free_mbuf()
523 smc->os.hwm.mbuf_pool.mb_free = mb ; in smt_free_mbuf()
525 mb->sm_next = mb_free ; in smt_free_mbuf()
526 mb_free = mb ; in smt_free_mbuf()
713 SMbuf *mb ; in fddi_isr() local
849 while ((mb = get_llc_rx(smc))) { in fddi_isr()
850 smt_to_llc(smc,mb) ; in fddi_isr()
856 while (!offDepth && (mb = get_llc_rx(smc))) { in fddi_isr()
857 smt_to_llc(smc,mb) ; in fddi_isr()
1055 SMbuf *mb ; in process_receive() local
1266 if (!(mb = smt_get_mbuf(smc))) { in process_receive()
1271 data = smtod(mb,char *) - 1 ; in process_receive()
1285 data = smtod(mb,char *) - 1 ; in process_receive()
1287 fc = *(char *)mb->sm_data = *data ; in process_receive()
1288 mb->sm_len = len - 1 ; /* len - fc */ in process_receive()
1309 smt_received_pack(smc,mb,(int)(rfsw>>25)) ; in process_receive()
1330 smt_received_pack(smc,mb,(int)(rfsw>>25)) ; in process_receive()
1342 smt_free_mbuf(smc,mb) ; in process_receive()
1349 smt_free_mbuf(smc,mb) ; in process_receive()
1380 static void smt_to_llc(struct s_smc *smc, SMbuf *mb) in smt_to_llc() argument
1385 smc->os.hwm.r.len = mb->sm_len ; in smt_to_llc()
1386 smc->os.hwm.r.mb_pos = smtod(mb,char *) ; in smt_to_llc()
1388 (void)mac_drv_rx_init(smc,(int)mb->sm_len,(int)fc, in smt_to_llc()
1389 smc->os.hwm.r.mb_pos,(int)mb->sm_len) ; in smt_to_llc()
1390 smt_free_mbuf(smc,mb) ; in smt_to_llc()
1734 static void queue_llc_rx(struct s_smc *smc, SMbuf *mb) in queue_llc_rx() argument
1736 DB_GEN("queue_llc_rx: mb = %x",(void *)mb,0,4) ; in queue_llc_rx()
1738 mb->sm_next = (SMbuf *)NULL ; in queue_llc_rx()
1740 smc->os.hwm.llc_rx_pipe = mb ; in queue_llc_rx()
1743 smc->os.hwm.llc_rx_tail->sm_next = mb ; in queue_llc_rx()
1745 smc->os.hwm.llc_rx_tail = mb ; in queue_llc_rx()
1760 SMbuf *mb ; in get_llc_rx() local
1762 if ((mb = smc->os.hwm.llc_rx_pipe)) { in get_llc_rx()
1764 smc->os.hwm.llc_rx_pipe = mb->sm_next ; in get_llc_rx()
1766 DB_GEN("get_llc_rx: mb = 0x%x",(void *)mb,0,4) ; in get_llc_rx()
1767 return mb; in get_llc_rx()
1774 static void queue_txd_mb(struct s_smc *smc, SMbuf *mb) in queue_txd_mb() argument
1776 DB_GEN("_rx: queue_txd_mb = %x",(void *)mb,0,4) ; in queue_txd_mb()
1778 mb->sm_next = (SMbuf *)NULL ; in queue_txd_mb()
1780 smc->os.hwm.txd_tx_pipe = mb ; in queue_txd_mb()
1783 smc->os.hwm.txd_tx_tail->sm_next = mb ; in queue_txd_mb()
1785 smc->os.hwm.txd_tx_tail = mb ; in queue_txd_mb()
1793 SMbuf *mb ; in get_txd_mb() local
1795 if ((mb = smc->os.hwm.txd_tx_pipe)) { in get_txd_mb()
1797 smc->os.hwm.txd_tx_pipe = mb->sm_next ; in get_txd_mb()
1799 DB_GEN("get_txd_mb: mb = 0x%x",(void *)mb,0,4) ; in get_txd_mb()
1800 return mb; in get_txd_mb()
1806 void smt_send_mbuf(struct s_smc *smc, SMbuf *mb, int fc) in smt_send_mbuf() argument
1821 NDD_TRACE("THSB",mb,fc,0) ; in smt_send_mbuf()
1822 DB_TX("smt_send_mbuf: mb = 0x%x, fc = 0x%x",mb,fc,4) ; in smt_send_mbuf()
1824 mb->sm_off-- ; /* set to fc */ in smt_send_mbuf()
1825 mb->sm_len++ ; /* + fc */ in smt_send_mbuf()
1826 data = smtod(mb,char *) ; in smt_send_mbuf()
1835 len = mb->sm_len ; in smt_send_mbuf()
1870 smt_free_mbuf(smc,mb) ; in smt_send_mbuf()
1877 mb->sm_use_count = 2 ; in smt_send_mbuf()
1888 (((__u32)(mb->sm_len-1)&3) << 27)) ; in smt_send_mbuf()
1911 queue_txd_mb(smc,mb) ; in smt_send_mbuf()
1916 queue_llc_rx(smc,mb) ; in smt_send_mbuf()
1946 SMbuf *mb ; in mac_drv_clear_txd() local
1986 mb = get_txd_mb(smc) ; in mac_drv_clear_txd()
1987 smt_free_mbuf(smc,mb) ; in mac_drv_clear_txd()