mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
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 <shimoda.yoshihiro@renesas.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a1dcb6628b
commit
e88aae7bb1
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue