Lines Matching refs:txr
1737 static int enetc_alloc_txbdr(struct enetc_bdr *txr) in enetc_alloc_txbdr() argument
1741 txr->tx_swbd = vzalloc(txr->bd_count * sizeof(struct enetc_tx_swbd)); in enetc_alloc_txbdr()
1742 if (!txr->tx_swbd) in enetc_alloc_txbdr()
1745 err = enetc_dma_alloc_bdr(txr, sizeof(union enetc_tx_bd)); in enetc_alloc_txbdr()
1749 txr->tso_headers = dma_alloc_coherent(txr->dev, in enetc_alloc_txbdr()
1750 txr->bd_count * TSO_HEADER_SIZE, in enetc_alloc_txbdr()
1751 &txr->tso_headers_dma, in enetc_alloc_txbdr()
1753 if (!txr->tso_headers) { in enetc_alloc_txbdr()
1758 txr->next_to_clean = 0; in enetc_alloc_txbdr()
1759 txr->next_to_use = 0; in enetc_alloc_txbdr()
1764 dma_free_coherent(txr->dev, txr->bd_count * sizeof(union enetc_tx_bd), in enetc_alloc_txbdr()
1765 txr->bd_base, txr->bd_dma_base); in enetc_alloc_txbdr()
1766 txr->bd_base = NULL; in enetc_alloc_txbdr()
1768 vfree(txr->tx_swbd); in enetc_alloc_txbdr()
1769 txr->tx_swbd = NULL; in enetc_alloc_txbdr()
1774 static void enetc_free_txbdr(struct enetc_bdr *txr) in enetc_free_txbdr() argument
1778 for (i = 0; i < txr->bd_count; i++) in enetc_free_txbdr()
1779 enetc_free_tx_frame(txr, &txr->tx_swbd[i]); in enetc_free_txbdr()
1781 size = txr->bd_count * sizeof(union enetc_tx_bd); in enetc_free_txbdr()
1783 dma_free_coherent(txr->dev, txr->bd_count * TSO_HEADER_SIZE, in enetc_free_txbdr()
1784 txr->tso_headers, txr->tso_headers_dma); in enetc_free_txbdr()
1785 txr->tso_headers = NULL; in enetc_free_txbdr()
1787 dma_free_coherent(txr->dev, size, txr->bd_base, txr->bd_dma_base); in enetc_free_txbdr()
1788 txr->bd_base = NULL; in enetc_free_txbdr()
1790 vfree(txr->tx_swbd); in enetc_free_txbdr()
1791 txr->tx_swbd = NULL; in enetc_free_txbdr()