• Home
  • Raw
  • Download

Lines Matching refs:tx_buffer

667 	struct atl1e_tx_buffer *tx_buffer = NULL;  in atl1e_clean_tx_ring()  local
671 if (tx_ring->desc == NULL || tx_ring->tx_buffer == NULL) in atl1e_clean_tx_ring()
677 tx_buffer = &tx_ring->tx_buffer[index]; in atl1e_clean_tx_ring()
678 if (tx_buffer->dma) { in atl1e_clean_tx_ring()
679 if (tx_buffer->flags & ATL1E_TX_PCIMAP_SINGLE) in atl1e_clean_tx_ring()
680 pci_unmap_single(pdev, tx_buffer->dma, in atl1e_clean_tx_ring()
681 tx_buffer->length, PCI_DMA_TODEVICE); in atl1e_clean_tx_ring()
682 else if (tx_buffer->flags & ATL1E_TX_PCIMAP_PAGE) in atl1e_clean_tx_ring()
683 pci_unmap_page(pdev, tx_buffer->dma, in atl1e_clean_tx_ring()
684 tx_buffer->length, PCI_DMA_TODEVICE); in atl1e_clean_tx_ring()
685 tx_buffer->dma = 0; in atl1e_clean_tx_ring()
690 tx_buffer = &tx_ring->tx_buffer[index]; in atl1e_clean_tx_ring()
691 if (tx_buffer->skb) { in atl1e_clean_tx_ring()
692 dev_kfree_skb_any(tx_buffer->skb); in atl1e_clean_tx_ring()
693 tx_buffer->skb = NULL; in atl1e_clean_tx_ring()
699 memset(tx_ring->tx_buffer, 0, sizeof(struct atl1e_tx_buffer) * in atl1e_clean_tx_ring()
805 if (adapter->tx_ring.tx_buffer) { in atl1e_free_ring_resources()
806 kfree(adapter->tx_ring.tx_buffer); in atl1e_free_ring_resources()
807 adapter->tx_ring.tx_buffer = NULL; in atl1e_free_ring_resources()
851 tx_ring->tx_buffer = kzalloc(size, GFP_KERNEL); in atl1e_setup_ring_resources()
852 if (tx_ring->tx_buffer == NULL) { in atl1e_setup_ring_resources()
1251 struct atl1e_tx_buffer *tx_buffer = NULL; in atl1e_clean_tx_irq() local
1256 tx_buffer = &tx_ring->tx_buffer[next_to_clean]; in atl1e_clean_tx_irq()
1257 if (tx_buffer->dma) { in atl1e_clean_tx_irq()
1258 if (tx_buffer->flags & ATL1E_TX_PCIMAP_SINGLE) in atl1e_clean_tx_irq()
1259 pci_unmap_single(adapter->pdev, tx_buffer->dma, in atl1e_clean_tx_irq()
1260 tx_buffer->length, PCI_DMA_TODEVICE); in atl1e_clean_tx_irq()
1261 else if (tx_buffer->flags & ATL1E_TX_PCIMAP_PAGE) in atl1e_clean_tx_irq()
1262 pci_unmap_page(adapter->pdev, tx_buffer->dma, in atl1e_clean_tx_irq()
1263 tx_buffer->length, PCI_DMA_TODEVICE); in atl1e_clean_tx_irq()
1264 tx_buffer->dma = 0; in atl1e_clean_tx_irq()
1267 if (tx_buffer->skb) { in atl1e_clean_tx_irq()
1268 dev_kfree_skb_irq(tx_buffer->skb); in atl1e_clean_tx_irq()
1269 tx_buffer->skb = NULL; in atl1e_clean_tx_irq()
1608 return &tx_ring->tx_buffer[tpd - tx_ring->desc]; in atl1e_get_tx_buffer()
1716 struct atl1e_tx_buffer *tx_buffer = NULL; in atl1e_tx_map() local
1734 tx_buffer = atl1e_get_tx_buffer(adapter, use_tpd); in atl1e_tx_map()
1735 tx_buffer->length = map_len; in atl1e_tx_map()
1736 tx_buffer->dma = pci_map_single(adapter->pdev, in atl1e_tx_map()
1738 if (dma_mapping_error(&adapter->pdev->dev, tx_buffer->dma)) in atl1e_tx_map()
1741 ATL1E_SET_PCIMAP_TYPE(tx_buffer, ATL1E_TX_PCIMAP_SINGLE); in atl1e_tx_map()
1743 use_tpd->buffer_addr = cpu_to_le64(tx_buffer->dma); in atl1e_tx_map()
1745 ((cpu_to_le32(tx_buffer->length) & in atl1e_tx_map()
1758 tx_buffer = atl1e_get_tx_buffer(adapter, use_tpd); in atl1e_tx_map()
1759 tx_buffer->skb = NULL; in atl1e_tx_map()
1761 tx_buffer->length = map_len = in atl1e_tx_map()
1764 tx_buffer->dma = in atl1e_tx_map()
1768 if (dma_mapping_error(&adapter->pdev->dev, tx_buffer->dma)) { in atl1e_tx_map()
1774 tx_buffer = atl1e_get_tx_buffer(adapter, tpd); in atl1e_tx_map()
1775 pci_unmap_single(adapter->pdev, tx_buffer->dma, in atl1e_tx_map()
1776 tx_buffer->length, PCI_DMA_TODEVICE); in atl1e_tx_map()
1783 ATL1E_SET_PCIMAP_TYPE(tx_buffer, ATL1E_TX_PCIMAP_SINGLE); in atl1e_tx_map()
1785 use_tpd->buffer_addr = cpu_to_le64(tx_buffer->dma); in atl1e_tx_map()
1787 ((cpu_to_le32(tx_buffer->length) & in atl1e_tx_map()
1804 tx_buffer = atl1e_get_tx_buffer(adapter, use_tpd); in atl1e_tx_map()
1805 BUG_ON(tx_buffer->skb); in atl1e_tx_map()
1807 tx_buffer->skb = NULL; in atl1e_tx_map()
1808 tx_buffer->length = in atl1e_tx_map()
1811 buf_len -= tx_buffer->length; in atl1e_tx_map()
1813 tx_buffer->dma = skb_frag_dma_map(&adapter->pdev->dev, in atl1e_tx_map()
1816 tx_buffer->length, in atl1e_tx_map()
1819 if (dma_mapping_error(&adapter->pdev->dev, tx_buffer->dma)) { in atl1e_tx_map()
1825 tx_buffer = atl1e_get_tx_buffer(adapter, tpd); in atl1e_tx_map()
1826 dma_unmap_page(&adapter->pdev->dev, tx_buffer->dma, in atl1e_tx_map()
1827 tx_buffer->length, DMA_TO_DEVICE); in atl1e_tx_map()
1835 ATL1E_SET_PCIMAP_TYPE(tx_buffer, ATL1E_TX_PCIMAP_PAGE); in atl1e_tx_map()
1836 use_tpd->buffer_addr = cpu_to_le64(tx_buffer->dma); in atl1e_tx_map()
1838 ((cpu_to_le32(tx_buffer->length) & in atl1e_tx_map()
1851 tx_buffer->skb = skb; in atl1e_tx_map()