net: atlantic: use u64_stats_update_* to protect access to 64-bit stats
authorMark Starovoytov <mstarovoitov@marvell.com>
Mon, 20 Jul 2020 18:32:36 +0000 (21:32 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Jul 2020 01:07:38 +0000 (18:07 -0700)
commitd7d8bb9286134bcc57941c38ed2d69c50fc59511
treeef2de013ce741f71b758a8fc3fc15722d892fac8
parent508f2e3dce454843ffd689bb2cf0739a954dd1e9
net: atlantic: use u64_stats_update_* to protect access to 64-bit stats

This patch adds u64_stats_update_* usage to protect access to 64-bit stats,
where necessary.

This is necessary for per-ring stats, because they are updated by the
driver directly, so there is a possibility for a partial read.

Other stats require no additional protection, e.g.:
 * all MACSec stats are fetched directly from HW (under semaphore);
 * nic/ndev stats (aq_stats_s) are fetched directly from FW (under mutex).

Signed-off-by: Mark Starovoytov <mstarovoitov@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
drivers/net/ethernet/aquantia/atlantic/aq_ring.c
drivers/net/ethernet/aquantia/atlantic/aq_ring.h