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()
2582 cd = &sc->dc_cdata; in dc_list_tx_init()
2615 cd = &sc->dc_cdata; in dc_list_rx_init()
2667 if (sc->dc_cdata.dc_rx_chain[i] != NULL) in dc_newbuf()
2668 bus_dmamap_unload(sc->dc_rx_mtag, sc->dc_cdata.dc_rx_map[i]); in dc_newbuf()
2670 map = sc->dc_cdata.dc_rx_map[i]; in dc_newbuf()
2671 sc->dc_cdata.dc_rx_map[i] = sc->dc_sparemap; in dc_newbuf()
2673 sc->dc_cdata.dc_rx_chain[i] = m; in dc_newbuf()
2674 bus_dmamap_sync(sc->dc_rx_mtag, sc->dc_cdata.dc_rx_map[i], in dc_newbuf()
2758 m = sc->dc_cdata.dc_rx_chain[i]; in dc_pnic_rx_bug_war()
2810 pos = sc->dc_cdata.dc_rx_prod; in dc_rx_resync()
2824 sc->dc_cdata.dc_rx_prod = pos; in dc_rx_resync()
2835 m = sc->dc_cdata.dc_rx_chain[i]; in dc_discard_rxbuf()
2865 for (i = sc->dc_cdata.dc_rx_prod; in dc_rxeof()
2879 m = sc->dc_cdata.dc_rx_chain[i]; in dc_rxeof()
2880 bus_dmamap_sync(sc->dc_rx_mtag, sc->dc_cdata.dc_rx_map[i], in dc_rxeof()
2963 sc->dc_cdata.dc_rx_prod = i; in dc_rxeof()
2979 if (sc->dc_cdata.dc_tx_cnt == 0) in dc_txeof()
2991 for (idx = sc->dc_cdata.dc_tx_cons; idx != sc->dc_cdata.dc_tx_prod; in dc_txeof()
2992 DC_INC(idx, DC_TX_LIST_CNT), sc->dc_cdata.dc_tx_cnt--) { in dc_txeof()
3000 if (sc->dc_cdata.dc_tx_chain[idx] == NULL) in dc_txeof()
3021 sc->dc_cdata.dc_tx_chain[idx] = NULL; in dc_txeof()
3062 bus_dmamap_sync(sc->dc_tx_mtag, sc->dc_cdata.dc_tx_map[idx], in dc_txeof()
3064 bus_dmamap_unload(sc->dc_tx_mtag, sc->dc_cdata.dc_tx_map[idx]); in dc_txeof()
3065 m_freem(sc->dc_cdata.dc_tx_chain[idx]); in dc_txeof()
3066 sc->dc_cdata.dc_tx_chain[idx] = NULL; in dc_txeof()
3068 sc->dc_cdata.dc_tx_cons = idx; in dc_txeof()
3070 if (sc->dc_cdata.dc_tx_cnt <= DC_TX_LIST_CNT - DC_TX_LIST_RSVD) { in dc_txeof()
3072 if (sc->dc_cdata.dc_tx_cnt == 0) in dc_txeof()
3122 sc->dc_cdata.dc_tx_cnt == 0) in dc_tick()
3261 if (status & DC_ISR_TX_IDLE && sc->dc_cdata.dc_tx_cnt) in dc_poll()
3325 if (sc->dc_cdata.dc_tx_cnt) { in dc_intr()
3395 DC_TX_LIST_CNT - i + sc->dc_cdata.dc_tx_cnt <= in dc_encap()
3410 idx = sc->dc_cdata.dc_tx_prod; in dc_encap()
3412 sc->dc_cdata.dc_tx_map[idx], *m_head, segs, &nseg, 0); in dc_encap()
3422 sc->dc_cdata.dc_tx_map[idx], *m_head, segs, &nseg, 0); in dc_encap()
3439 if (sc->dc_cdata.dc_tx_cnt + nseg > DC_TX_LIST_CNT - DC_TX_LIST_RSVD) { in dc_encap()
3440 bus_dmamap_unload(sc->dc_tx_mtag, sc->dc_cdata.dc_tx_map[idx]); in dc_encap()
3443 bus_dmamap_sync(sc->dc_tx_mtag, sc->dc_cdata.dc_tx_map[idx], in dc_encap()
3446 first = cur = frag = sc->dc_cdata.dc_tx_prod; in dc_encap()
3450 (first != sc->dc_cdata.dc_tx_first)) { in dc_encap()
3452 sc->dc_cdata.dc_tx_map[first]); in dc_encap()
3470 sc->dc_cdata.dc_tx_prod = frag; in dc_encap()
3471 sc->dc_cdata.dc_tx_cnt += nseg; in dc_encap()
3472 sc->dc_cdata.dc_tx_chain[cur] = *m_head; in dc_encap()
3480 ++sc->dc_cdata.dc_tx_pkts >= 8) { in dc_encap()
3481 sc->dc_cdata.dc_tx_pkts = 0; in dc_encap()
3493 map = sc->dc_cdata.dc_tx_map[cur]; in dc_encap()
3494 sc->dc_cdata.dc_tx_map[cur] = sc->dc_cdata.dc_tx_map[first]; in dc_encap()
3495 sc->dc_cdata.dc_tx_map[first] = map; in dc_encap()
3533 sc->dc_cdata.dc_tx_first = sc->dc_cdata.dc_tx_prod; in dc_start_locked()
3539 if (sc->dc_cdata.dc_tx_cnt > DC_TX_LIST_CNT - DC_TX_LIST_RSVD) { in dc_start_locked()
3962 cd = &sc->dc_cdata; in dc_stop()