From: Alexander Duyck Date: Fri, 6 Feb 2009 23:22:32 +0000 (+0000) Subject: igb: update stats before doing reset in igb_down X-Git-Tag: v2.6.30-rc1~662^2~770 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=04fe63583d4648c0378a58afc0de89b640d822ef;p=~emulex%2Finfiniband.git 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 Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller --- diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index 3b79ad8be53..88f135f4b27 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) netdev->tx_queue_len = adapter->tx_queue_len; netif_carrier_off(netdev); + + /* record the stats before reset*/ + igb_update_stats(adapter); + adapter->link_speed = 0; adapter->link_duplex = 0;