net: stmmac: add aux timestamps fifo clearance wait
authorNoor Azura Ahmad Tarmizi <noor.azura.ahmad.tarmizi@intel.com>
Wed, 11 Jan 2023 05:02:00 +0000 (13:02 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:48:48 +0000 (11:48 +0100)
commite81d82da619adbfafc0b152af504d9aa153702c4
tree4eabb8fb5076c10402b9a1947b7b9b269fcbc68c
parent44167b74a8a370b316e1a861ffb7bd44a763304f
net: stmmac: add aux timestamps fifo clearance wait

commit ae9dcb91c6069e20b3b9505d79cbc89fd6e086f5 upstream.

Add timeout polling wait for auxiliary timestamps snapshot FIFO clear bit
(ATSFC) to clear. This is to ensure no residue fifo value is being read
erroneously.

Fixes: f4da56529da6 ("net: stmmac: Add support for external trigger timestamping")
Cc: <stable@vger.kernel.org> # 5.10.x
Signed-off-by: Noor Azura Ahmad Tarmizi <noor.azura.ahmad.tarmizi@intel.com>
Link: https://lore.kernel.org/r/20230111050200.2130-1-noor.azura.ahmad.tarmizi@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c