netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Dale Farnsworth" <dale@farnsworth.org>
To: Maxime Bizon <mbizon@freebox.fr>
Cc: Jeff Garzik <jgarzik@pobox.com>,
	Dale Farnsworth <dale@farnsworth.org>,
	Manish Lachwani <mlachwani@mvista.com>,
	netdev@vger.kernel.org
Subject: [PATCH] mv643xx_eth: Fix ethtool stats
Date: Tue, 3 Oct 2006 10:27:10 -0700	[thread overview]
Message-ID: <20061003172710.GA5906@xyzzy.farnsworth.org> (raw)
In-Reply-To: <1159893752.6580.27.camel@sakura.staff.proxad.net>

From: Maxime Bizon <mbizon@freebox.fr>

Some stats reported by ethtool -S on mv643xx_eth device are cleared
between each call.  This patch fixes it.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>

---

Thanks Maxime.

--- linux-2.6.18/drivers/net/mv643xx_eth.c.orig	2006-10-03 18:29:14.000000000 +0200
+++ linux-2.6.18/drivers/net/mv643xx_eth.c	2006-10-03 18:29:42.000000000 +0200
@@ -2156,7 +2156,7 @@
 	for (offset = ETH_MIB_BAD_OCTETS_RECEIVED;
 			offset <= ETH_MIB_FRAMES_1024_TO_MAX_OCTETS;
 			offset += 4)
-		*(u32 *)((char *)p + offset) = read_mib(mp, offset);
+		*(u32 *)((char *)p + offset) += read_mib(mp, offset);
 
 	p->good_octets_sent += read_mib(mp, ETH_MIB_GOOD_OCTETS_SENT_LOW);
 	p->good_octets_sent +=
@@ -2165,7 +2165,7 @@
 	for (offset = ETH_MIB_GOOD_FRAMES_SENT;
 			offset <= ETH_MIB_LATE_COLLISION;
 			offset += 4)
-		*(u32 *)((char *)p + offset) = read_mib(mp, offset);
+		*(u32 *)((char *)p + offset) += read_mib(mp, offset);
 }
 
 /*

  reply	other threads:[~2006-10-03 17:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-03 16:42 [PATCH] mv643xx_eth: Fix ethtool stats Maxime Bizon
2006-10-03 17:27 ` Dale Farnsworth [this message]
2006-10-05 10:43   ` Jeff Garzik

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=20061003172710.GA5906@xyzzy.farnsworth.org \
    --to=dale@farnsworth.org \
    --cc=jgarzik@pobox.com \
    --cc=mbizon@freebox.fr \
    --cc=mlachwani@mvista.com \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).