Commit 31fcb99d authored by Yoshihiro Shimoda's avatar Yoshihiro Shimoda Committed by David S. Miller

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: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ee9c88f2
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include <linux/pm_runtime.h> #include <linux/pm_runtime.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/ethtool.h> #include <linux/ethtool.h>
#include <asm/cacheflush.h>
#include "sh_eth.h" #include "sh_eth.h"
...@@ -864,6 +863,8 @@ static int sh_eth_txfree(struct net_device *ndev) ...@@ -864,6 +863,8 @@ static int sh_eth_txfree(struct net_device *ndev)
break; break;
/* Free the original skb. */ /* Free the original skb. */
if (mdp->tx_skbuff[entry]) { 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]); dev_kfree_skb_irq(mdp->tx_skbuff[entry]);
mdp->tx_skbuff[entry] = NULL; mdp->tx_skbuff[entry] = NULL;
freeNum++; freeNum++;
...@@ -1487,13 +1488,12 @@ static int sh_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev) ...@@ -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; entry = mdp->cur_tx % TX_RING_SIZE;
mdp->tx_skbuff[entry] = skb; mdp->tx_skbuff[entry] = skb;
txdesc = &mdp->tx_ring[entry]; txdesc = &mdp->tx_ring[entry];
txdesc->addr = virt_to_phys(skb->data);
/* soft swap. */ /* soft swap. */
if (!mdp->cd->hw_swap) if (!mdp->cd->hw_swap)
sh_eth_soft_swap(phys_to_virt(ALIGN(txdesc->addr, 4)), sh_eth_soft_swap(phys_to_virt(ALIGN(txdesc->addr, 4)),
skb->len + 2); skb->len + 2);
/* write back */ txdesc->addr = dma_map_single(&ndev->dev, skb->data, skb->len,
__flush_purge_region(skb->data, skb->len); DMA_TO_DEVICE);
if (skb->len < ETHERSMALL) if (skb->len < ETHERSMALL)
txdesc->buffer_length = ETHERSMALL; txdesc->buffer_length = ETHERSMALL;
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment