linux/drivers/net/ethernet/stmicro/stmmac
Yannick Vignon 80d4609008 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: 92ba688851 ("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>
2022-02-03 13:54:19 -08:00
..
altr_tse_pcs.c
altr_tse_pcs.h
chain_mode.c
common.h net: stmmac: bump tc when get underflow error from DMA descriptor 2021-12-13 12:20:35 +00:00
descs_com.h
descs.h
dwmac4_core.c ethernet: constify references to netdev->dev_addr in drivers 2021-10-14 09:22:11 -07:00
dwmac4_descs.c net: stmmac: bump tc when get underflow error from DMA descriptor 2021-12-13 12:20:35 +00:00
dwmac4_descs.h
dwmac4_dma.c net: stmmac: fix get_hw_feature() on old hardware 2021-10-08 16:22:38 +01:00
dwmac4_dma.h
dwmac4_lib.c ethernet: constify references to netdev->dev_addr in drivers 2021-10-14 09:22:11 -07:00
dwmac4.h
dwmac5.c
dwmac5.h
dwmac100_core.c ethernet: constify references to netdev->dev_addr in drivers 2021-10-14 09:22:11 -07:00
dwmac100_dma.c
dwmac100.h
dwmac1000_core.c ethernet: constify references to netdev->dev_addr in drivers 2021-10-14 09:22:11 -07:00
dwmac1000_dma.c net: stmmac: fix get_hw_feature() on old hardware 2021-10-08 16:22:38 +01:00
dwmac1000.h
dwmac_dma.h net: stmmac: dump gmac4 DMA registers correctly 2022-01-31 21:21:10 -08:00
dwmac_lib.c ethernet: constify references to netdev->dev_addr in drivers 2021-10-14 09:22:11 -07:00
dwmac-anarion.c
dwmac-dwc-qos-eth.c
dwmac-generic.c net: stmmac: add support for dwmac 3.40a 2021-10-08 16:22:39 +01:00
dwmac-imx.c
dwmac-ingenic.c
dwmac-intel-plat.c
dwmac-intel.c
dwmac-intel.h
dwmac-ipq806x.c net: ethernet: stmmac: Do not use unreachable() in ipq806x_gmac_probe() 2021-08-07 09:45:46 +01:00
dwmac-loongson.c stmmac: dwmac-loongson:Fix missing return value 2021-09-06 12:52:52 +01:00
dwmac-lpc18xx.c
dwmac-mediatek.c
dwmac-meson8b.c
dwmac-meson.c
dwmac-oxnas.c net: stmmac: dwmac-oxnas: Add support for OX810SE 2022-01-12 09:05:02 -08:00
dwmac-qcom-ethqos.c net: stmmac: Add platform level debug register dump feature 2021-11-30 11:57:58 +00:00
dwmac-rk.c net: stmmac: dwmac-rk: fix oob read in rk_gmac_setup 2021-12-16 10:47:48 +00:00
dwmac-socfpga.c net: stmmac: socfpga: add runtime suspend/resume callback for stratix10 platform 2021-11-15 14:20:42 +00:00
dwmac-sti.c
dwmac-stm32.c
dwmac-sun8i.c net: stmmac: dwmac-sun8i: use return val of readl_poll_timeout() 2022-01-27 13:51:10 +00:00
dwmac-sunxi.c
dwmac-visconti.c net: stmmac: dwmac-visconti: No change to ETHER_CLOCK_SEL for unexpected speed request. 2022-01-28 14:28:30 +00:00
dwxgmac2_core.c ethernet: constify references to netdev->dev_addr in drivers 2021-10-14 09:22:11 -07:00
dwxgmac2_descs.c
dwxgmac2_dma.c net: stmmac: fix get_hw_feature() on old hardware 2021-10-08 16:22:38 +01:00
dwxgmac2.h
dwxlgmac2.h
enh_desc.c
hwif.c
hwif.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-10-14 16:50:14 -07:00
Kconfig ethernet: fix PTP_1588_CLOCK dependencies 2021-08-13 17:49:05 -07:00
Makefile
mmc_core.c
mmc.h
norm_desc.c
ring_mode.c
stmmac_ethtool.c net: stmmac: dump gmac4 DMA registers correctly 2022-01-31 21:21:10 -08:00
stmmac_hwtstamp.c net: stmmac: ensure PTP time register reads are consistent 2022-02-03 13:54:19 -08:00
stmmac_main.c net: stmmac: properly handle with runtime pm in stmmac_dvr_remove() 2022-01-28 15:13:22 +00:00
stmmac_mdio.c
stmmac_pci.c
stmmac_pcs.h
stmmac_platform.c net: stmmac: retain PTP clock time during SIOCSHWTSTAMP ioctls 2021-11-22 14:29:26 +00:00
stmmac_platform.h
stmmac_ptp.c net: stmmac: configure PTP clock source prior to PTP initialization 2022-01-27 13:45:56 +00:00
stmmac_ptp.h
stmmac_selftests.c ethernet: constify references to netdev->dev_addr in drivers 2021-10-14 09:22:11 -07:00
stmmac_tc.c net: stmmac: add tc flower filter for EtherType matching 2021-12-23 11:20:49 +00:00
stmmac_xdp.c net: stmmac: enhance XDP ZC driver level switching performance 2021-11-15 12:56:34 +00:00
stmmac_xdp.h
stmmac.h net: stmmac: remove unused members in struct stmmac_priv 2022-01-24 13:31:45 +00:00