]> git.baikalelectronics.ru Git - kernel.git/commit
net: aquantia: Update hw counters on hw init
authorIgor Russkikh <igor.russkikh@aquantia.com>
Thu, 14 Dec 2017 09:34:46 +0000 (12:34 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Dec 2017 17:46:42 +0000 (12:46 -0500)
commit2cba72e41cec051f355a6d94a828f35800554df0
treea009c17ad09d57d85884e635f41baf240f378cbe
parentbcaef010b6af0ac5094bc423e0d77779ac2d9a28
net: aquantia: Update hw counters on hw init

On very first start we should read out current HW counter values
to make diff based calculations later.
This also should be done each time NIC gets down/up or wakes up
after sleep state. We reset link state explicitly to prevent diffs
from being summed this first time.

Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c