From: Yoshihiro Shimoda Date: Sun, 24 May 2009 23:52:35 +0000 (+0000) Subject: net: sh_eth: fix cache coherency issue X-Git-Tag: v2.6.31-rc1~14^2~363 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e88aae7bb1dc50457489d1d7c81dcf4db23ccf94;p=profile%2Fivi%2Fkernel-x86-ivi.git net: sh_eth: fix cache coherency issue Fix the problem that may not work receive process by cache coherency issue. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: David S. Miller --- diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index 3ab28bb..a742297 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c @@ -250,6 +250,8 @@ static void sh_eth_ring_format(struct net_device *ndev) mdp->rx_skbuff[i] = skb; if (skb == NULL) 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. */ #if defined(CONFIG_CPU_SUBTYPE_SH7763) reserve = SH7763_SKB_ALIGN @@ -559,6 +561,8 @@ static int sh_eth_rx(struct net_device *ndev) mdp->rx_skbuff[entry] = skb; if (skb == NULL) break; /* Better luck next round. */ + dma_map_single(&ndev->dev, skb->tail, mdp->rx_buf_sz, + DMA_FROM_DEVICE); skb->dev = ndev; #if defined(CONFIG_CPU_SUBTYPE_SH7763) reserve = SH7763_SKB_ALIGN