From: Gal Pressman <gal@nvidia.com>
To: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>,
Maxime Chevallier <maxime.chevallier@bootlin.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Rahul Rameshbabu <rrameshbabu@nvidia.com>,
Carolina Jubran <cjubran@nvidia.com>
Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH net v2] net: stmmac: do not overwrite phc_index when no PTP clock is registered
Date: Mon, 14 Sep 2026 10:52:27 +0300 [thread overview]
Message-ID: <f174540f-683e-4f76-9eca-8016166d30c8@nvidia.com> (raw)
In-Reply-To: <20260914-stmmac-fix-phc_index-v2-1-bf3d90373fe4@oss.qualcomm.com>
On 14/09/2026 10:41, Lorenzo Bianconi wrote:
> stmmac_get_ts_info() reports phc_index as 0 when hardware timestamping
> is supported but no PTP clock has been registered yet (e.g. while the
> interface is down). Zero is a valid PHC index and would make userspace
> resolve the wrong clock; the absence of a clock should be reported as
> -1.
>
> The ethtool core already initializes phc_index to -1 before invoking
> the get_ts_info callback (ethtool_init_tsinfo()), so just drop the
> erroneous assignment.
>
> Fixes: 9364fa7fcf12 ("net: stmmac: Remove setting of RX software timestamp")
> Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
> Reviewed-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>
> ---
> Changes in v2:
> - Drop phc_index assignment to -1
> - Link to v1: https://lore.kernel.org/r/20260912-stmmac-fix-phc_index-v1-1-26e1ead25324@oss.qualcomm.com
Thanks Lorenzo!
Reviewed-by: Gal Pressman <gal@nvidia.com>
next prev parent reply other threads:[~2026-09-14 7:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-14 7:41 [PATCH net v2] net: stmmac: do not overwrite phc_index when no PTP clock is registered Lorenzo Bianconi
2026-09-14 7:52 ` Gal Pressman [this message]
2026-09-16 1:40 ` 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=f174540f-683e-4f76-9eca-8016166d30c8@nvidia.com \
--to=gal@nvidia.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=cjubran@nvidia.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=lorenzo.bianconi@oss.qualcomm.com \
--cc=maxime.chevallier@bootlin.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rrameshbabu@nvidia.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