Lines Matching refs:cd
1232 struct sis_chain_data *cd = &sc->sis_cdata; in sis_list_tx_init() local
1245 cd->sis_tx_prod = cd->sis_tx_cons = cd->sis_tx_cnt = 0; in sis_list_tx_init()
1259 struct sis_chain_data *cd = &sc->sis_cdata; in sis_list_rx_init() local
1277 cd->sis_rx_prod = 0; in sis_list_rx_init()
1288 struct sis_chain_data *cd = &sc->sis_cdata; in sis_newbuf() local
1289 struct sis_rx_data *rd = &cd->sis_rx_data[idx]; in sis_newbuf()
1304 error = bus_dmamap_load_mbuf_segment(cd->sis_rxbuf_tag, in sis_newbuf()
1305 cd->sis_rx_tmpmap, m, &seg, 1, &nseg, BUS_DMA_NOWAIT); in sis_newbuf()
1315 bus_dmamap_sync(cd->sis_rxbuf_tag, rd->sis_map, in sis_newbuf()
1317 bus_dmamap_unload(cd->sis_rxbuf_tag, rd->sis_map); in sis_newbuf()
1321 map = cd->sis_rx_tmpmap; in sis_newbuf()
1322 cd->sis_rx_tmpmap = rd->sis_map; in sis_newbuf()
1425 struct sis_chain_data *cd = &sc->sis_cdata; in sis_txeof() local
1438 td = &cd->sis_tx_data[idx]; in sis_txeof()
1459 bus_dmamap_unload(cd->sis_txbuf_tag, td->sis_map); in sis_txeof()
1470 if (cd->sis_tx_cnt == 0) in sis_txeof()
1636 struct sis_chain_data *cd = &sc->sis_cdata; in sis_encap() local
1642 maxsegs = SIS_TX_LIST_CNT - SIS_NSEGS_RESERVED - cd->sis_tx_cnt; in sis_encap()
1647 map = cd->sis_tx_data[*txidx].sis_map; in sis_encap()
1648 error = bus_dmamap_load_mbuf_defrag(cd->sis_txbuf_tag, map, m_head, in sis_encap()
1655 bus_dmamap_sync(cd->sis_txbuf_tag, map, BUS_DMASYNC_PREWRITE); in sis_encap()
1673 cd->sis_tx_data[*txidx].sis_map = cd->sis_tx_data[cur].sis_map; in sis_encap()
1674 cd->sis_tx_data[cur].sis_map = map; in sis_encap()
1676 cd->sis_tx_data[cur].sis_mbuf = *m_head; in sis_encap()
1678 cd->sis_tx_cnt += nsegs; in sis_encap()
2029 struct sis_chain_data *cd = &sc->sis_cdata; in sis_stop() local
2051 struct sis_rx_data *rd = &cd->sis_rx_data[i]; in sis_stop()
2054 bus_dmamap_unload(cd->sis_rxbuf_tag, rd->sis_map); in sis_stop()
2065 struct sis_tx_data *td = &cd->sis_tx_data[i]; in sis_stop()
2068 bus_dmamap_unload(cd->sis_txbuf_tag, td->sis_map); in sis_stop()
2098 struct sis_chain_data *cd = &sc->sis_cdata; in sis_dma_alloc() local
2148 &cd->sis_txbuf_tag); in sis_dma_alloc()
2156 error = bus_dmamap_create(cd->sis_txbuf_tag, BUS_DMA_WAITOK, in sis_dma_alloc()
2157 &cd->sis_tx_data[i].sis_map); in sis_dma_alloc()
2162 bus_dmamap_destroy(cd->sis_txbuf_tag, in sis_dma_alloc()
2163 cd->sis_tx_data[j].sis_map); in sis_dma_alloc()
2165 bus_dma_tag_destroy(cd->sis_txbuf_tag); in sis_dma_alloc()
2166 cd->sis_txbuf_tag = NULL; in sis_dma_alloc()
2184 &cd->sis_rxbuf_tag); in sis_dma_alloc()
2191 error = bus_dmamap_create(cd->sis_rxbuf_tag, BUS_DMA_WAITOK, in sis_dma_alloc()
2192 &cd->sis_rx_tmpmap); in sis_dma_alloc()
2195 bus_dma_tag_destroy(cd->sis_rxbuf_tag); in sis_dma_alloc()
2196 cd->sis_rxbuf_tag = NULL; in sis_dma_alloc()
2202 error = bus_dmamap_create(cd->sis_rxbuf_tag, BUS_DMA_WAITOK, in sis_dma_alloc()
2203 &cd->sis_rx_data[i].sis_map); in sis_dma_alloc()
2208 bus_dmamap_destroy(cd->sis_rxbuf_tag, in sis_dma_alloc()
2209 cd->sis_rx_data[j].sis_map); in sis_dma_alloc()
2211 bus_dmamap_destroy(cd->sis_rxbuf_tag, in sis_dma_alloc()
2212 cd->sis_rx_tmpmap); in sis_dma_alloc()
2213 bus_dma_tag_destroy(cd->sis_rxbuf_tag); in sis_dma_alloc()
2214 cd->sis_rxbuf_tag = NULL; in sis_dma_alloc()
2229 struct sis_chain_data *cd = &sc->sis_cdata; in sis_dma_free() local
2249 if (cd->sis_txbuf_tag != NULL) { in sis_dma_free()
2251 KKASSERT(cd->sis_tx_data[i].sis_mbuf == NULL); in sis_dma_free()
2252 bus_dmamap_destroy(cd->sis_txbuf_tag, in sis_dma_free()
2253 cd->sis_tx_data[i].sis_map); in sis_dma_free()
2255 bus_dma_tag_destroy(cd->sis_txbuf_tag); in sis_dma_free()
2259 if (cd->sis_rxbuf_tag != NULL) { in sis_dma_free()
2261 KKASSERT(cd->sis_rx_data[i].sis_mbuf == NULL); in sis_dma_free()
2262 bus_dmamap_destroy(cd->sis_rxbuf_tag, in sis_dma_free()
2263 cd->sis_rx_data[i].sis_map); in sis_dma_free()
2265 bus_dmamap_destroy(cd->sis_rxbuf_tag, cd->sis_rx_tmpmap); in sis_dma_free()
2266 bus_dma_tag_destroy(cd->sis_rxbuf_tag); in sis_dma_free()