aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/e1000/e1000_ethtool.c3
-rw-r--r--drivers/net/e1000/e1000_hw.c3
-rw-r--r--drivers/net/e1000/e1000_hw.h1
-rw-r--r--drivers/net/e1000/e1000_main.c7
4 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c
index da459f7177c6..fb96c87f9e56 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -100,6 +100,9 @@ static const struct e1000_stats e1000_gstrings_stats[] = {
100 { "rx_csum_offload_errors", E1000_STAT(hw_csum_err) }, 100 { "rx_csum_offload_errors", E1000_STAT(hw_csum_err) },
101 { "rx_header_split", E1000_STAT(rx_hdr_split) }, 101 { "rx_header_split", E1000_STAT(rx_hdr_split) },
102 { "alloc_rx_buff_failed", E1000_STAT(alloc_rx_buff_failed) }, 102 { "alloc_rx_buff_failed", E1000_STAT(alloc_rx_buff_failed) },
103 { "tx_smbus", E1000_STAT(stats.mgptc) },
104 { "rx_smbus", E1000_STAT(stats.mgprc) },
105 { "dropped_smbus", E1000_STAT(stats.mgpdc) },
103}; 106};
104 107
105#define E1000_QUEUE_STATS_LEN 0 108#define E1000_QUEUE_STATS_LEN 0
diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c
index 5a6a61ecb27d..9be44699300b 100644
--- a/drivers/net/e1000/e1000_hw.c
+++ b/drivers/net/e1000/e1000_hw.c
@@ -458,6 +458,9 @@ e1000_set_mac_type(struct e1000_hw *hw)
458 if (hw->mac_type == e1000_80003es2lan) 458 if (hw->mac_type == e1000_80003es2lan)
459 hw->rx_needs_kicking = TRUE; 459 hw->rx_needs_kicking = TRUE;
460 460
461 if (hw->mac_type > e1000_82544)
462 hw->has_smbus = TRUE;
463
461 return E1000_SUCCESS; 464 return E1000_SUCCESS;
462} 465}
463 466
diff --git a/drivers/net/e1000/e1000_hw.h b/drivers/net/e1000/e1000_hw.h
index 15b8625c40c1..d67105883341 100644
--- a/drivers/net/e1000/e1000_hw.h
+++ b/drivers/net/e1000/e1000_hw.h
@@ -1464,6 +1464,7 @@ struct e1000_hw {
1464 boolean_t bad_tx_carr_stats_fd; 1464 boolean_t bad_tx_carr_stats_fd;
1465 boolean_t has_manc2h; 1465 boolean_t has_manc2h;
1466 boolean_t rx_needs_kicking; 1466 boolean_t rx_needs_kicking;
1467 boolean_t has_smbus;
1467}; 1468};
1468 1469
1469 1470
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 3f40a902de64..b06b51a55276 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -3743,6 +3743,13 @@ e1000_update_stats(struct e1000_adapter *adapter)
3743 adapter->phy_stats.receive_errors += phy_tmp; 3743 adapter->phy_stats.receive_errors += phy_tmp;
3744 } 3744 }
3745 3745
3746 /* Management Stats */
3747 if (adapter->hw.has_smbus) {
3748 adapter->stats.mgptc += E1000_READ_REG(hw, MGTPTC);
3749 adapter->stats.mgprc += E1000_READ_REG(hw, MGTPRC);
3750 adapter->stats.mgpdc += E1000_READ_REG(hw, MGTPDC);
3751 }
3752
3746 spin_unlock_irqrestore(&adapter->stats_lock, flags); 3753 spin_unlock_irqrestore(&adapter->stats_lock, flags);
3747} 3754}
3748#ifdef CONFIG_PCI_MSI 3755#ifdef CONFIG_PCI_MSI