Re: [PATCH net-next v3 2/2] net: stmmac: dwmac-socfpga: mask XGMAC_TSIE during cross-timestamp
Andrew Lunn <[email protected]>
| Newsgroups | org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel,org.kernel.vger.netdev |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Aug 18, 2026 at 09:27:22PM +0800, Zxyan Zhu wrote: > The Agilex5 smtg_crosststamp() handler arms an internal auxiliary > snapshot, toggles GPO0 and then polls XGMAC_INT_STATUS for TSIS in > process context to learn that the snapshot is ready. > > Once XGMAC_TSIE is unmasked (done by a companion change that enables it > in XGMAC_INT_DEFAULT_EN), the DWXGMAC2 timestamp interrupt handler runs > from hardirq on every timestamp event and clears TSIS by reading > XGMAC_TIMESTAMP_STATUS. That read can win the race against the poll > loop, which then times out and makes PTP_SYS_OFFSET_PRECISE fail with > "Wait for time sync operation timeout". > > Mask XGMAC_TSIE around the snapshot trigger and FIFO read so the hardirq > handler cannot clear TSIS while smtg_crosststamp() owns it, and restore > it on every return path. Did you look at the other system which implement crosststamp? dwmac-intel.c? Does it need similar changes? Andrew