aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igb/igb_main.c
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2009-02-06 18:22:32 -0500
committerDavid S. Miller <davem@davemloft.net>2009-02-07 05:43:16 -0500
commit04fe63583d4648c0378a58afc0de89b640d822ef (patch)
treed76254747749a61db621d99bb4a5867289cc40b4 /drivers/net/igb/igb_main.c
parent450c87c8d28aeaf83889389ceeb01457c1a6f3e9 (diff)
igb: update stats before doing reset in igb_down
It was seen with repeated interface up/down testing that there was a large stray between the stats reported by the queues and the stats reported by the HW. It was found to be an issue in that hw stats were being reset without first being recorded. This change records the stats before wiping them from the system via the reset. 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/igb_main.c')
-rw-r--r--drivers/net/igb/igb_main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 3b79ad8be53a..88f135f4b27f 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -858,6 +858,10 @@ void igb_down(struct igb_adapter *adapter)
858 858
859 netdev->tx_queue_len = adapter->tx_queue_len; 859 netdev->tx_queue_len = adapter->tx_queue_len;
860 netif_carrier_off(netdev); 860 netif_carrier_off(netdev);
861
862 /* record the stats before reset*/
863 igb_update_stats(adapter);
864
861 adapter->link_speed = 0; 865 adapter->link_speed = 0;
862 adapter->link_duplex = 0; 866 adapter->link_duplex = 0;
863 867