Lines Matching refs:dc_cdata
977 i = sc->dc_cdata.dc_tx_prod; in dc_setfilt_21143()
978 DC_INC(sc->dc_cdata.dc_tx_prod, DC_TX_LIST_CNT); in dc_setfilt_21143()
979 sc->dc_cdata.dc_tx_cnt++; in dc_setfilt_21143()
981 sp = sc->dc_cdata.dc_sbuf; in dc_setfilt_21143()
988 sc->dc_cdata.dc_tx_chain[i] = (struct mbuf *)sc->dc_cdata.dc_sbuf; in dc_setfilt_21143()
1183 i = sc->dc_cdata.dc_tx_prod; in dc_setfilt_uli()
1184 DC_INC(sc->dc_cdata.dc_tx_prod, DC_TX_LIST_CNT); in dc_setfilt_uli()
1185 sc->dc_cdata.dc_tx_cnt++; in dc_setfilt_uli()
1187 sp = sc->dc_cdata.dc_sbuf; in dc_setfilt_uli()
1194 sc->dc_cdata.dc_tx_chain[i] = (struct mbuf *)sc->dc_cdata.dc_sbuf; in dc_setfilt_uli()
1274 i = sc->dc_cdata.dc_tx_prod; in dc_setfilt_xircom()
1275 DC_INC(sc->dc_cdata.dc_tx_prod, DC_TX_LIST_CNT); in dc_setfilt_xircom()
1276 sc->dc_cdata.dc_tx_cnt++; in dc_setfilt_xircom()
1278 sp = sc->dc_cdata.dc_sbuf; in dc_setfilt_xircom()
1285 sc->dc_cdata.dc_tx_chain[i] = (struct mbuf *)sc->dc_cdata.dc_sbuf; in dc_setfilt_xircom()
1891 error = bus_dmamem_alloc(sc->dc_stag, (void **)&sc->dc_cdata.dc_sbuf, in dc_dma_alloc()
1898 error = bus_dmamap_load(sc->dc_stag, sc->dc_smap, sc->dc_cdata.dc_sbuf, in dc_dma_alloc()
1928 &sc->dc_cdata.dc_tx_map[i]); in dc_dma_alloc()
1937 &sc->dc_cdata.dc_rx_map[i]); in dc_dma_alloc()
1963 if (sc->dc_cdata.dc_rx_map[i] != NULL) in dc_dma_free()
1965 sc->dc_cdata.dc_rx_map[i]); in dc_dma_free()
1975 if (sc->dc_cdata.dc_tx_map[i] != NULL) in dc_dma_free()
1977 sc->dc_cdata.dc_tx_map[i]); in dc_dma_free()
2006 if (sc->dc_smap != NULL && sc->dc_cdata.dc_sbuf != NULL) in dc_dma_free()
2007 bus_dmamem_free(sc->dc_stag, sc->dc_cdata.dc_sbuf, in dc_dma_free()
2590 cd = &sc->dc_cdata; in dc_list_tx_init()
2623 cd = &sc->dc_cdata; in dc_list_rx_init()
2675 if (sc->dc_cdata.dc_rx_chain[i] != NULL) in dc_newbuf()
2676 bus_dmamap_unload(sc->dc_rx_mtag, sc->dc_cdata.dc_rx_map[i]); in dc_newbuf()
2678 map = sc->dc_cdata.dc_rx_map[i]; in dc_newbuf()
2679 sc->dc_cdata.dc_rx_map[i] = sc->dc_sparemap; in dc_newbuf()
2681 sc->dc_cdata.dc_rx_chain[i] = m; in dc_newbuf()
2682 bus_dmamap_sync(sc->dc_rx_mtag, sc->dc_cdata.dc_rx_map[i], in dc_newbuf()
2766 m = sc->dc_cdata.dc_rx_chain[i]; in dc_pnic_rx_bug_war()
2818 pos = sc->dc_cdata.dc_rx_prod; in dc_rx_resync()
2832 sc->dc_cdata.dc_rx_prod = pos; in dc_rx_resync()
2843 m = sc->dc_cdata.dc_rx_chain[i]; in dc_discard_rxbuf()
2873 for (i = sc->dc_cdata.dc_rx_prod; in dc_rxeof()
2887 m = sc->dc_cdata.dc_rx_chain[i]; in dc_rxeof()
2888 bus_dmamap_sync(sc->dc_rx_mtag, sc->dc_cdata.dc_rx_map[i], in dc_rxeof()
2971 sc->dc_cdata.dc_rx_prod = i; in dc_rxeof()
2987 if (sc->dc_cdata.dc_tx_cnt == 0) in dc_txeof()
2999 for (idx = sc->dc_cdata.dc_tx_cons; idx != sc->dc_cdata.dc_tx_prod; in dc_txeof()
3000 DC_INC(idx, DC_TX_LIST_CNT), sc->dc_cdata.dc_tx_cnt--) { in dc_txeof()
3008 if (sc->dc_cdata.dc_tx_chain[idx] == NULL) in dc_txeof()
3029 sc->dc_cdata.dc_tx_chain[idx] = NULL; in dc_txeof()
3070 bus_dmamap_sync(sc->dc_tx_mtag, sc->dc_cdata.dc_tx_map[idx], in dc_txeof()
3072 bus_dmamap_unload(sc->dc_tx_mtag, sc->dc_cdata.dc_tx_map[idx]); in dc_txeof()
3073 m_freem(sc->dc_cdata.dc_tx_chain[idx]); in dc_txeof()
3074 sc->dc_cdata.dc_tx_chain[idx] = NULL; in dc_txeof()
3076 sc->dc_cdata.dc_tx_cons = idx; in dc_txeof()
3078 if (sc->dc_cdata.dc_tx_cnt <= DC_TX_LIST_CNT - DC_TX_LIST_RSVD) { in dc_txeof()
3080 if (sc->dc_cdata.dc_tx_cnt == 0) in dc_txeof()
3130 sc->dc_cdata.dc_tx_cnt == 0) in dc_tick()
3269 if (status & DC_ISR_TX_IDLE && sc->dc_cdata.dc_tx_cnt) in dc_poll()
3333 if (sc->dc_cdata.dc_tx_cnt) { in dc_intr()
3403 DC_TX_LIST_CNT - i + sc->dc_cdata.dc_tx_cnt <= in dc_encap()
3418 idx = sc->dc_cdata.dc_tx_prod; in dc_encap()
3420 sc->dc_cdata.dc_tx_map[idx], *m_head, segs, &nseg, 0); in dc_encap()
3430 sc->dc_cdata.dc_tx_map[idx], *m_head, segs, &nseg, 0); in dc_encap()
3447 if (sc->dc_cdata.dc_tx_cnt + nseg > DC_TX_LIST_CNT - DC_TX_LIST_RSVD) { in dc_encap()
3448 bus_dmamap_unload(sc->dc_tx_mtag, sc->dc_cdata.dc_tx_map[idx]); in dc_encap()
3451 bus_dmamap_sync(sc->dc_tx_mtag, sc->dc_cdata.dc_tx_map[idx], in dc_encap()
3454 first = cur = frag = sc->dc_cdata.dc_tx_prod; in dc_encap()
3458 (first != sc->dc_cdata.dc_tx_first)) { in dc_encap()
3460 sc->dc_cdata.dc_tx_map[first]); in dc_encap()
3478 sc->dc_cdata.dc_tx_prod = frag; in dc_encap()
3479 sc->dc_cdata.dc_tx_cnt += nseg; in dc_encap()
3480 sc->dc_cdata.dc_tx_chain[cur] = *m_head; in dc_encap()
3488 ++sc->dc_cdata.dc_tx_pkts >= 8) { in dc_encap()
3489 sc->dc_cdata.dc_tx_pkts = 0; in dc_encap()
3501 map = sc->dc_cdata.dc_tx_map[cur]; in dc_encap()
3502 sc->dc_cdata.dc_tx_map[cur] = sc->dc_cdata.dc_tx_map[first]; in dc_encap()
3503 sc->dc_cdata.dc_tx_map[first] = map; in dc_encap()
3541 sc->dc_cdata.dc_tx_first = sc->dc_cdata.dc_tx_prod; in dc_start_locked()
3547 if (sc->dc_cdata.dc_tx_cnt > DC_TX_LIST_CNT - DC_TX_LIST_RSVD) { in dc_start_locked()
3970 cd = &sc->dc_cdata; in dc_stop()