Skip to content

Commit

Permalink
igb: update stats before doing reset in igb_down
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexander Duyck authored and David S. Miller committed Feb 7, 2009
1 parent 450c87c commit 04fe635
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/igb/igb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 04fe635

Please sign in to comment.