From 9b2ee01ff57734d6b05c7cdd324fdc879a4d4b2f Mon Sep 17 00:00:00 2001 From: juhosg Date: Sat, 11 Feb 2012 15:12:04 +0000 Subject: ramips: raeth: unmap rx DMA address in ramips_cleanup_dma git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30446 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/ramips/files/drivers/net/ramips.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'target/linux') diff --git a/target/linux/ramips/files/drivers/net/ramips.c b/target/linux/ramips/files/drivers/net/ramips.c index c9eecc224..e44e6b654 100644 --- a/target/linux/ramips/files/drivers/net/ramips.c +++ b/target/linux/ramips/files/drivers/net/ramips.c @@ -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, -- cgit v1.2.3