Lines Matching refs:bd
552 struct acx_buf_data *bd = &sc->sc_buf_data; in acx_stop() local
580 buf = &bd->tx_buf[i]; in acx_stop()
599 if (bd->rx_buf[i].rb_mbuf != NULL) { in acx_stop()
601 bd->rx_buf[i].rb_mbuf_dmamap); in acx_stop()
602 m_freem(bd->rx_buf[i].rb_mbuf); in acx_stop()
603 bd->rx_buf[i].rb_mbuf = NULL; in acx_stop()
896 struct acx_buf_data *bd = &sc->sc_buf_data; in acx_start() local
911 idx = bd->tx_free_start; in acx_start()
913 for (buf = &bd->tx_buf[idx]; buf->tb_mbuf == NULL; in acx_start()
914 buf = &bd->tx_buf[idx]) { in acx_start()
1052 bd->tx_used_count++; in acx_start()
1055 bd->tx_free_start = idx; in acx_start()
1057 if (bd->tx_used_count == ACX_TX_DESC_CNT) in acx_start()
1144 struct acx_buf_data *bd; in acx_txeof() local
1151 bd = &sc->sc_buf_data; in acx_txeof()
1152 idx = bd->tx_used_start; in acx_txeof()
1153 for (buf = &bd->tx_buf[idx]; buf->tb_mbuf != NULL; in acx_txeof()
1154 buf = &bd->tx_buf[idx]) { in acx_txeof()
1198 bd->tx_used_count--; in acx_txeof()
1202 bd->tx_used_start = idx; in acx_txeof()
1204 sc->sc_txtimer = bd->tx_used_count == 0 ? 0 : 5; in acx_txeof()
1206 if (bd->tx_used_count != ACX_TX_DESC_CNT) { in acx_txeof()
1285 struct acx_buf_data *bd = &sc->sc_buf_data; in acx_rxeof() local
1296 idx = bd->rx_scan_start; in acx_rxeof()
1301 buf = &bd->rx_buf[idx]; in acx_rxeof()
1308 } while (idx != bd->rx_scan_start); in acx_rxeof()
1326 buf = &bd->rx_buf[idx]; in acx_rxeof()
1415 } while (idx != bd->rx_scan_start); in acx_rxeof()
1421 bd->rx_scan_start = idx; in acx_rxeof()
1888 struct acx_buf_data *bd = &sc->sc_buf_data; in acx_dma_alloc() local
1974 0, 0, &bd->mbuf_tmp_dmamap); in acx_dma_alloc()
1985 MCLBYTES, 0, 0, &bd->rx_buf[i].rb_mbuf_dmamap); in acx_dma_alloc()
1991 bd->rx_buf[i].rb_desc = &rd->rx_ring[i]; in acx_dma_alloc()
1997 MCLBYTES, 0, 0, &bd->tx_buf[i].tb_mbuf_dmamap); in acx_dma_alloc()
2003 bd->tx_buf[i].tb_desc1 = &rd->tx_ring[i * 2]; in acx_dma_alloc()
2004 bd->tx_buf[i].tb_desc2 = &rd->tx_ring[(i * 2) + 1]; in acx_dma_alloc()
2014 struct acx_buf_data *bd = &sc->sc_buf_data; in acx_dma_free() local
2028 if (bd->rx_buf[i].rb_desc != NULL) { in acx_dma_free()
2029 if (bd->rx_buf[i].rb_mbuf != NULL) { in acx_dma_free()
2031 bd->rx_buf[i].rb_mbuf_dmamap); in acx_dma_free()
2032 m_freem(bd->rx_buf[i].rb_mbuf); in acx_dma_free()
2035 bd->rx_buf[i].rb_mbuf_dmamap); in acx_dma_free()
2040 if (bd->tx_buf[i].tb_desc1 != NULL) { in acx_dma_free()
2041 if (bd->tx_buf[i].tb_mbuf != NULL) { in acx_dma_free()
2043 bd->tx_buf[i].tb_mbuf_dmamap); in acx_dma_free()
2044 m_freem(bd->tx_buf[i].tb_mbuf); in acx_dma_free()
2047 bd->tx_buf[i].tb_mbuf_dmamap); in acx_dma_free()
2051 if (bd->mbuf_tmp_dmamap != NULL) in acx_dma_free()
2052 bus_dmamap_destroy(sc->sc_dmat, bd->mbuf_tmp_dmamap); in acx_dma_free()
2059 struct acx_buf_data *bd; in acx_init_tx_ring() local
2080 bd = &sc->sc_buf_data; in acx_init_tx_ring()
2081 bd->tx_free_start = 0; in acx_init_tx_ring()
2082 bd->tx_used_start = 0; in acx_init_tx_ring()
2083 bd->tx_used_count = 0; in acx_init_tx_ring()
2090 struct acx_buf_data *bd; in acx_init_rx_ring() local
2094 bd = &sc->sc_buf_data; in acx_init_rx_ring()
2104 error = acx_newbuf(sc, &bd->rx_buf[i], 1); in acx_init_rx_ring()
2117 bd->rx_scan_start = 0; in acx_init_rx_ring()
2125 struct acx_buf_data *bd; in acx_newbuf() local
2131 bd = &sc->sc_buf_data; in acx_newbuf()
2145 error = bus_dmamap_load_mbuf(sc->sc_dmat, bd->mbuf_tmp_dmamap, m, in acx_newbuf()
2160 rb->rb_mbuf_dmamap = bd->mbuf_tmp_dmamap; in acx_newbuf()
2161 bd->mbuf_tmp_dmamap = map; in acx_newbuf()