aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBruce Allan <bruce.w.allan@intel.com>2010-01-07 11:31:16 -0500
committerDavid S. Miller <davem@davemloft.net>2010-01-08 03:35:30 -0500
commit29477e249f5a28444c556bbb816f3af2b6f84412 (patch)
tree3da39b180e35158166636fca66e6585a85ecb0f9 /drivers
parent28b8f04a5256ca5ec0781b06ee9353c37c650980 (diff)
e1000e: don't accumulate PHY statistics on PHY read failure
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/e1000e/netdev.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index 10aa0ec719d..c45965a256b 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -3315,24 +3315,24 @@ void e1000e_update_stats(struct e1000_adapter *adapter)
3315 if ((hw->phy.type == e1000_phy_82578) || 3315 if ((hw->phy.type == e1000_phy_82578) ||
3316 (hw->phy.type == e1000_phy_82577)) { 3316 (hw->phy.type == e1000_phy_82577)) {
3317 e1e_rphy(hw, HV_SCC_UPPER, &phy_data); 3317 e1e_rphy(hw, HV_SCC_UPPER, &phy_data);
3318 e1e_rphy(hw, HV_SCC_LOWER, &phy_data); 3318 if (!e1e_rphy(hw, HV_SCC_LOWER, &phy_data))
3319 adapter->stats.scc += phy_data; 3319 adapter->stats.scc += phy_data;
3320 3320
3321 e1e_rphy(hw, HV_ECOL_UPPER, &phy_data); 3321 e1e_rphy(hw, HV_ECOL_UPPER, &phy_data);
3322 e1e_rphy(hw, HV_ECOL_LOWER, &phy_data); 3322 if (!e1e_rphy(hw, HV_ECOL_LOWER, &phy_data))
3323 adapter->stats.ecol += phy_data; 3323 adapter->stats.ecol += phy_data;
3324 3324
3325 e1e_rphy(hw, HV_MCC_UPPER, &phy_data); 3325 e1e_rphy(hw, HV_MCC_UPPER, &phy_data);
3326 e1e_rphy(hw, HV_MCC_LOWER, &phy_data); 3326 if (!e1e_rphy(hw, HV_MCC_LOWER, &phy_data))
3327 adapter->stats.mcc += phy_data; 3327 adapter->stats.mcc += phy_data;
3328 3328
3329 e1e_rphy(hw, HV_LATECOL_UPPER, &phy_data); 3329 e1e_rphy(hw, HV_LATECOL_UPPER, &phy_data);
3330 e1e_rphy(hw, HV_LATECOL_LOWER, &phy_data); 3330 if (!e1e_rphy(hw, HV_LATECOL_LOWER, &phy_data))
3331 adapter->stats.latecol += phy_data; 3331 adapter->stats.latecol += phy_data;
3332 3332
3333 e1e_rphy(hw, HV_DC_UPPER, &phy_data); 3333 e1e_rphy(hw, HV_DC_UPPER, &phy_data);
3334 e1e_rphy(hw, HV_DC_LOWER, &phy_data); 3334 if (!e1e_rphy(hw, HV_DC_LOWER, &phy_data))
3335 adapter->stats.dc += phy_data; 3335 adapter->stats.dc += phy_data;
3336 } else { 3336 } else {
3337 adapter->stats.scc += er32(SCC); 3337 adapter->stats.scc += er32(SCC);
3338 adapter->stats.ecol += er32(ECOL); 3338 adapter->stats.ecol += er32(ECOL);
@@ -3360,8 +3360,8 @@ void e1000e_update_stats(struct e1000_adapter *adapter)
3360 if ((hw->phy.type == e1000_phy_82578) || 3360 if ((hw->phy.type == e1000_phy_82578) ||
3361 (hw->phy.type == e1000_phy_82577)) { 3361 (hw->phy.type == e1000_phy_82577)) {
3362 e1e_rphy(hw, HV_COLC_UPPER, &phy_data); 3362 e1e_rphy(hw, HV_COLC_UPPER, &phy_data);
3363 e1e_rphy(hw, HV_COLC_LOWER, &phy_data); 3363 if (!e1e_rphy(hw, HV_COLC_LOWER, &phy_data))
3364 hw->mac.collision_delta = phy_data; 3364 hw->mac.collision_delta = phy_data;
3365 } else { 3365 } else {
3366 hw->mac.collision_delta = er32(COLC); 3366 hw->mac.collision_delta = er32(COLC);
3367 } 3367 }
@@ -3372,8 +3372,8 @@ void e1000e_update_stats(struct e1000_adapter *adapter)
3372 if ((hw->phy.type == e1000_phy_82578) || 3372 if ((hw->phy.type == e1000_phy_82578) ||
3373 (hw->phy.type == e1000_phy_82577)) { 3373 (hw->phy.type == e1000_phy_82577)) {
3374 e1e_rphy(hw, HV_TNCRS_UPPER, &phy_data); 3374 e1e_rphy(hw, HV_TNCRS_UPPER, &phy_data);
3375 e1e_rphy(hw, HV_TNCRS_LOWER, &phy_data); 3375 if (!e1e_rphy(hw, HV_TNCRS_LOWER, &phy_data))
3376 adapter->stats.tncrs += phy_data; 3376 adapter->stats.tncrs += phy_data;
3377 } else { 3377 } else {
3378 if ((hw->mac.type != e1000_82574) && 3378 if ((hw->mac.type != e1000_82574) &&
3379 (hw->mac.type != e1000_82583)) 3379 (hw->mac.type != e1000_82583))