tg3: don't clear stats while tg3_close
authorYueHaibing <yuehaibing@huawei.com>
Wed, 3 May 2017 07:51:32 +0000 (15:51 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 3 May 2017 13:51:25 +0000 (09:51 -0400)
commit37a7fdf2892be124545ddaf99b85de576121476c
tree512d397ce6d991696a55359e812e3a04977e4613
parent1c2dd16add7ebd7fc6a47f21a42f502cfed5ec2f
tg3: don't clear stats while tg3_close

Now tg3 NIC's stats will be cleared after ifdown/ifup. bond_get_stats traverse
its salves to get statistics,cumulative the increment.If a tg3 NIC is added to
bonding as a slave,ifdown/ifup will cause bonding's stats become tremendous value
(ex.1638.3 PiB) because of negative increment.

Fixes: 92feeabf3f67 ("tg3: Save stats across chip resets")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/tg3.c