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

net: sh_eth: fix cache coherency issue

Fix the problem that may not work receive process by cache coherency issue.
Signed-off-by: default avatarYoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: default avatarNobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a1dcb662
...@@ -250,6 +250,8 @@ static void sh_eth_ring_format(struct net_device *ndev) ...@@ -250,6 +250,8 @@ static void sh_eth_ring_format(struct net_device *ndev)
mdp->rx_skbuff[i] = skb; mdp->rx_skbuff[i] = skb;
if (skb == NULL) if (skb == NULL)
break; break;
dma_map_single(&ndev->dev, skb->tail, mdp->rx_buf_sz,
DMA_FROM_DEVICE);
skb->dev = ndev; /* Mark as being used by this device. */ skb->dev = ndev; /* Mark as being used by this device. */
#if defined(CONFIG_CPU_SUBTYPE_SH7763) #if defined(CONFIG_CPU_SUBTYPE_SH7763)
reserve = SH7763_SKB_ALIGN reserve = SH7763_SKB_ALIGN
...@@ -559,6 +561,8 @@ static int sh_eth_rx(struct net_device *ndev) ...@@ -559,6 +561,8 @@ static int sh_eth_rx(struct net_device *ndev)
mdp->rx_skbuff[entry] = skb; mdp->rx_skbuff[entry] = skb;
if (skb == NULL) if (skb == NULL)
break; /* Better luck next round. */ break; /* Better luck next round. */
dma_map_single(&ndev->dev, skb->tail, mdp->rx_buf_sz,
DMA_FROM_DEVICE);
skb->dev = ndev; skb->dev = ndev;
#if defined(CONFIG_CPU_SUBTYPE_SH7763) #if defined(CONFIG_CPU_SUBTYPE_SH7763)
reserve = SH7763_SKB_ALIGN reserve = SH7763_SKB_ALIGN
......
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