From patchwork Mon May 25 09:52:35 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 25788 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4P9qp3h027457 for ; Mon, 25 May 2009 09:52:52 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753648AbZEYJwg (ORCPT ); Mon, 25 May 2009 05:52:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753226AbZEYJwg (ORCPT ); Mon, 25 May 2009 05:52:36 -0400 Received: from mail.renesas.com ([202.234.163.13]:62315 "EHLO mail03.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752463AbZEYJwf (ORCPT ); Mon, 25 May 2009 05:52:35 -0400 X-AuditID: ac140386-0000000400001aa8-67-4a1a6a62187b Received: from guardian03.idc.renesas.com ([172.20.8.202]) by mail03.idc.renesas.com (sendmail) with ESMTP id n4P9qYbf019966; Mon, 25 May 2009 18:52:34 +0900 (JST) Received: (from root@localhost) by guardian03.idc.renesas.com with id n4P9qZUO015689; Mon, 25 May 2009 18:52:35 +0900 (JST) Received: from mta01.idc.renesas.com (localhost [127.0.0.1]) by mta01.idc.renesas.com with ESMTP id n4P9qYd2004787; Mon, 25 May 2009 18:52:34 +0900 (JST) Received: from [172.30.8.157] by ims05.idc.renesas.com (Sendmail) with ESMTPA id <0KK70060Q23MHX@ims05.idc.renesas.com>; Mon, 25 May 2009 18:52:34 +0900 (JST) Date: Mon, 25 May 2009 18:52:35 +0900 From: Yoshihiro Shimoda Subject: [PATCH 1/5] net: sh_eth: fix cache coherency issue To: netdev@vger.kernel.org Cc: SH-Linux , Nobuhiro Iwamatsu Message-id: <4A1A6A63.8040608@renesas.com> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) X-Brightmail-Tracker: AAAAAA== Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org Fix the problem that may not work receive process by cache coherency issue. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Nobuhiro Iwamatsu --- 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