From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Yannick Vignon <yannick.vignon@oss.nxp.com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Jose Abreu <joabreu@synopsys.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Rayagond Kokatanur <rayagond@vayavyalabs.com>,
netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, sebastien.laveze@oss.nxp.com,
Vladimir Oltean <olteanv@gmail.com>,
Xiaoliang Yang <xiaoliang.yang_1@nxp.com>,
mingkai.hu@nxp.com, Joakim Zhang <qiangqing.zhang@nxp.com>,
Yannick Vignon <yannick.vignon@nxp.com>
Subject: Re: [PATCH net] net: stmmac: ensure PTP time register reads are consistent
Date: Thu, 3 Feb 2022 16:28:13 +0000 [thread overview]
Message-ID: <YfwCnV2TV8fznZ33@shell.armlinux.org.uk> (raw)
In-Reply-To: <20220203160025.750632-1-yannick.vignon@oss.nxp.com>
On Thu, Feb 03, 2022 at 05:00:25PM +0100, Yannick Vignon wrote:
> From: Yannick Vignon <yannick.vignon@nxp.com>
>
> 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.
Have you checked whether the hardware protects against this (i.o.w. the
hardware latches the PTP_STSR value when PTP_STNSR is read, or vice
versa? Several PTP devices I've looked at do this to allow consistent
reading.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-02-03 16:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-03 16:00 [PATCH net] net: stmmac: ensure PTP time register reads are consistent Yannick Vignon
2022-02-03 16:28 ` Russell King (Oracle) [this message]
2022-02-03 16:38 ` Yannick Vignon
2022-02-03 16:44 ` Russell King (Oracle)
2022-02-03 22:10 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YfwCnV2TV8fznZ33@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=alexandre.torgue@foss.st.com \
--cc=davem@davemloft.net \
--cc=joabreu@synopsys.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=mingkai.hu@nxp.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=peppe.cavallaro@st.com \
--cc=qiangqing.zhang@nxp.com \
--cc=rayagond@vayavyalabs.com \
--cc=sebastien.laveze@oss.nxp.com \
--cc=xiaoliang.yang_1@nxp.com \
--cc=yannick.vignon@nxp.com \
--cc=yannick.vignon@oss.nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).