mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-01 22:37:41 -04:00
Compare commits
2 Commits
5dd8025a49
...
48b3cd6926
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
48b3cd6926 | ||
|
|
c0fd0fe745 |
@@ -977,19 +977,19 @@ static int ftgmac100_alloc_rings(struct ftgmac100 *priv)
|
||||
priv->tx_skbs = kcalloc(MAX_TX_QUEUE_ENTRIES, sizeof(void *),
|
||||
GFP_KERNEL);
|
||||
if (!priv->tx_skbs)
|
||||
return -ENOMEM;
|
||||
goto err_free_rx_skbs;
|
||||
|
||||
/* Allocate descriptors */
|
||||
priv->rxdes = dma_alloc_coherent(priv->dev,
|
||||
MAX_RX_QUEUE_ENTRIES * sizeof(struct ftgmac100_rxdes),
|
||||
&priv->rxdes_dma, GFP_KERNEL);
|
||||
if (!priv->rxdes)
|
||||
return -ENOMEM;
|
||||
goto err_free_tx_skbs;
|
||||
priv->txdes = dma_alloc_coherent(priv->dev,
|
||||
MAX_TX_QUEUE_ENTRIES * sizeof(struct ftgmac100_txdes),
|
||||
&priv->txdes_dma, GFP_KERNEL);
|
||||
if (!priv->txdes)
|
||||
return -ENOMEM;
|
||||
goto err_free_rxdes;
|
||||
|
||||
/* Allocate scratch packet buffer */
|
||||
priv->rx_scratch = dma_alloc_coherent(priv->dev,
|
||||
@@ -997,9 +997,29 @@ static int ftgmac100_alloc_rings(struct ftgmac100 *priv)
|
||||
&priv->rx_scratch_dma,
|
||||
GFP_KERNEL);
|
||||
if (!priv->rx_scratch)
|
||||
return -ENOMEM;
|
||||
goto err_free_txdes;
|
||||
|
||||
return 0;
|
||||
|
||||
err_free_txdes:
|
||||
dma_free_coherent(priv->dev,
|
||||
MAX_TX_QUEUE_ENTRIES *
|
||||
sizeof(struct ftgmac100_txdes),
|
||||
priv->txdes, priv->txdes_dma);
|
||||
priv->txdes = NULL;
|
||||
err_free_rxdes:
|
||||
dma_free_coherent(priv->dev,
|
||||
MAX_RX_QUEUE_ENTRIES *
|
||||
sizeof(struct ftgmac100_rxdes),
|
||||
priv->rxdes, priv->rxdes_dma);
|
||||
priv->rxdes = NULL;
|
||||
err_free_tx_skbs:
|
||||
kfree(priv->tx_skbs);
|
||||
priv->tx_skbs = NULL;
|
||||
err_free_rx_skbs:
|
||||
kfree(priv->rx_skbs);
|
||||
priv->rx_skbs = NULL;
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
static void ftgmac100_init_rings(struct ftgmac100 *priv)
|
||||
|
||||
@@ -156,7 +156,7 @@ static void stmmac_tx_timer_arm(struct stmmac_priv *priv, u32 queue);
|
||||
static void stmmac_flush_tx_descriptors(struct stmmac_priv *priv, int queue);
|
||||
static void stmmac_set_dma_operation_mode(struct stmmac_priv *priv, u32 txmode,
|
||||
u32 rxmode, u32 chan);
|
||||
static int stmmac_vlan_restore(struct stmmac_priv *priv);
|
||||
static void stmmac_vlan_restore(struct stmmac_priv *priv);
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
static const struct net_device_ops stmmac_netdev_ops;
|
||||
@@ -6859,21 +6859,15 @@ del_vlan_error:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int stmmac_vlan_restore(struct stmmac_priv *priv)
|
||||
static void stmmac_vlan_restore(struct stmmac_priv *priv)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (!(priv->dev->features & NETIF_F_VLAN_FEATURES))
|
||||
return 0;
|
||||
return;
|
||||
|
||||
if (priv->hw->num_vlan)
|
||||
stmmac_restore_hw_vlan_rx_fltr(priv, priv->dev, priv->hw);
|
||||
|
||||
ret = stmmac_vlan_update(priv, priv->num_double_vlans);
|
||||
if (ret)
|
||||
netdev_err(priv->dev, "Failed to restore VLANs\n");
|
||||
|
||||
return ret;
|
||||
stmmac_vlan_update(priv, priv->num_double_vlans);
|
||||
}
|
||||
|
||||
static int stmmac_bpf(struct net_device *dev, struct netdev_bpf *bpf)
|
||||
|
||||
Reference in New Issue
Block a user