From: Jeff Garzik <jeff@garzik.org>
To: Arjan van de Ven <arjan@linux.intel.com>
Cc: netdev@vger.kernel.org, "Kok, Auke" <auke-jan.h.kok@intel.com>,
John Ronciak <john.ronciak@intel.com>,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: Re: [patch 03/14] e1000: omit stats for broken counter in 82543
Date: Fri, 15 Dec 2006 10:37:39 -0500 [thread overview]
Message-ID: <4582C143.70009@garzik.org> (raw)
In-Reply-To: <1166175100.3365.115.camel@laptopd505.fenrus.org>
[-- Attachment #1: Type: text/plain, Size: 621 bytes --]
Arjan van de Ven wrote:
> Subject: e1000: omit stats for broken counter in 82543
> From: Jesse Brandeburg <jesse.brandeburg@intel.com>
>
> The 82543 chip does not count tx_carrier_errors properly in FD mode;
> report zeros instead of garbage.
>
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
> Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
I rewrote your patch #3 into the attached patch. Man, that was hard.
It was a MAJOR REVISION, trust me.
See attached. (e1000 even ALREADY HAS some feature flags for this sort
of thing)
Jeff
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 1389 bytes --]
diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c
index 0201ca5..7376609 100644
--- a/drivers/net/e1000/e1000_hw.c
+++ b/drivers/net/e1000/e1000_hw.c
@@ -442,6 +442,9 @@ e1000_set_mac_type(struct e1000_hw *hw)
break;
}
+ if (hw->mac_type == e1000_82543)
+ hw->bad_tx_carr_stats_fd = TRUE;
+
return E1000_SUCCESS;
}
diff --git a/drivers/net/e1000/e1000_hw.h b/drivers/net/e1000/e1000_hw.h
index 28cdfe3..fef1f7b 100644
--- a/drivers/net/e1000/e1000_hw.h
+++ b/drivers/net/e1000/e1000_hw.h
@@ -1460,6 +1460,7 @@ struct e1000_hw {
boolean_t mng_reg_access_disabled;
boolean_t leave_av_bit_off;
boolean_t kmrn_lock_loss_workaround_disabled;
+ boolean_t bad_tx_carr_stats_fd;
};
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 62ef267..0816de2 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -3581,6 +3581,11 @@ e1000_update_stats(struct e1000_adapter *adapter)
adapter->net_stats.tx_aborted_errors = adapter->stats.ecol;
adapter->net_stats.tx_window_errors = adapter->stats.latecol;
adapter->net_stats.tx_carrier_errors = adapter->stats.tncrs;
+ if (adapter->hw.bad_tx_carr_stats_fd &&
+ adapter->link_duplex == FULL_DUPLEX) {
+ adapter->net_stats.tx_carrier_errors = 0;
+ adapter->stats.tncrs = 0;
+ }
/* Tx Dropped needs to be maintained elsewhere */
next prev parent reply other threads:[~2006-12-15 15:37 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-15 9:28 [patch 00/14] E1000 bugfix series for 2.6.20 Arjan van de Ven
2006-12-15 9:29 ` [patch 01/14] e1000: The user-supplied itr setting needs the lower 2 bits masked off Arjan van de Ven
2006-12-15 9:30 ` [patch 02/14] e1000: dynamic itr: take TSO and jumbo into account Arjan van de Ven
2006-12-15 9:31 ` [patch 03/14] e1000: omit stats for broken counter in 82543 Arjan van de Ven
2006-12-15 14:30 ` Jeff Garzik
2006-12-15 14:33 ` Arjan van de Ven
2006-12-15 14:50 ` Jeff Garzik
2006-12-15 15:37 ` Jeff Garzik [this message]
2006-12-15 9:32 ` [patch 04/14] e1000: consolidate managability enabling/disabling Arjan van de Ven
2006-12-15 14:32 ` Jeff Garzik
2006-12-15 15:57 ` Jeff Garzik
2006-12-15 9:33 ` [patch 05/14] e1000: Fix Wake-on-Lan with forced gigabit speed Arjan van de Ven
2006-12-15 14:33 ` Jeff Garzik
2006-12-15 16:00 ` Jeff Garzik
2006-12-15 9:34 ` [patch 06/14] e1000: disable TSO on the 82544 with slab debugging Arjan van de Ven
2006-12-15 14:33 ` Jeff Garzik
2006-12-16 1:04 ` Herbert Xu
2006-12-16 20:18 ` Jesse Brandeburg
2006-12-26 21:28 ` Jeff Garzik
2006-12-15 9:35 ` [patch 07/14] e1000: workaround for the ESB2 NIC RX unit issue Arjan van de Ven
2006-12-15 14:33 ` Jeff Garzik
2006-12-15 9:36 ` [patch 08/14] e1000: fix to set the new max frame size before resetting the adapter Arjan van de Ven
2006-12-15 9:37 ` [patch 09/14] e1000: fix ethtool reported bus type for older adapters Arjan van de Ven
2006-12-15 14:34 ` Jeff Garzik
2006-12-15 9:38 ` [patch 10/14] e1000: narrow down the scope of the tipg timer tweak Arjan van de Ven
2006-12-15 14:34 ` Jeff Garzik
2006-12-15 9:39 ` [patch 11/14] e1000: Fix PBA allocation calculations Arjan van de Ven
2006-12-15 9:40 ` [patch 12/14] e1000: Make the copybreak value a module parameter Arjan van de Ven
2006-12-15 14:35 ` Jeff Garzik
2006-12-15 16:09 ` Jeff Garzik
2006-12-15 9:41 ` [patch 13/14] e1000: 3 new driver stats for managability testing Arjan van de Ven
2006-12-15 14:35 ` Jeff Garzik
2006-12-15 16:17 ` Jeff Garzik
2006-12-15 9:42 ` [patch 14/14] e1000: No-delay link detection at interface up Arjan van de Ven
2006-12-15 14:36 ` Jeff Garzik
2006-12-15 14:37 ` Arjan van de Ven
2006-12-15 14:50 ` Jeff Garzik
2006-12-15 14:02 ` [patch 00/14] E1000 bugfix series for 2.6.20 Jeff Garzik
2006-12-15 14:04 ` Arjan van de Ven
2006-12-15 14:07 ` Jeff Garzik
2006-12-15 14:08 ` Arjan van de Ven
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=4582C143.70009@garzik.org \
--to=jeff@garzik.org \
--cc=arjan@linux.intel.com \
--cc=auke-jan.h.kok@intel.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=john.ronciak@intel.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).