aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igb
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2009-10-27 19:50:18 -0400
committerDavid S. Miller <davem@davemloft.net>2009-10-28 06:25:53 -0400
commit645a3abd73c2ac05d375f080d2f58d56e1502562 (patch)
treee70a0e6402ad4ea4170182c55b3e543459a60b3a /drivers/net/igb
parent25568a531a1bc76fdf968382a4eb65a979186c67 (diff)
igb: Remove invalid stats counters
There are several counters being used like they are static when in fact they are clear on read. In order to prevent the values from being incorrect I am removing the defunct counters. Signed-off-by: Alexander Duyck <alexander.h.duyck@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/net/igb')
-rw-r--r--drivers/net/igb/igb.h6
-rw-r--r--drivers/net/igb/igb_main.c18
2 files changed, 1 insertions, 23 deletions
diff --git a/drivers/net/igb/igb.h b/drivers/net/igb/igb.h
index c27dc1a8d0c6..b9fcfd3c9576 100644
--- a/drivers/net/igb/igb.h
+++ b/drivers/net/igb/igb.h
@@ -269,10 +269,6 @@ struct igb_adapter {
269 /* TX */ 269 /* TX */
270 struct igb_ring *tx_ring; /* One per active queue */ 270 struct igb_ring *tx_ring; /* One per active queue */
271 unsigned long tx_queue_len; 271 unsigned long tx_queue_len;
272 u32 gotc;
273 u64 gotc_old;
274 u64 tpt_old;
275 u64 colc_old;
276 u32 tx_timeout_count; 272 u32 tx_timeout_count;
277 273
278 /* RX */ 274 /* RX */
@@ -280,8 +276,6 @@ struct igb_adapter {
280 int num_tx_queues; 276 int num_tx_queues;
281 int num_rx_queues; 277 int num_rx_queues;
282 278
283 u32 gorc;
284 u64 gorc_old;
285 u32 max_frame_size; 279 u32 max_frame_size;
286 u32 min_frame_size; 280 u32 min_frame_size;
287 281
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 5b0f93911f3d..cb1acca9ac91 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -2925,9 +2925,6 @@ static void igb_watchdog_task(struct work_struct *work)
2925 int i; 2925 int i;
2926 2926
2927 link = igb_has_link(adapter); 2927 link = igb_has_link(adapter);
2928 if ((netif_carrier_ok(netdev)) && link)
2929 goto link_up;
2930
2931 if (link) { 2928 if (link) {
2932 if (!netif_carrier_ok(netdev)) { 2929 if (!netif_carrier_ok(netdev)) {
2933 u32 ctrl; 2930 u32 ctrl;
@@ -2990,20 +2987,8 @@ static void igb_watchdog_task(struct work_struct *work)
2990 } 2987 }
2991 } 2988 }
2992 2989
2993link_up:
2994 igb_update_stats(adapter); 2990 igb_update_stats(adapter);
2995 2991 igb_update_adaptive(hw);
2996 hw->mac.tx_packet_delta = adapter->stats.tpt - adapter->tpt_old;
2997 adapter->tpt_old = adapter->stats.tpt;
2998 hw->mac.collision_delta = adapter->stats.colc - adapter->colc_old;
2999 adapter->colc_old = adapter->stats.colc;
3000
3001 adapter->gorc = adapter->stats.gorc - adapter->gorc_old;
3002 adapter->gorc_old = adapter->stats.gorc;
3003 adapter->gotc = adapter->stats.gotc - adapter->gotc_old;
3004 adapter->gotc_old = adapter->stats.gotc;
3005
3006 igb_update_adaptive(&adapter->hw);
3007 2992
3008 if (!netif_carrier_ok(netdev)) { 2993 if (!netif_carrier_ok(netdev)) {
3009 if (igb_desc_unused(tx_ring) + 1 < tx_ring->count) { 2994 if (igb_desc_unused(tx_ring) + 1 < tx_ring->count) {
@@ -3875,7 +3860,6 @@ void igb_update_stats(struct igb_adapter *adapter)
3875 adapter->stats.bptc += rd32(E1000_BPTC); 3860 adapter->stats.bptc += rd32(E1000_BPTC);
3876 3861
3877 /* used for adaptive IFS */ 3862 /* used for adaptive IFS */
3878
3879 hw->mac.tx_packet_delta = rd32(E1000_TPT); 3863 hw->mac.tx_packet_delta = rd32(E1000_TPT);
3880 adapter->stats.tpt += hw->mac.tx_packet_delta; 3864 adapter->stats.tpt += hw->mac.tx_packet_delta;
3881 hw->mac.collision_delta = rd32(E1000_COLC); 3865 hw->mac.collision_delta = rd32(E1000_COLC);