Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: 92ba688 ("stmmac: add the support for PTP hw clock driver") Signed-off-by: Yannick Vignon <[email protected]> Reviewed-by: Russell King (Oracle) <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
- Loading branch information