From: Yoshihiro Shimoda Date: Thu, 30 Jun 2011 22:52:13 +0000 (+0000) Subject: net: sh_eth: remove __flush_purge_region X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=31fcb99d9958;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git net: sh_eth: remove __flush_purge_region It is a function of SuperH architecture. There is no good to use the function on a driver generally. So, the driver uses dma_map_single() instead of __flush_purge_region. Signed-off-by: Yoshihiro Shimoda Signed-off-by: David S. Miller --- diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index 96a629f1678e..3da168a859ca 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c @@ -33,7 +33,6 @@ #include #include #include -#include #include "sh_eth.h" @@ -864,6 +863,8 @@ static int sh_eth_txfree(struct net_device *ndev) break; /* Free the original skb. */ if (mdp->tx_skbuff[entry]) { + dma_unmap_single(&ndev->dev, txdesc->addr, + txdesc->buffer_length, DMA_TO_DEVICE); dev_kfree_skb_irq(mdp->tx_skbuff[entry]); mdp->tx_skbuff[entry] = NULL; freeNum++; @@ -1487,13 +1488,12 @@ static int sh_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev) entry = mdp->cur_tx % TX_RING_SIZE; mdp->tx_skbuff[entry] = skb; txdesc = &mdp->tx_ring[entry]; - txdesc->addr = virt_to_phys(skb->data); /* soft swap. */ if (!mdp->cd->hw_swap) sh_eth_soft_swap(phys_to_virt(ALIGN(txdesc->addr, 4)), skb->len + 2); - /* write back */ - __flush_purge_region(skb->data, skb->len); + txdesc->addr = dma_map_single(&ndev->dev, skb->data, skb->len, + DMA_TO_DEVICE); if (skb->len < ETHERSMALL) txdesc->buffer_length = ETHERSMALL; else