aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-12-15 10:41:15 -0500
committerJeff Garzik <jeff@garzik.org>2006-12-26 15:51:28 -0500
commit167fb2841633edd2812e385af4b593d870abd15a (patch)
tree0199485f6443ae08f7499fcb0537814f6d66fd04 /drivers/net/e1000
parentbd2371ebcc71d0a276ae341d735326a8beab6627 (diff)
e1000: omit stats for broken counter in 82543
The 82543 chip does not count tx_carrier_errors properly in FD mode; report zeros instead of garbage. Originally from Jesse Brandeburg <jesse.brandeburg@intel.com>, rewritten to use feature flags by me. Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/e1000')
-rw-r--r--drivers/net/e1000/e1000_hw.c6
-rw-r--r--drivers/net/e1000/e1000_hw.h1
-rw-r--r--drivers/net/e1000/e1000_main.c5
3 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c
index 0201ca548cd1..ce82eb52ea95 100644
--- a/drivers/net/e1000/e1000_hw.c
+++ b/drivers/net/e1000/e1000_hw.c
@@ -442,6 +442,12 @@ e1000_set_mac_type(struct e1000_hw *hw)
442 break; 442 break;
443 } 443 }
444 444
445 /* The 82543 chip does not count tx_carrier_errors properly in
446 * FD mode
447 */
448 if (hw->mac_type == e1000_82543)
449 hw->bad_tx_carr_stats_fd = TRUE;
450
445 return E1000_SUCCESS; 451 return E1000_SUCCESS;
446} 452}
447 453
diff --git a/drivers/net/e1000/e1000_hw.h b/drivers/net/e1000/e1000_hw.h
index 28cdfe39e39a..fef1f7b4845b 100644
--- a/drivers/net/e1000/e1000_hw.h
+++ b/drivers/net/e1000/e1000_hw.h
@@ -1460,6 +1460,7 @@ struct e1000_hw {
1460 boolean_t mng_reg_access_disabled; 1460 boolean_t mng_reg_access_disabled;
1461 boolean_t leave_av_bit_off; 1461 boolean_t leave_av_bit_off;
1462 boolean_t kmrn_lock_loss_workaround_disabled; 1462 boolean_t kmrn_lock_loss_workaround_disabled;
1463 boolean_t bad_tx_carr_stats_fd;
1463}; 1464};
1464 1465
1465 1466
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 62ef267b3d64..0816de267610 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)
3581 adapter->net_stats.tx_aborted_errors = adapter->stats.ecol; 3581 adapter->net_stats.tx_aborted_errors = adapter->stats.ecol;
3582 adapter->net_stats.tx_window_errors = adapter->stats.latecol; 3582 adapter->net_stats.tx_window_errors = adapter->stats.latecol;
3583 adapter->net_stats.tx_carrier_errors = adapter->stats.tncrs; 3583 adapter->net_stats.tx_carrier_errors = adapter->stats.tncrs;
3584 if (adapter->hw.bad_tx_carr_stats_fd &&
3585 adapter->link_duplex == FULL_DUPLEX) {
3586 adapter->net_stats.tx_carrier_errors = 0;
3587 adapter->stats.tncrs = 0;
3588 }
3584 3589
3585 /* Tx Dropped needs to be maintained elsewhere */ 3590 /* Tx Dropped needs to be maintained elsewhere */
3586 3591