diff options
author | Florian Fainelli <florian@openwrt.org> | 2012-08-08 21:51:09 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2012-08-08 21:51:09 +0000 |
commit | 8aa941f17a24f1ed67664be86537bd86ad26fdc6 (patch) | |
tree | d8e323132c0ff549cdbb3130bfce4dddc432b6b3 | |
parent | c44746912461f7464f7f8252a1daae0c791d3a5c (diff) | |
download | master-187ad058-8aa941f17a24f1ed67664be86537bd86ad26fdc6.tar.gz master-187ad058-8aa941f17a24f1ed67664be86537bd86ad26fdc6.tar.bz2 master-187ad058-8aa941f17a24f1ed67664be86537bd86ad26fdc6.zip |
[mcs814x] nuport-mac: unmap the DMA buffer when closing device
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33068 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | target/linux/mcs814x/files-3.3/drivers/net/ethernet/mcs8140/nuport_mac.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/target/linux/mcs814x/files-3.3/drivers/net/ethernet/mcs8140/nuport_mac.c b/target/linux/mcs814x/files-3.3/drivers/net/ethernet/mcs8140/nuport_mac.c index 38dbe1ee7d..ebf95a6533 100644 --- a/target/linux/mcs814x/files-3.3/drivers/net/ethernet/mcs8140/nuport_mac.c +++ b/target/linux/mcs814x/files-3.3/drivers/net/ethernet/mcs8140/nuport_mac.c @@ -688,6 +688,10 @@ static void nuport_mac_free_rx_ring(struct nuport_mac_priv *priv) dev_kfree_skb(priv->rx_skb[i]); priv->rx_skb[i] = NULL; } + + if (priv->rx_addr) + dma_unmap_single(&priv->pdev->dev, priv->rx_addr, RX_ALLOC_SIZE, + DMA_TO_DEVICE); } static void nuport_mac_read_mac_address(struct net_device *dev) |