From: Vadim Fedorenko <vadim.fedorenko@linux.dev>
To: Runyu Xiao <runyu.xiao@seu.edu.cn>, nicolas.ferre@microchip.com
Cc: claudiu.beznea@microchip.com, richardcochran@gmail.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
jianhao.xu@seu.edu.cn, stable@vger.kernel.org
Subject: Re: [PATCH net] net: macb: initialize PTP lock before registering clock
Date: Mon, 31 Aug 2026 16:24:57 +0100 [thread overview]
Message-ID: <129e286f-8301-4ea7-bc12-a069df2f2ce3@linux.dev> (raw)
In-Reply-To: <20260830153520.2710520-1-runyu.xiao@seu.edu.cn>
On 30/08/2026 16:35, Runyu Xiao wrote:
> gem_ptp_init() registers the PTP clock before initializing
> bp->tsu_clk_lock. ptp_clock_register() publishes the PTP character
> device, so a userspace operation can enter a PTP callback as soon as
> registration completes. Those callbacks use tsu_clk_lock and can therefore
> observe the lock before it has been initialized.
>
> Initialize the lock before registering the PTP clock so all published
> callbacks see valid synchronization state.
>
> Fixes: ab91f0a9b5f4 ("net: macb: Add hardware PTP support")
> Cc: stable@vger.kernel.org
> Assisted-by: Codex:GPT-5
> Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>
> ---
> drivers/net/ethernet/cadence/macb_ptp.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
next prev parent reply other threads:[~2026-08-31 15:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-30 15:35 Runyu Xiao
2026-08-31 15:24 ` Vadim Fedorenko [this message]
2026-09-02 15:35 ` [net] " netdev-bot+sashiko
2026-09-04 3:04 ` [PATCH net v2] net: macb: initialize PTP state " Runyu Xiao
2026-09-04 16:29 ` Théo Lebrun
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=129e286f-8301-4ea7-bc12-a069df2f2ce3@linux.dev \
--to=vadim.fedorenko@linux.dev \
--cc=claudiu.beznea@microchip.com \
--cc=jianhao.xu@seu.edu.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nicolas.ferre@microchip.com \
--cc=richardcochran@gmail.com \
--cc=runyu.xiao@seu.edu.cn \
--cc=stable@vger.kernel.org \
/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
all inboxes | Powered by JetHome®