WSL2-Linux-Kernel/drivers/net/ethernet
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
..
3com ethernet: 3com/typhoon: don't write directly to netdev->dev_addr 2022-01-26 15:40:01 +00:00
8390 ethernet: 8390/etherh: don't write directly to netdev->dev_addr 2022-01-26 15:40:01 +00:00
actions
adaptec
aeroflex
agere et131x: Remove useless DMA-32 fallback configuration 2022-01-09 16:52:19 -08:00
alacritech
allwinner net: ethernet: sun4i-emac: Fix an error handling path in emac_probe() 2022-01-15 22:34:52 +00:00
alteon net: alteon: Simplify DMA setting 2022-01-09 16:52:18 -08:00
altera net: altera: set a couple error code in probe() 2021-12-03 14:23:11 +00:00
amazon net: ena: Extract recurring driver reset code into a function 2022-01-07 19:25:52 -08:00
amd net: amd-xgbe: ensure to reset the tx_timer_active flag 2022-01-27 19:15:10 -08:00
apm net: annotate accesses to queue->trans_start 2021-11-17 14:56:16 +00:00
apple net: apple: bmac: Fix build since dev_addr constification 2022-01-14 11:22:57 +00:00
aquantia net: atlantic: Use the bitmap API instead of hand-writing it 2022-01-24 12:57:01 +00:00
arc
asix Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-11-26 13:45:19 -08:00
atheros Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-12-30 12:12:12 -08:00
broadcom ethernet: broadcom/sb1250-mac: don't write directly to netdev->dev_addr 2022-01-26 15:40:01 +00:00
brocade bna: Simplify DMA setting 2022-01-09 16:52:18 -08:00
cadence net: macb: use .mac_select_pcs() interface 2022-01-06 12:31:49 +00:00
calxeda
cavium Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2021-12-31 14:35:40 +00:00
chelsio Networking fixes for 5.17-rc1, including fixes from netfilter, bpf. 2022-01-20 10:57:05 +02:00
cirrus cirrus: mac89x0: use eth_hw_addr_set() 2021-11-19 11:05:21 +00:00
cisco Updates for the interrupt subsystem: 2022-01-13 08:53:45 -08:00
cortina net: gemini: allow any RGMII interface mode 2022-01-05 10:31:22 -08:00
davicom
dec net: ethernet: dec: tulip: de4x5: fix possible array overflows in type3_infoblock() 2021-11-18 12:03:17 +00:00
dlink
emulex Updates for the interrupt subsystem: 2022-01-13 08:53:45 -08:00
engleder tsnep: Fix s390 devm_ioremap_resource warning 2021-12-17 19:22:57 -08:00
ezchip
faraday ethtool: extend ringparam setting/getting API with rx_buf_len 2021-11-22 12:31:49 +00:00
freescale net: fec_mpc52xx: don't discard const from netdev->dev_addr 2022-01-25 11:10:46 +00:00
fujitsu
google gve: fix the wrong AdminQ buffer queue index check 2022-01-28 15:07:56 +00:00
hisilicon net: hns3: handle empty unknown interrupt for VF 2022-01-25 13:08:05 +00:00
huawei Updates for the interrupt subsystem: 2022-01-13 08:53:45 -08:00
i825xx ethernet: i825xx: don't write directly to netdev->dev_addr 2022-01-26 15:40:01 +00:00
ibm ibmvnic: remove unused ->wait_capability 2022-01-24 12:05:03 +00:00
intel Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue 2022-02-01 21:03:15 -08:00
litex
marvell octeontx2-af: Add KPU changes to parse NGIO as separate layer 2022-01-21 14:32:21 +00:00
mediatek net: ethernet: mtk_eth_soc: fix error checking in mtk_mac_config() 2022-01-15 22:33:17 +00:00
mellanox net/mlx5e: Avoid field-overflowing memcpy() 2022-02-01 20:59:43 -08:00
micrel Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-12-23 16:09:58 -08:00
microchip net: sparx5: do not refer to skb after passing it on 2022-02-02 09:07:22 -08:00
microsoft Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2021-12-31 14:35:40 +00:00
moxa
mscc net: mscc: ocelot: fix using match before it is set 2022-01-19 14:34:43 +00:00
myricom myri10ge: Simplify DMA setting 2022-01-09 16:52:18 -08:00
natsemi Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-12-02 11:44:56 -08:00
neterion net: vxge: Use dma_set_mask_and_coherent() and simplify code 2022-01-03 10:42:58 +00:00
netronome Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2021-12-31 14:35:40 +00:00
ni nixge: fix mac address error handling again 2021-11-22 15:05:48 +00:00
nvidia ethtool: extend ringparam setting/getting API with rx_buf_len 2021-11-22 12:31:49 +00:00
nxp
oki-semi net_tstamp: add new flag HWTSTAMP_FLAG_BONDED_PHC_INDEX 2021-12-14 12:28:24 +00:00
packetengines
pasemi ethtool: extend ringparam setting/getting API with rx_buf_len 2021-11-22 12:31:49 +00:00
pensando Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-12-30 12:12:12 -08:00
qlogic net/qla3xxx: Remove useless DMA-32 fallback configuration 2022-01-09 16:52:21 -08:00
qualcomm ethtool: extend ringparam setting/getting API with rx_buf_len 2021-11-22 12:31:49 +00:00
rdc
realtek Power management updates for 5.17-rc1 2022-01-10 20:34:00 -08:00
renesas net_tstamp: add new flag HWTSTAMP_FLAG_BONDED_PHC_INDEX 2021-12-14 12:28:24 +00:00
rocker Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-01-09 17:00:17 -08:00
samsung
seeq ethernet: seeq/ether3: don't write directly to netdev->dev_addr 2022-01-26 15:40:01 +00:00
sfc sfc: Use swap() instead of open coding it 2022-01-06 12:39:36 +00:00
sgi
silan
sis
smsc ethernet: smc911x: fix indentation in get/set EEPROM 2022-02-01 19:59:03 -08:00
socionext Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2021-12-31 14:35:40 +00:00
stmicro net: stmmac: ensure PTP time register reads are consistent 2022-02-03 13:54:19 -08:00
sun sun/cassini: Use dma_set_mask_and_coherent() and simplify code 2022-01-02 16:14:30 +00:00
synopsys
tehuti tehuti: Use dma_set_mask_and_coherent() and simplify code 2022-01-02 12:21:16 +00:00
ti net: cpsw: Properly initialise struct page_pool_params 2022-01-25 11:06:33 +00:00
toshiba net: spider_net: Use non-atomic bitmap API when applicable 2021-12-01 18:45:46 -08:00
tundra ethernet: tundra: don't write directly to netdev->dev_addr 2022-01-26 15:40:01 +00:00
vertexcom Revert "net: vertexcom: default to disabled on kbuild" 2022-01-10 21:11:07 -08:00
via
wiznet
xilinx net: axienet: increase default TX ring size to 128 2022-01-19 11:29:14 +00:00
xircom
xscale net_tstamp: add new flag HWTSTAMP_FLAG_BONDED_PHC_INDEX 2021-12-14 12:28:24 +00:00
Kconfig net: vertexcom: Add MSE102x SPI support 2021-12-13 14:15:41 +00:00
Makefile net: vertexcom: Add MSE102x SPI support 2021-12-13 14:15:41 +00:00
dnet.c
dnet.h
ec_bhf.c
ethoc.c net: ethoc: Use platform_get_irq() to get the interrupt 2021-12-27 12:22:19 +00:00
fealnx.c
jme.c
jme.h
korina.c
lantiq_etop.c net: lantiq_etop: remove unnecessary space in cast 2021-12-30 13:20:23 +00:00
lantiq_xrx200.c net: lantiq_xrx200: convert to build_skb 2022-01-05 17:18:04 -08:00