netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jon Mason <jdmason@us.ibm.com>
To: Richard Dawe <rich@phekda.gotadsl.co.uk>
Cc: Francois Romieu <romieu@fr.zoreil.com>, netdev@oss.sgi.com
Subject: Re: [PATCH]: r8169: Expose hardware stats via ethtool
Date: Sun, 27 Feb 2005 20:31:12 -0600	[thread overview]
Message-ID: <200502272031.12291.jdmason@us.ibm.com> (raw)
In-Reply-To: <42224F76.9000602@phekda.gotadsl.co.uk>

I think I've found a (very hackish) way around the bad stats error.  

Tested on amd64, and "solves" the problem.

--- drivers/net/r8169.c 2005-02-27 20:27:48.000000000 -0600
+++ drivers/net/r8169.c.new     2005-02-27 20:29:29.000000000 -0600
@@ -929,8 +929,13 @@ static void rtl8169_get_ethtool_stats(st
                cpu_relax();
        }

-       if (RTL_R32(StatsAddrLow) & DumpStats)
+       if (RTL_R32(StatsAddrLow) & DumpStats) {
+               if (!netif_running(netdev)) {
+                       for (i = 0; i < 14; i++)
+                               data[i] = 0;
+               }
                return; /* no stats - took too long */
+       }

        i = 0;
        data[i++] = le64_to_cpu(tp->nic_stats->tx_ok);

  parent reply	other threads:[~2005-02-28  2:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-26 14:53 [PATCH]: r8169: Expose hardware stats via ethtool Richard Dawe
2005-02-26 15:57 ` Jeff Garzik
2005-02-27 22:46   ` Richard Dawe
2005-02-26 17:32 ` Jon Mason
2005-02-26 18:02   ` Jeff Garzik
2005-02-26 18:03     ` Jeff Garzik
2005-02-26 18:12     ` Francois Romieu
2005-02-27 22:53       ` Richard Dawe
2005-02-27 22:59         ` Jeff Garzik
2005-02-28  2:31         ` Jon Mason [this message]
2005-02-28  2:58           ` Jeff Garzik
2005-02-28  4:16             ` Ben Greear
2005-03-05 13:53               ` Richard Dawe
2005-02-26 18:36     ` Jon Mason
2005-02-26 18:26 ` Francois Romieu
2005-02-27 22:44   ` Richard Dawe
2005-02-27 19:28 ` Jon Mason

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=200502272031.12291.jdmason@us.ibm.com \
    --to=jdmason@us.ibm.com \
    --cc=netdev@oss.sgi.com \
    --cc=rich@phekda.gotadsl.co.uk \
    --cc=romieu@fr.zoreil.com \
    /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).