diff options
author | Yannick Vignon <yannick.vignon@nxp.com> | 2022-02-03 17:00:25 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-02-03 13:54:19 -0800 |
commit | 80d4609008e6d696a279e39ae7458c916fcd44c1 (patch) | |
tree | 11559b54a09d07ee78ec76d9d00f914d3c28713b /net | |
parent | 77b1b8b43ec3c060ecf7e926a92b0f8772171046 (diff) |
net: stmmac: ensure PTP time register reads are consistent
Even if protected from preemption and interrupts, a small time window
remains when the 2 register reads could return inconsistent values,
each time the "seconds" register changes. This could lead to an about
1-second error in the reported time.
Add logic to ensure the "seconds" and "nanoseconds" values are consistent.
Fixes: 92ba6888510c ("stmmac: add the support for PTP hw clock driver")
Signed-off-by: Yannick Vignon <yannick.vignon@nxp.com>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://lore.kernel.org/r/20220203160025.750632-1-yannick.vignon@oss.nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions