Netdev List
 help / color / mirror / Atom feed
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
To: netdev@vger.kernel.org
Cc: David Miller <davem@davemloft.net>, Ralf Roesch <ralf.roesch@rw-gmbh.de>
Subject: [PATCH 4/5] tc35815: Fix rx_missed_errors count
Date: Thu,  6 Aug 2009 23:41:48 +0900	[thread overview]
Message-ID: <1249569709-21403-4-git-send-email-anemo@mba.ocn.ne.jp> (raw)

The Miss_Cnt register is cleared by reading.  Accumulate its value to
rx_missed_errors count.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
 drivers/net/tc35815.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/tc35815.c b/drivers/net/tc35815.c
index 1adb150..564d555 100644
--- a/drivers/net/tc35815.c
+++ b/drivers/net/tc35815.c
@@ -2139,7 +2139,7 @@ static struct net_device_stats *tc35815_get_stats(struct net_device *dev)
 		(struct tc35815_regs __iomem *)dev->base_addr;
 	if (netif_running(dev))
 		/* Update the statistics from the device registers. */
-		dev->stats.rx_missed_errors = tc_readl(&tr->Miss_Cnt);
+		dev->stats.rx_missed_errors += tc_readl(&tr->Miss_Cnt);
 
 	return &dev->stats;
 }
-- 
1.5.6.5


             reply	other threads:[~2009-08-06 15:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-06 14:41 Atsushi Nemoto [this message]
2009-08-06 20:16 ` [PATCH 4/5] tc35815: Fix rx_missed_errors count David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1249569709-21403-4-git-send-email-anemo@mba.ocn.ne.jp \
    --to=anemo@mba.ocn.ne.jp \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=ralf.roesch@rw-gmbh.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox