ramips: raeth: unmap rx DMA address in ramips_cleanup_dma
authorGabor Juhos <juhosg@openwrt.org>
Sat, 11 Feb 2012 15:12:04 +0000 (15:12 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Sat, 11 Feb 2012 15:12:04 +0000 (15:12 +0000)
SVN-Revision: 30446

target/linux/ramips/files/drivers/net/ramips.c

index c9eecc2240b48cfd8f5e2e81dc389e4071b57a19..e44e6b654089c108c245c078fac4c6e76ce88257 100644 (file)
@@ -128,8 +128,11 @@ ramips_cleanup_dma(struct raeth_priv *re)
        int i;
 
        for (i = 0; i < NUM_RX_DESC; i++)
-               if (re->rx_skb[i])
+               if (re->rx_skb[i]) {
+                       dma_unmap_single(NULL, re->rx_dma[i], MAX_RX_LENGTH,
+                                        DMA_FROM_DEVICE);
                        dev_kfree_skb_any(re->rx_skb[i]);
+               }
 
        if (re->rx)
                dma_free_coherent(NULL,