ionic: avoid races in ionic_heartbeat_check
authorShannon Nelson <snelson@pensando.io>
Tue, 30 Mar 2021 19:52:09 +0000 (12:52 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 31 Mar 2021 00:37:12 +0000 (17:37 -0700)
commitb2b9a8d7ed134ae72e5ef8d0003d054af8e5e2bf
treeaba781f457d607bc41fef50b7b62a968b879693b
parent230efff47adbea8274810b593a9caf8e46c2c1f7
ionic: avoid races in ionic_heartbeat_check

Rework the heartbeat checks to be sure that we're getting an
atomic operation.  Through testing we found occasions where a
separate thread could clash with this check and cause erroneous
heartbeat check results.

Signed-off-by: Allen Hubbe <allenbh@pensando.io>
Signed-off-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/pensando/ionic/ionic_dev.c
drivers/net/ethernet/pensando/ionic/ionic_dev.h