Netdev List
 help / color / mirror / Atom feed
From: Ahmad Byagowi <ahmadexp@gmail.com>
To: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Cc: netdev@vger.kernel.org, andrew+netdev@lunn.ch,
	arkadiusz.kubalewski@intel.com, davem@davemloft.net,
	edumazet@kernel.org, jiri@resnulli.us, kuba@kernel.org,
	pabeni@redhat.com, richardcochran@gmail.com,
	rmk+kernel@armlinux.org.uk, vladimir.oltean@nxp.com
Subject: Re: [PATCH net v3 1/4] ptp: disable all timestamp channels after removing the user interfaces
Date: Sun, 22 Nov 2026 17:57:52 -0800	[thread overview]
Message-ID: <20261122-timecard-common-v4-e0db4ab1aa-r1-ahmadexp@gmail.com> (raw)
In-Reply-To: <08537eb6-3f85-4a46-b3be-46796998eda4@linux.dev>

On Sun, 22 Nov 2026 at 20:10:55 +0000, Vadim Fedorenko wrote:
> > +	/* EXTTS requests do not require a pin assignment. */
> > +	for (i = 0; i < info->n_ext_ts; i++)
> > +		ptp_disable_pinfunc(info, PTP_PF_EXTTS, i);
> I thought we have agreed that time stampers and pins are different beasties.
> Still you provide time stamper index to pin function...

You're right. We agreed to keep timestamp channels separate from pin
configuration, and v3 still blurred that distinction by using the pin
helper. Sorry for not carrying that through consistently.

In the v4 revision, the loop issues a timestamp-channel disable
request directly:

	for (i = 0; i < info->n_ext_ts; i++) {
		struct ptp_clock_request req = {
			.type = PTP_CLK_REQ_EXTTS,
			.extts.index = i,
		};

		info->enable(info, &req, 0);
	}

ptp_disable_pinfunc() is unchanged and stays in the pin-configuration
path. Teardown neither reads nor changes pin assignments. It disables
every advertised timestamp channel, including unassigned channels and
clocks with no pins, then disables the PPS subscription. It retains the
existing core ordering after the user interfaces have been removed and
active operations drained, with no new driver stopping flag or lock.
The shared-PPS final disable still masks, flushes and drains the IRQ.

I reran the source-derived removal/shared-PPS suite 100 times, covering
six channels, zero/unassigned pins, absent channels, late and in-flight
requests, both subscription orders and active IRQ draining. The five
core registration/unregistration KUnit cases also pass in QEMU with
KASAN and lockdep. These are software tests, not a new physical-card run.

Thank you for insisting on the distinction. The revised code now makes
it explicit rather than relying on a pin-named helper for channel work.

The five-patch v4 series is posted separately to net:
https://lore.kernel.org/r/20261122-timecard-common-v4-e0db4ab1aa-0-ahmadexp@gmail.com

Ahmad

  reply	other threads:[~2026-11-23  1:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-20 21:21 [PATCH net v3 0/4] ptp: fix timestamp teardown and OCP DPLL routing Ahmad Byagowi
2026-11-20 21:21 ` [PATCH net v3 1/4] ptp: disable all timestamp channels after removing the user interfaces Ahmad Byagowi
2026-11-22 20:10   ` Vadim Fedorenko
2026-11-23  1:57     ` Ahmad Byagowi [this message]
2026-11-24 22:10   ` netdev-bot+sashiko
2026-11-20 21:21 ` [PATCH net v3 2/4] ptp: ocp: use hardware selectors in DPLL frequency operations Ahmad Byagowi
2026-11-24 22:10   ` netdev-bot+sashiko
2026-11-20 21:21 ` [PATCH net v3 3/4] ptp: ocp: report disabled SMA inputs consistently over DPLL Ahmad Byagowi
2026-11-24 22:10   ` netdev-bot+sashiko
2026-11-20 21:21 ` [PATCH net v3 4/4] ptp: ocp: correct the DCF output frequency Ahmad Byagowi

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=20261122-timecard-common-v4-e0db4ab1aa-r1-ahmadexp@gmail.com \
    --to=ahmadexp@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=arkadiusz.kubalewski@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=vadim.fedorenko@linux.dev \
    --cc=vladimir.oltean@nxp.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