Skip to content

Commit

Permalink
net/gianfar: drop recycled skbs on MTU change
Browse files Browse the repository at this point in the history
The size for skbs which is added to the recycled list is using the
current descriptor size which is current MTU. gfar_new_skb() is also
using this size. So after changing or alteast increasing the MTU all
recycled skbs should be dropped.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Sebastian Andrzej Siewior authored and David S. Miller committed May 6, 2010
1 parent 7cff094 commit 7df9c43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/gianfar.c
Original file line number Diff line number Diff line change
Expand Up @@ -1649,6 +1649,7 @@ static void free_skb_resources(struct gfar_private *priv)
sizeof(struct rxbd8) * priv->total_rx_ring_size,
priv->tx_queue[0]->tx_bd_base,
priv->tx_queue[0]->tx_bd_dma_base);
skb_queue_purge(&priv->rx_recycle);
}

void gfar_start(struct net_device *dev)
Expand Down Expand Up @@ -2088,7 +2089,6 @@ static int gfar_close(struct net_device *dev)

disable_napi(priv);

skb_queue_purge(&priv->rx_recycle);
cancel_work_sync(&priv->reset_task);
stop_gfar(dev);

Expand Down

0 comments on commit 7df9c43

Please sign in to comment.