Netdev List
 help / color / mirror / Atom feed
From: Rahul Rameshbabu <rrameshbabu@nvidia.com>
To: Maxime Chevallier <maxime.chevallier@bootlin.com>
Cc: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.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>,
	 Gal Pressman <gal@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: Sat, 12 Sep 2026 17:35:03 -0700	[thread overview]
Message-ID: <87v78avvig.fsf@nvidia.com> (raw)
In-Reply-To: <6ef48513-6302-44a1-833d-613f2b8a9e21@bootlin.com> (Maxime Chevallier's message of "Sat, 12 Sep 2026 23:39:02 +0200")

On Sat, 12 Sep, 2026 23:39:02 +0200 Maxime Chevallier <maxime.chevallier@bootlin.com> wrote:
> Hi Lorenzo,
>
> On 9/12/26 23: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>
>
> Ah nice, I've briefly saw that just yesterday but haven't started digging,
> thanks for fixing this :)
>
> Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>

Thanks for the change. Good catch.

Reviewed-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>

>
> Maxime

      reply	other threads:[~2026-09-13  0:35 UTC|newest]

Thread overview: 3+ 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 [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=87v78avvig.fsf@nvidia.com \
    --to=rrameshbabu@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=gal@nvidia.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 \
    /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