| To: | Richard Dawe <rich@xxxxxxxxxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH]: r8169: Expose hardware stats via ethtool |
| From: | Jon Mason <jdmason@xxxxxxxxxx> |
| Date: | Sun, 27 Feb 2005 20:31:12 -0600 |
| Cc: | Francois Romieu <romieu@xxxxxxxxxxxxx>, netdev@xxxxxxxxxxx |
| In-reply-to: | <42224F76.9000602@phekda.gotadsl.co.uk> |
| Organization: | IBM |
| References: | <42208D83.80803@phekda.gotadsl.co.uk> <20050226181213.GA13230@electric-eye.fr.zoreil.com> <42224F76.9000602@phekda.gotadsl.co.uk> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | KMail/1.7.2 |
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);
|
| Previous by Date: | Re: [Lse-tech] Re: A common layer for Accounting packages, Kaigai Kohei |
|---|---|
| Next by Date: | Re: [Lse-tech] Re: A common layer for Accounting packages, Thomas Graf |
| Previous by Thread: | Re: [PATCH]: r8169: Expose hardware stats via ethtool, Jeff Garzik |
| Next by Thread: | Re: [PATCH]: r8169: Expose hardware stats via ethtool, Jeff Garzik |
| Indexes: | [Date] [Thread] [Top] [All Lists] |