aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/mv643xx_eth.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/mv643xx_eth.c')
-rw-r--r--drivers/net/mv643xx_eth.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index 615b3622ea67..5de06d714ab0 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -889,14 +889,17 @@ static void mv643xx_eth_free_tx_rings(struct net_device *dev)
889 struct mv643xx_private *mp = netdev_priv(dev); 889 struct mv643xx_private *mp = netdev_priv(dev);
890 unsigned int port_num = mp->port_num; 890 unsigned int port_num = mp->port_num;
891 unsigned int curr; 891 unsigned int curr;
892 struct sk_buff *skb;
892 893
893 /* Stop Tx Queues */ 894 /* Stop Tx Queues */
894 mv_write(MV643XX_ETH_TRANSMIT_QUEUE_COMMAND_REG(port_num), 0x0000ff00); 895 mv_write(MV643XX_ETH_TRANSMIT_QUEUE_COMMAND_REG(port_num), 0x0000ff00);
895 896
896 /* Free outstanding skb's on TX rings */ 897 /* Free outstanding skb's on TX rings */
897 for (curr = 0; mp->tx_ring_skbs && curr < mp->tx_ring_size; curr++) { 898 for (curr = 0; mp->tx_ring_skbs && curr < mp->tx_ring_size; curr++) {
898 if (mp->tx_skb[curr]) { 899 skb = mp->tx_skb[curr];
899 dev_kfree_skb(mp->tx_skb[curr]); 900 if (skb) {
901 mp->tx_ring_skbs -= skb_shinfo(skb)->nr_frags;
902 dev_kfree_skb(skb);
900 mp->tx_ring_skbs--; 903 mp->tx_ring_skbs--;
901 } 904 }
902 } 905 }