bnx2x: consistent statistics after internal driver reload

Currently bnx2x statistics are reset by inner driver reload, e.g. by MTU
change. This patch fixes this issue - from now on statistics should only
be reset upon device closure.
Thanks to Michal Schmidt <mschmidt@redhat.com> for his initial patch
regarding this issue.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Mintz Yuval 2012-02-15 02:10:22 +00:00 committed by David S. Miller
parent eb40d89276
commit 1355b704b9
6 changed files with 371 additions and 233 deletions

View file

@ -10235,6 +10235,8 @@ static int bnx2x_open(struct net_device *dev)
int other_engine = BP_PATH(bp) ? 0 : 1;
bool other_load_status, load_status;
bp->stats_init = true;
netif_carrier_off(dev);
bnx2x_set_power_state(bp, PCI_D0);