Netdev List
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Daniel Machon <daniel.machon@microchip.com>,
	Horatiu Vultur <horatiu.vultur@microchip.com>,
	UNGLinuxDriver@microchip.com, Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	Richard Cochran <richardcochran@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net] net: lan966x: fix disabling timestamping without PTP traps
Date: Fri, 27 Nov 2026 10:11:33 +0100	[thread overview]
Message-ID: <16d457c9-ff01-4ecb-9b50-1daa2be6a255@redhat.com> (raw)
In-Reply-To: <20261123-lan966x-ptp-del-trap-v1-1-3f46ca6072b2@microchip.com>

On 11/23/26 15:53, Daniel Machon wrote:
> lan966x_ptp_del_trap() looks up a PTP trap rule with vcap_get_rule() and
> removes the port from it, or deletes the rule when no other port needs
> it. The traps are removed whenever timestamping is configured with
> HWTSTAMP_FILTER_NONE.
> 
> Before this patch, every vcap_get_rule() error is returned as -EEXIST,
> including the -ENOENT for a trap rule that does not exist, so disabling
> timestamping on a port that has no traps installed fails. This breaks
> moving the hardware timestamp provider of a port from its PHY to the
> MAC.
> 
> Return 0 for -ENOENT, as there is nothing to remove. Pass any other
> error from vcap_get_rule() on, as the rule may still be installed with
> this port in its ingress port mask.
> 
> Triggered during test development, without kernel modifications, on a
> lan9668 board whose LAN8814 PHYs are the default timestamp provider:
> "ethtool --set-hwtimestamp-cfg <port> index <switch PHC> qualifier
> precise" failed with "File exists". With the fix the same command moves
> the provider to the MAC.
> 
> Fixes: 72df3489fb10 ("net: lan966x: Add ptp trap rules")
> Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
IMHO this is borderline for net at this point of the cycle. Any strong
objection to move this one to net-next?

Thanks,

Paolo


      reply	other threads:[~2026-11-27  9:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23 14:53 [PATCH net] net: lan966x: fix disabling timestamping without PTP traps Daniel Machon
2026-11-27  9:11 ` Paolo Abeni [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=16d457c9-ff01-4ecb-9b50-1daa2be6a255@redhat.com \
    --to=pabeni@redhat.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=daniel.machon@microchip.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=horatiu.vultur@microchip.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.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