lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-id: <4A1A6A63.8040608@renesas.com>
Date:	Mon, 25 May 2009 18:52:35 +0900
From:	Yoshihiro Shimoda <shimoda.yoshihiro@...esas.com>
To:	netdev@...r.kernel.org
Cc:	SH-Linux <linux-sh@...r.kernel.org>,
	Nobuhiro Iwamatsu <iwamatsu.nobuhiro@...esas.com>
Subject: [PATCH 1/5] 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@...esas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@...esas.com>
---
 drivers/net/sh_eth.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

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
-- 
1.5.5

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ