Lines Matching refs:dc_cdata
967 sc->dc_cdata.dc_sbuf[h >> 4] |= htole32(1 << (h & 0xF)); in dc_hash_maddr_21143()
983 i = sc->dc_cdata.dc_tx_prod; in dc_setfilt_21143()
984 DC_INC(sc->dc_cdata.dc_tx_prod, DC_TX_LIST_CNT); in dc_setfilt_21143()
985 sc->dc_cdata.dc_tx_cnt++; in dc_setfilt_21143()
987 sp = sc->dc_cdata.dc_sbuf; in dc_setfilt_21143()
994 sc->dc_cdata.dc_tx_chain[i] = (struct mbuf *)sc->dc_cdata.dc_sbuf; in dc_setfilt_21143()
1204 i = sc->dc_cdata.dc_tx_prod; in dc_setfilt_uli()
1205 DC_INC(sc->dc_cdata.dc_tx_prod, DC_TX_LIST_CNT); in dc_setfilt_uli()
1206 sc->dc_cdata.dc_tx_cnt++; in dc_setfilt_uli()
1208 sp = sc->dc_cdata.dc_sbuf; in dc_setfilt_uli()
1215 sc->dc_cdata.dc_tx_chain[i] = (struct mbuf *)sc->dc_cdata.dc_sbuf; in dc_setfilt_uli()
1277 sc->dc_cdata.dc_sbuf[h >> 4] |= htole32(1 << (h & 0xF)); in dc_hash_maddr_xircom()
1293 i = sc->dc_cdata.dc_tx_prod; in dc_setfilt_xircom()
1294 DC_INC(sc->dc_cdata.dc_tx_prod, DC_TX_LIST_CNT); in dc_setfilt_xircom()
1295 sc->dc_cdata.dc_tx_cnt++; in dc_setfilt_xircom()
1297 sp = sc->dc_cdata.dc_sbuf; in dc_setfilt_xircom()
1304 sc->dc_cdata.dc_tx_chain[i] = (struct mbuf *)sc->dc_cdata.dc_sbuf; in dc_setfilt_xircom()
1902 error = bus_dmamem_alloc(sc->dc_stag, (void **)&sc->dc_cdata.dc_sbuf, in dc_dma_alloc()
1909 error = bus_dmamap_load(sc->dc_stag, sc->dc_smap, sc->dc_cdata.dc_sbuf, in dc_dma_alloc()
1939 &sc->dc_cdata.dc_tx_map[i]); in dc_dma_alloc()
1948 &sc->dc_cdata.dc_rx_map[i]); in dc_dma_alloc()
1974 if (sc->dc_cdata.dc_rx_map[i] != NULL) in dc_dma_free()
1976 sc->dc_cdata.dc_rx_map[i]); in dc_dma_free()
1986 if (sc->dc_cdata.dc_tx_map[i] != NULL) in dc_dma_free()
1988 sc->dc_cdata.dc_tx_map[i]); in dc_dma_free()
2017 if (sc->dc_cdata.dc_sbuf != NULL) in dc_dma_free()
2018 bus_dmamem_free(sc->dc_stag, sc->dc_cdata.dc_sbuf, in dc_dma_free()
2593 cd = &sc->dc_cdata; in dc_list_tx_init()
2626 cd = &sc->dc_cdata; in dc_list_rx_init()
2678 if (sc->dc_cdata.dc_rx_chain[i] != NULL) in dc_newbuf()
2679 bus_dmamap_unload(sc->dc_rx_mtag, sc->dc_cdata.dc_rx_map[i]); in dc_newbuf()
2681 map = sc->dc_cdata.dc_rx_map[i]; in dc_newbuf()
2682 sc->dc_cdata.dc_rx_map[i] = sc->dc_sparemap; in dc_newbuf()
2684 sc->dc_cdata.dc_rx_chain[i] = m; in dc_newbuf()
2685 bus_dmamap_sync(sc->dc_rx_mtag, sc->dc_cdata.dc_rx_map[i], in dc_newbuf()
2769 m = sc->dc_cdata.dc_rx_chain[i]; in dc_pnic_rx_bug_war()
2821 pos = sc->dc_cdata.dc_rx_prod; in dc_rx_resync()
2835 sc->dc_cdata.dc_rx_prod = pos; in dc_rx_resync()
2846 m = sc->dc_cdata.dc_rx_chain[i]; in dc_discard_rxbuf()
2876 for (i = sc->dc_cdata.dc_rx_prod; in dc_rxeof()
2890 m = sc->dc_cdata.dc_rx_chain[i]; in dc_rxeof()
2891 bus_dmamap_sync(sc->dc_rx_mtag, sc->dc_cdata.dc_rx_map[i], in dc_rxeof()
2974 sc->dc_cdata.dc_rx_prod = i; in dc_rxeof()
2990 if (sc->dc_cdata.dc_tx_cnt == 0) in dc_txeof()
3002 for (idx = sc->dc_cdata.dc_tx_cons; idx != sc->dc_cdata.dc_tx_prod; in dc_txeof()
3003 DC_INC(idx, DC_TX_LIST_CNT), sc->dc_cdata.dc_tx_cnt--) { in dc_txeof()
3011 if (sc->dc_cdata.dc_tx_chain[idx] == NULL) in dc_txeof()
3032 sc->dc_cdata.dc_tx_chain[idx] = NULL; in dc_txeof()
3073 bus_dmamap_sync(sc->dc_tx_mtag, sc->dc_cdata.dc_tx_map[idx], in dc_txeof()
3075 bus_dmamap_unload(sc->dc_tx_mtag, sc->dc_cdata.dc_tx_map[idx]); in dc_txeof()
3076 m_freem(sc->dc_cdata.dc_tx_chain[idx]); in dc_txeof()
3077 sc->dc_cdata.dc_tx_chain[idx] = NULL; in dc_txeof()
3079 sc->dc_cdata.dc_tx_cons = idx; in dc_txeof()
3081 if (sc->dc_cdata.dc_tx_cnt <= DC_TX_LIST_CNT - DC_TX_LIST_RSVD) { in dc_txeof()
3083 if (sc->dc_cdata.dc_tx_cnt == 0) in dc_txeof()
3133 sc->dc_cdata.dc_tx_cnt == 0) in dc_tick()
3272 if (status & DC_ISR_TX_IDLE && sc->dc_cdata.dc_tx_cnt) in dc_poll()
3336 if (sc->dc_cdata.dc_tx_cnt) { in dc_intr()
3406 DC_TX_LIST_CNT - i + sc->dc_cdata.dc_tx_cnt <= in dc_encap()
3421 idx = sc->dc_cdata.dc_tx_prod; in dc_encap()
3423 sc->dc_cdata.dc_tx_map[idx], *m_head, segs, &nseg, 0); in dc_encap()
3433 sc->dc_cdata.dc_tx_map[idx], *m_head, segs, &nseg, 0); in dc_encap()
3450 if (sc->dc_cdata.dc_tx_cnt + nseg > DC_TX_LIST_CNT - DC_TX_LIST_RSVD) { in dc_encap()
3451 bus_dmamap_unload(sc->dc_tx_mtag, sc->dc_cdata.dc_tx_map[idx]); in dc_encap()
3454 bus_dmamap_sync(sc->dc_tx_mtag, sc->dc_cdata.dc_tx_map[idx], in dc_encap()
3457 first = cur = frag = sc->dc_cdata.dc_tx_prod; in dc_encap()
3461 (first != sc->dc_cdata.dc_tx_first)) { in dc_encap()
3463 sc->dc_cdata.dc_tx_map[first]); in dc_encap()
3481 sc->dc_cdata.dc_tx_prod = frag; in dc_encap()
3482 sc->dc_cdata.dc_tx_cnt += nseg; in dc_encap()
3483 sc->dc_cdata.dc_tx_chain[cur] = *m_head; in dc_encap()
3491 ++sc->dc_cdata.dc_tx_pkts >= 8) { in dc_encap()
3492 sc->dc_cdata.dc_tx_pkts = 0; in dc_encap()
3504 map = sc->dc_cdata.dc_tx_map[cur]; in dc_encap()
3505 sc->dc_cdata.dc_tx_map[cur] = sc->dc_cdata.dc_tx_map[first]; in dc_encap()
3506 sc->dc_cdata.dc_tx_map[first] = map; in dc_encap()
3544 sc->dc_cdata.dc_tx_first = sc->dc_cdata.dc_tx_prod; in dc_start_locked()
3550 if (sc->dc_cdata.dc_tx_cnt > DC_TX_LIST_CNT - DC_TX_LIST_RSVD) { in dc_start_locked()
3973 cd = &sc->dc_cdata; in dc_stop()