From: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>
To: Gal Pressman <gal@nvidia.com>
Cc: 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>,
netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH net] net: stmmac: report phc_index as -1 when no PTP clock is registered
Date: Mon, 14 Sep 2026 09:11:00 +0200 [thread overview]
Message-ID: <aqeeBOjej4CYTVGZ@lore-desk> (raw)
In-Reply-To: <2eecb396-8b5b-4e82-bff5-c163a6c16bb3@nvidia.com>
[-- Attachment #1: Type: text/plain, Size: 948 bytes --]
On Sep 14, Gal Pressman wrote:
> On 13/09/2026 0:16, Lorenzo Bianconi wrote:
> > When hardware timestamping is supported but no PTP clock has been
> > registered yet (e.g. while the interface is down), stmmac_get_ts_info()
> > currently reports phc_index as 0. Zero is a valid PHC index and would
> > make userspace resolve the wrong clock; the absence of a clock should
> > be reported as -1, matching ethtool_init_tsinfo() and
> > ethtool_op_get_ts_info().
> >
> > Report -1 when no PTP clock is available.
> >
> > Fixes: 9364fa7fcf12 ("net: stmmac: Remove setting of RX software timestamp")
> > Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>
> In all other drivers I just removed the assignment, why not do the same
> here?
Ack, I agree. Since we run ethtool_init_tsinfo() before running the
get_ts_info() callback, we can drop phc_index initialization to -1.
I will fix it in v2.
Regards,
Lorenzo
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
prev parent reply other threads:[~2026-09-14 7:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-12 21:16 [PATCH net] net: stmmac: report phc_index as -1 when no PTP clock is registered Lorenzo Bianconi
2026-09-12 21:39 ` Maxime Chevallier
2026-09-13 0:35 ` Rahul Rameshbabu
2026-09-14 6:33 ` Gal Pressman
2026-09-14 7:11 ` Lorenzo Bianconi [this message]
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=aqeeBOjej4CYTVGZ@lore-desk \
--to=lorenzo.bianconi@oss.qualcomm.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=gal@nvidia.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.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