Commit 29477e24 authored by Bruce Allan's avatar Bruce Allan Committed by David S. Miller

e1000e: don't accumulate PHY statistics on PHY read failure

Signed-off-by: default avatarBruce Allan <bruce.w.allan@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 28b8f04a
...@@ -3315,23 +3315,23 @@ void e1000e_update_stats(struct e1000_adapter *adapter) ...@@ -3315,23 +3315,23 @@ void e1000e_update_stats(struct e1000_adapter *adapter)
if ((hw->phy.type == e1000_phy_82578) || if ((hw->phy.type == e1000_phy_82578) ||
(hw->phy.type == e1000_phy_82577)) { (hw->phy.type == e1000_phy_82577)) {
e1e_rphy(hw, HV_SCC_UPPER, &phy_data); e1e_rphy(hw, HV_SCC_UPPER, &phy_data);
e1e_rphy(hw, HV_SCC_LOWER, &phy_data); if (!e1e_rphy(hw, HV_SCC_LOWER, &phy_data))
adapter->stats.scc += phy_data; adapter->stats.scc += phy_data;
e1e_rphy(hw, HV_ECOL_UPPER, &phy_data); e1e_rphy(hw, HV_ECOL_UPPER, &phy_data);
e1e_rphy(hw, HV_ECOL_LOWER, &phy_data); if (!e1e_rphy(hw, HV_ECOL_LOWER, &phy_data))
adapter->stats.ecol += phy_data; adapter->stats.ecol += phy_data;
e1e_rphy(hw, HV_MCC_UPPER, &phy_data); e1e_rphy(hw, HV_MCC_UPPER, &phy_data);
e1e_rphy(hw, HV_MCC_LOWER, &phy_data); if (!e1e_rphy(hw, HV_MCC_LOWER, &phy_data))
adapter->stats.mcc += phy_data; adapter->stats.mcc += phy_data;
e1e_rphy(hw, HV_LATECOL_UPPER, &phy_data); e1e_rphy(hw, HV_LATECOL_UPPER, &phy_data);
e1e_rphy(hw, HV_LATECOL_LOWER, &phy_data); if (!e1e_rphy(hw, HV_LATECOL_LOWER, &phy_data))
adapter->stats.latecol += phy_data; adapter->stats.latecol += phy_data;
e1e_rphy(hw, HV_DC_UPPER, &phy_data); e1e_rphy(hw, HV_DC_UPPER, &phy_data);
e1e_rphy(hw, HV_DC_LOWER, &phy_data); if (!e1e_rphy(hw, HV_DC_LOWER, &phy_data))
adapter->stats.dc += phy_data; adapter->stats.dc += phy_data;
} else { } else {
adapter->stats.scc += er32(SCC); adapter->stats.scc += er32(SCC);
...@@ -3360,7 +3360,7 @@ void e1000e_update_stats(struct e1000_adapter *adapter) ...@@ -3360,7 +3360,7 @@ void e1000e_update_stats(struct e1000_adapter *adapter)
if ((hw->phy.type == e1000_phy_82578) || if ((hw->phy.type == e1000_phy_82578) ||
(hw->phy.type == e1000_phy_82577)) { (hw->phy.type == e1000_phy_82577)) {
e1e_rphy(hw, HV_COLC_UPPER, &phy_data); e1e_rphy(hw, HV_COLC_UPPER, &phy_data);
e1e_rphy(hw, HV_COLC_LOWER, &phy_data); if (!e1e_rphy(hw, HV_COLC_LOWER, &phy_data))
hw->mac.collision_delta = phy_data; hw->mac.collision_delta = phy_data;
} else { } else {
hw->mac.collision_delta = er32(COLC); hw->mac.collision_delta = er32(COLC);
...@@ -3372,7 +3372,7 @@ void e1000e_update_stats(struct e1000_adapter *adapter) ...@@ -3372,7 +3372,7 @@ void e1000e_update_stats(struct e1000_adapter *adapter)
if ((hw->phy.type == e1000_phy_82578) || if ((hw->phy.type == e1000_phy_82578) ||
(hw->phy.type == e1000_phy_82577)) { (hw->phy.type == e1000_phy_82577)) {
e1e_rphy(hw, HV_TNCRS_UPPER, &phy_data); e1e_rphy(hw, HV_TNCRS_UPPER, &phy_data);
e1e_rphy(hw, HV_TNCRS_LOWER, &phy_data); if (!e1e_rphy(hw, HV_TNCRS_LOWER, &phy_data))
adapter->stats.tncrs += phy_data; adapter->stats.tncrs += phy_data;
} else { } else {
if ((hw->mac.type != e1000_82574) && if ((hw->mac.type != e1000_82574) &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment