Lines Matching refs:tx_res

1810 	struct enetc_bdr_resource *tx_res;  in enetc_alloc_tx_resources()  local
1813 tx_res = kcalloc(priv->num_tx_rings, sizeof(*tx_res), GFP_KERNEL); in enetc_alloc_tx_resources()
1814 if (!tx_res) in enetc_alloc_tx_resources()
1820 err = enetc_alloc_tx_resource(&tx_res[i], tx_ring->dev, in enetc_alloc_tx_resources()
1826 return tx_res; in enetc_alloc_tx_resources()
1830 enetc_free_tx_resource(&tx_res[i]); in enetc_alloc_tx_resources()
1832 kfree(tx_res); in enetc_alloc_tx_resources()
1837 static void enetc_free_tx_resources(const struct enetc_bdr_resource *tx_res, in enetc_free_tx_resources() argument
1843 enetc_free_tx_resource(&tx_res[i]); in enetc_free_tx_resources()
1845 kfree(tx_res); in enetc_free_tx_resources()
1943 if (priv->tx_res) in enetc_assign_tx_resources()
1944 enetc_free_tx_resources(priv->tx_res, priv->num_tx_rings); in enetc_assign_tx_resources()
1951 priv->tx_res = res; in enetc_assign_tx_resources()
2456 struct enetc_bdr_resource *tx_res, *rx_res; in enetc_open() local
2470 tx_res = enetc_alloc_tx_resources(priv); in enetc_open()
2471 if (IS_ERR(tx_res)) { in enetc_open()
2472 err = PTR_ERR(tx_res); in enetc_open()
2483 enetc_assign_tx_resources(priv, tx_res); in enetc_open()
2491 enetc_free_tx_resources(tx_res, priv->num_tx_rings); in enetc_open()
2555 struct enetc_bdr_resource *tx_res, *rx_res; in enetc_reconfigure() local
2573 tx_res = enetc_alloc_tx_resources(priv); in enetc_reconfigure()
2574 if (IS_ERR(tx_res)) { in enetc_reconfigure()
2575 err = PTR_ERR(tx_res); in enetc_reconfigure()
2595 enetc_assign_tx_resources(priv, tx_res); in enetc_reconfigure()
2607 enetc_free_tx_resources(tx_res, priv->num_tx_rings); in enetc_reconfigure()