Lines Matching refs:dc_cdata
962 sc->dc_cdata.dc_sbuf[h >> 4] |= htole32(1 << (h & 0xF)); in dc_hash_maddr_21143()
978 i = sc->dc_cdata.dc_tx_prod; in dc_setfilt_21143()
979 DC_INC(sc->dc_cdata.dc_tx_prod, DC_TX_LIST_CNT); in dc_setfilt_21143()
980 sc->dc_cdata.dc_tx_cnt++; in dc_setfilt_21143()
982 sp = sc->dc_cdata.dc_sbuf; in dc_setfilt_21143()
989 sc->dc_cdata.dc_tx_chain[i] = (struct mbuf *)sc->dc_cdata.dc_sbuf; in dc_setfilt_21143()
1199 i = sc->dc_cdata.dc_tx_prod; in dc_setfilt_uli()
1200 DC_INC(sc->dc_cdata.dc_tx_prod, DC_TX_LIST_CNT); in dc_setfilt_uli()
1201 sc->dc_cdata.dc_tx_cnt++; in dc_setfilt_uli()
1203 sp = sc->dc_cdata.dc_sbuf; in dc_setfilt_uli()
1210 sc->dc_cdata.dc_tx_chain[i] = (struct mbuf *)sc->dc_cdata.dc_sbuf; in dc_setfilt_uli()
1272 sc->dc_cdata.dc_sbuf[h >> 4] |= htole32(1 << (h & 0xF)); in dc_hash_maddr_xircom()
1288 i = sc->dc_cdata.dc_tx_prod; in dc_setfilt_xircom()
1289 DC_INC(sc->dc_cdata.dc_tx_prod, DC_TX_LIST_CNT); in dc_setfilt_xircom()
1290 sc->dc_cdata.dc_tx_cnt++; in dc_setfilt_xircom()
1292 sp = sc->dc_cdata.dc_sbuf; in dc_setfilt_xircom()
1299 sc->dc_cdata.dc_tx_chain[i] = (struct mbuf *)sc->dc_cdata.dc_sbuf; in dc_setfilt_xircom()
1897 error = bus_dmamem_alloc(sc->dc_stag, (void **)&sc->dc_cdata.dc_sbuf, in dc_dma_alloc()
1904 error = bus_dmamap_load(sc->dc_stag, sc->dc_smap, sc->dc_cdata.dc_sbuf, in dc_dma_alloc()
1934 &sc->dc_cdata.dc_tx_map[i]); in dc_dma_alloc()
1943 &sc->dc_cdata.dc_rx_map[i]); in dc_dma_alloc()
1969 if (sc->dc_cdata.dc_rx_map[i] != NULL) in dc_dma_free()
1971 sc->dc_cdata.dc_rx_map[i]); in dc_dma_free()
1981 if (sc->dc_cdata.dc_tx_map[i] != NULL) in dc_dma_free()
1983 sc->dc_cdata.dc_tx_map[i]); in dc_dma_free()
2012 if (sc->dc_cdata.dc_sbuf != NULL) in dc_dma_free()
2013 bus_dmamem_free(sc->dc_stag, sc->dc_cdata.dc_sbuf, in dc_dma_free()
2580 cd = &sc->dc_cdata; in dc_list_tx_init()
2613 cd = &sc->dc_cdata; in dc_list_rx_init()
2665 if (sc->dc_cdata.dc_rx_chain[i] != NULL) in dc_newbuf()
2666 bus_dmamap_unload(sc->dc_rx_mtag, sc->dc_cdata.dc_rx_map[i]); in dc_newbuf()
2668 map = sc->dc_cdata.dc_rx_map[i]; in dc_newbuf()
2669 sc->dc_cdata.dc_rx_map[i] = sc->dc_sparemap; in dc_newbuf()
2671 sc->dc_cdata.dc_rx_chain[i] = m; in dc_newbuf()
2672 bus_dmamap_sync(sc->dc_rx_mtag, sc->dc_cdata.dc_rx_map[i], in dc_newbuf()
2756 m = sc->dc_cdata.dc_rx_chain[i]; in dc_pnic_rx_bug_war()
2808 pos = sc->dc_cdata.dc_rx_prod; in dc_rx_resync()
2822 sc->dc_cdata.dc_rx_prod = pos; in dc_rx_resync()
2833 m = sc->dc_cdata.dc_rx_chain[i]; in dc_discard_rxbuf()
2863 for (i = sc->dc_cdata.dc_rx_prod; in dc_rxeof()
2877 m = sc->dc_cdata.dc_rx_chain[i]; in dc_rxeof()
2878 bus_dmamap_sync(sc->dc_rx_mtag, sc->dc_cdata.dc_rx_map[i], in dc_rxeof()
2961 sc->dc_cdata.dc_rx_prod = i; in dc_rxeof()
2977 if (sc->dc_cdata.dc_tx_cnt == 0) in dc_txeof()
2989 for (idx = sc->dc_cdata.dc_tx_cons; idx != sc->dc_cdata.dc_tx_prod; in dc_txeof()
2990 DC_INC(idx, DC_TX_LIST_CNT), sc->dc_cdata.dc_tx_cnt--) { in dc_txeof()
2998 if (sc->dc_cdata.dc_tx_chain[idx] == NULL) in dc_txeof()
3019 sc->dc_cdata.dc_tx_chain[idx] = NULL; in dc_txeof()
3060 bus_dmamap_sync(sc->dc_tx_mtag, sc->dc_cdata.dc_tx_map[idx], in dc_txeof()
3062 bus_dmamap_unload(sc->dc_tx_mtag, sc->dc_cdata.dc_tx_map[idx]); in dc_txeof()
3063 m_freem(sc->dc_cdata.dc_tx_chain[idx]); in dc_txeof()
3064 sc->dc_cdata.dc_tx_chain[idx] = NULL; in dc_txeof()
3066 sc->dc_cdata.dc_tx_cons = idx; in dc_txeof()
3068 if (sc->dc_cdata.dc_tx_cnt <= DC_TX_LIST_CNT - DC_TX_LIST_RSVD) { in dc_txeof()
3070 if (sc->dc_cdata.dc_tx_cnt == 0) in dc_txeof()
3120 sc->dc_cdata.dc_tx_cnt == 0) in dc_tick()
3259 if (status & DC_ISR_TX_IDLE && sc->dc_cdata.dc_tx_cnt) in dc_poll()
3323 if (sc->dc_cdata.dc_tx_cnt) { in dc_intr()
3393 DC_TX_LIST_CNT - i + sc->dc_cdata.dc_tx_cnt <= in dc_encap()
3408 idx = sc->dc_cdata.dc_tx_prod; in dc_encap()
3410 sc->dc_cdata.dc_tx_map[idx], *m_head, segs, &nseg, 0); in dc_encap()
3420 sc->dc_cdata.dc_tx_map[idx], *m_head, segs, &nseg, 0); in dc_encap()
3437 if (sc->dc_cdata.dc_tx_cnt + nseg > DC_TX_LIST_CNT - DC_TX_LIST_RSVD) { in dc_encap()
3438 bus_dmamap_unload(sc->dc_tx_mtag, sc->dc_cdata.dc_tx_map[idx]); in dc_encap()
3441 bus_dmamap_sync(sc->dc_tx_mtag, sc->dc_cdata.dc_tx_map[idx], in dc_encap()
3444 first = cur = frag = sc->dc_cdata.dc_tx_prod; in dc_encap()
3448 (first != sc->dc_cdata.dc_tx_first)) { in dc_encap()
3450 sc->dc_cdata.dc_tx_map[first]); in dc_encap()
3468 sc->dc_cdata.dc_tx_prod = frag; in dc_encap()
3469 sc->dc_cdata.dc_tx_cnt += nseg; in dc_encap()
3470 sc->dc_cdata.dc_tx_chain[cur] = *m_head; in dc_encap()
3478 ++sc->dc_cdata.dc_tx_pkts >= 8) { in dc_encap()
3479 sc->dc_cdata.dc_tx_pkts = 0; in dc_encap()
3491 map = sc->dc_cdata.dc_tx_map[cur]; in dc_encap()
3492 sc->dc_cdata.dc_tx_map[cur] = sc->dc_cdata.dc_tx_map[first]; in dc_encap()
3493 sc->dc_cdata.dc_tx_map[first] = map; in dc_encap()
3531 sc->dc_cdata.dc_tx_first = sc->dc_cdata.dc_tx_prod; in dc_start_locked()
3537 if (sc->dc_cdata.dc_tx_cnt > DC_TX_LIST_CNT - DC_TX_LIST_RSVD) { in dc_start_locked()
3960 cd = &sc->dc_cdata; in dc_stop()