From patchwork Wed Mar 9 14:41:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Lange X-Patchwork-Id: 621501 Received: from comal.ext.ti.com (comal.ext.ti.com [198.47.26.152]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p29EhMlp024684 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 9 Mar 2011 14:43:43 GMT Received: from dlep33.itg.ti.com ([157.170.170.112]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id p29EfR7d006571 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 9 Mar 2011 08:41:27 -0600 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep33.itg.ti.com (8.13.7/8.13.7) with ESMTP id p29EfQu0026038; Wed, 9 Mar 2011 08:41:26 -0600 (CST) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id E4B3880627; Wed, 9 Mar 2011 08:41:25 -0600 (CST) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp53.itg.ti.com (dflp53.itg.ti.com [128.247.5.6]) by linux.omap.com (Postfix) with ESMTP id 58B2F80626 for ; Wed, 9 Mar 2011 08:41:24 -0600 (CST) Received: from neches.ext.ti.com (localhost [127.0.0.1]) by dflp53.itg.ti.com (8.13.8/8.13.8) with ESMTP id p29EfN4H014106 for ; Wed, 9 Mar 2011 08:41:24 -0600 (CST) Received: from psmtp.com (na3sys009amx226.postini.com [74.125.149.110]) by neches.ext.ti.com (8.13.7/8.13.7) with SMTP id p29EfNfT022644 for ; Wed, 9 Mar 2011 08:41:23 -0600 Received: from source ([81.236.55.20]) by na3sys009amx226.postini.com ([74.125.148.10]) with SMTP; Wed, 09 Mar 2011 09:41:23 EST Received: from [172.16.1.4] (81.233.229.123) by smtp-gw11.han.skanova.net (8.5.133) id 4D651BF9006A0196; Wed, 9 Mar 2011 15:41:18 +0100 Message-ID: <4D77918C.9050800@corelatus.se> Date: Wed, 09 Mar 2011 15:41:16 +0100 From: Thomas Lange User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101226 Icedove/3.0.11 MIME-Version: 1.0 To: netdev@vger.kernel.org Subject: [PATCH] Davinci: Do not reset EMAC TX overruns counter on read X-pstn-neptune: 0/0/0.00/0 X-pstn-levels: (S:14.54075/99.90000 CV:99.9000 FC:95.5390 LC:95.5390 R:95.9108 P:95.9108 M:97.0282 C:98.6951 ) X-pstn-settings: 2 (0.5000:0.5000) s cv gt3 gt2 gt1 r p m c X-pstn-addresses: from [db-null] Cc: "davinci-linux-open-source@linux.davincidsp.com" , davem@davemloft.net, anantgole@ti.com X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: davinci-linux-open-source-bounces@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com X-Greylist: Sender succeeded STARTTLS authentication, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 09 Mar 2011 14:43:43 +0000 (UTC) diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index 2a628d1..922c8c5 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c @@ -1730,7 +1730,7 @@ static struct net_device_stats *emac_dev_getnetstats(struct net_device *ndev) emac_read(EMAC_TXCARRIERSENSE); emac_write(EMAC_TXCARRIERSENSE, stats_clear_mask); - ndev->stats.tx_fifo_errors = emac_read(EMAC_TXUNDERRUN); + ndev->stats.tx_fifo_errors += emac_read(EMAC_TXUNDERRUN); emac_write(EMAC_TXUNDERRUN, stats_clear_mask); return &ndev->stats;