Lines Matching refs:tx_buffer
633 struct atl1e_tx_buffer *tx_buffer = NULL; in atl1e_clean_tx_ring() local
637 if (tx_ring->desc == NULL || tx_ring->tx_buffer == NULL) in atl1e_clean_tx_ring()
643 tx_buffer = &tx_ring->tx_buffer[index]; in atl1e_clean_tx_ring()
644 if (tx_buffer->dma) { in atl1e_clean_tx_ring()
645 if (tx_buffer->flags & ATL1E_TX_PCIMAP_SINGLE) in atl1e_clean_tx_ring()
646 pci_unmap_single(pdev, tx_buffer->dma, in atl1e_clean_tx_ring()
647 tx_buffer->length, PCI_DMA_TODEVICE); in atl1e_clean_tx_ring()
648 else if (tx_buffer->flags & ATL1E_TX_PCIMAP_PAGE) in atl1e_clean_tx_ring()
649 pci_unmap_page(pdev, tx_buffer->dma, in atl1e_clean_tx_ring()
650 tx_buffer->length, PCI_DMA_TODEVICE); in atl1e_clean_tx_ring()
651 tx_buffer->dma = 0; in atl1e_clean_tx_ring()
656 tx_buffer = &tx_ring->tx_buffer[index]; in atl1e_clean_tx_ring()
657 if (tx_buffer->skb) { in atl1e_clean_tx_ring()
658 dev_kfree_skb_any(tx_buffer->skb); in atl1e_clean_tx_ring()
659 tx_buffer->skb = NULL; in atl1e_clean_tx_ring()
665 memset(tx_ring->tx_buffer, 0, sizeof(struct atl1e_tx_buffer) * in atl1e_clean_tx_ring()
771 if (adapter->tx_ring.tx_buffer) { in atl1e_free_ring_resources()
772 kfree(adapter->tx_ring.tx_buffer); in atl1e_free_ring_resources()
773 adapter->tx_ring.tx_buffer = NULL; in atl1e_free_ring_resources()
820 tx_ring->tx_buffer = kzalloc(size, GFP_KERNEL); in atl1e_setup_ring_resources()
821 if (tx_ring->tx_buffer == NULL) { in atl1e_setup_ring_resources()
1211 struct atl1e_tx_buffer *tx_buffer = NULL; in atl1e_clean_tx_irq() local
1216 tx_buffer = &tx_ring->tx_buffer[next_to_clean]; in atl1e_clean_tx_irq()
1217 if (tx_buffer->dma) { in atl1e_clean_tx_irq()
1218 if (tx_buffer->flags & ATL1E_TX_PCIMAP_SINGLE) in atl1e_clean_tx_irq()
1219 pci_unmap_single(adapter->pdev, tx_buffer->dma, in atl1e_clean_tx_irq()
1220 tx_buffer->length, PCI_DMA_TODEVICE); in atl1e_clean_tx_irq()
1221 else if (tx_buffer->flags & ATL1E_TX_PCIMAP_PAGE) in atl1e_clean_tx_irq()
1222 pci_unmap_page(adapter->pdev, tx_buffer->dma, in atl1e_clean_tx_irq()
1223 tx_buffer->length, PCI_DMA_TODEVICE); in atl1e_clean_tx_irq()
1224 tx_buffer->dma = 0; in atl1e_clean_tx_irq()
1227 if (tx_buffer->skb) { in atl1e_clean_tx_irq()
1228 dev_kfree_skb_irq(tx_buffer->skb); in atl1e_clean_tx_irq()
1229 tx_buffer->skb = NULL; in atl1e_clean_tx_irq()
1564 return &tx_ring->tx_buffer[tpd - tx_ring->desc]; in atl1e_get_tx_buffer()
1672 struct atl1e_tx_buffer *tx_buffer = NULL; in atl1e_tx_map() local
1688 tx_buffer = atl1e_get_tx_buffer(adapter, use_tpd); in atl1e_tx_map()
1689 tx_buffer->length = map_len; in atl1e_tx_map()
1690 tx_buffer->dma = pci_map_single(adapter->pdev, in atl1e_tx_map()
1692 ATL1E_SET_PCIMAP_TYPE(tx_buffer, ATL1E_TX_PCIMAP_SINGLE); in atl1e_tx_map()
1694 use_tpd->buffer_addr = cpu_to_le64(tx_buffer->dma); in atl1e_tx_map()
1696 ((cpu_to_le32(tx_buffer->length) & in atl1e_tx_map()
1709 tx_buffer = atl1e_get_tx_buffer(adapter, use_tpd); in atl1e_tx_map()
1710 tx_buffer->skb = NULL; in atl1e_tx_map()
1712 tx_buffer->length = map_len = in atl1e_tx_map()
1715 tx_buffer->dma = in atl1e_tx_map()
1718 ATL1E_SET_PCIMAP_TYPE(tx_buffer, ATL1E_TX_PCIMAP_SINGLE); in atl1e_tx_map()
1720 use_tpd->buffer_addr = cpu_to_le64(tx_buffer->dma); in atl1e_tx_map()
1722 ((cpu_to_le32(tx_buffer->length) & in atl1e_tx_map()
1739 tx_buffer = atl1e_get_tx_buffer(adapter, use_tpd); in atl1e_tx_map()
1740 BUG_ON(tx_buffer->skb); in atl1e_tx_map()
1742 tx_buffer->skb = NULL; in atl1e_tx_map()
1743 tx_buffer->length = in atl1e_tx_map()
1746 buf_len -= tx_buffer->length; in atl1e_tx_map()
1748 tx_buffer->dma = skb_frag_dma_map(&adapter->pdev->dev, in atl1e_tx_map()
1751 tx_buffer->length, in atl1e_tx_map()
1753 ATL1E_SET_PCIMAP_TYPE(tx_buffer, ATL1E_TX_PCIMAP_PAGE); in atl1e_tx_map()
1754 use_tpd->buffer_addr = cpu_to_le64(tx_buffer->dma); in atl1e_tx_map()
1756 ((cpu_to_le32(tx_buffer->length) & in atl1e_tx_map()
1769 tx_buffer->skb = skb; in atl1e_tx_map()