Lines Matching refs:tx_ctl
863 struct ks8842_tx_dma_ctl *tx_ctl = &adapter->dma_tx;
866 tx_ctl->adesc = NULL;
867 if (tx_ctl->chan)
868 dmaengine_terminate_all(tx_ctl->chan);
885 struct ks8842_tx_dma_ctl *tx_ctl = &adapter->dma_tx;
890 if (tx_ctl->chan)
891 dma_release_channel(tx_ctl->chan);
892 tx_ctl->chan = NULL;
900 if (sg_dma_address(&tx_ctl->sg))
901 dma_unmap_single(adapter->dev, sg_dma_address(&tx_ctl->sg),
903 sg_dma_address(&tx_ctl->sg) = 0;
905 kfree(tx_ctl->buf);
906 tx_ctl->buf = NULL;
917 struct ks8842_tx_dma_ctl *tx_ctl = &adapter->dma_tx;
927 sg_init_table(&tx_ctl->sg, 1);
929 tx_ctl->chan = dma_request_channel(mask, ks8842_dma_filter_fn,
930 (void *)(long)tx_ctl->channel);
931 if (!tx_ctl->chan) {
937 tx_ctl->buf = kmalloc(DMA_BUFFER_SIZE, GFP_KERNEL);
938 if (!tx_ctl->buf) {
943 sg_dma_address(&tx_ctl->sg) = dma_map_single(adapter->dev,
944 tx_ctl->buf, DMA_BUFFER_SIZE, DMA_TO_DEVICE);
945 if (dma_mapping_error(adapter->dev, sg_dma_address(&tx_ctl->sg))) {
947 sg_dma_address(&tx_ctl->sg) = 0;