Lines Matching refs:txr
850 static int enetc_alloc_txbdr(struct enetc_bdr *txr)
854 txr->tx_swbd = vzalloc(txr->bd_count * sizeof(struct enetc_tx_swbd));
855 if (!txr->tx_swbd)
858 err = enetc_dma_alloc_bdr(txr, sizeof(union enetc_tx_bd));
860 vfree(txr->tx_swbd);
864 txr->next_to_clean = 0;
865 txr->next_to_use = 0;
870 static void enetc_free_txbdr(struct enetc_bdr *txr)
874 for (i = 0; i < txr->bd_count; i++)
875 enetc_free_tx_skb(txr, &txr->tx_swbd[i]);
877 size = txr->bd_count * sizeof(union enetc_tx_bd);
879 dma_free_coherent(txr->dev, size, txr->bd_base, txr->bd_dma_base);
880 txr->bd_base = NULL;
882 vfree(txr->tx_swbd);
883 txr->tx_swbd = NULL;