mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ahmad Byagowi <ahmadexp@gmail.com>
To: netdev-bot+sashiko@kernel.org
Cc: netdev@vger.kernel.org, vadim.fedorenko@linux.dev,
	richardcochran@gmail.com, andrew+netdev@lunn.ch,
	arkadiusz.kubalewski@intel.com, davem@davemloft.net,
	edumazet@kernel.org, jiri@resnulli.us, kuba@kernel.org,
	linux-kernel@vger.kernel.org, pabeni@redhat.com
Subject: Re: [PATCH net 3/4] ptp: ocp: report disabled SMA inputs consistently over DPLL
Date: Sun, 22 Nov 2026 17:57:59 -0800	[thread overview]
Message-ID: <20261122-timecard-common-v4-e0db4ab1aa-r3-ahmadexp@gmail.com> (raw)
In-Reply-To: <179538006912.3135.16971430532149423594@kernel.org>

On Sun, 22 Nov 2026 at 20:41:09 +0000, netdev-bot+sashiko@kernel.org wrote:
> Can this check give the wrong answer after the driver is unbound and
> rebound, or after a module reload? sma->disabled exists only in software,
> and ptp_ocp_sma_store_val() is the only code that sets it. The FPGA keeps
> the mux values that the previous driver instance wrote.
>
> ptp_ocp_sma_fb_init() reads the mux registers only to work out the
> direction. It never sets sma->disabled:

Yes. I reproduced the stale software state using retained mux values and
a fresh driver instance. The v4 patch initializes disabled state
from the enable bits for direction-configurable FB-style connectors.
The existing direction selection picks an enabled side if either side
is enabled. If that selected side is also disabled, both buffers are
off, and the connector is represented as IN: None. The hardware does not
retain the previous direction in that disconnected state.

Initialization does not write the mux. Fixed-direction firmware, which
does not provide these enable bits, keeps its existing interpretation.
The ART initialization path is also unchanged.

> Would it help to set sma->disabled in ptp_ocp_sma_fb_init() from the
> enable bits, or to test SMA_ENABLE before masking?
>
> All of this assumes the FPGA treats mux 0 without SMA_ENABLE as disabled
> rather than as the 10 MHz selection, which I could not confirm.

The public SMA-selector RTL assigns bit 15 to the input/output enable
signals. The production top level uses those signals to control the
external input/output buffer enables. Thus a zero selector without its
enable bit does not enable the external 10 MHz input buffer.

Pinned sources:
https://github.com/Time-Appliances-Project/Time-Card/blob/1042bd6f9ddb1844c8b471efbf560c96c8e6cecc/FPGA/Open-Source/Ips/SmaSelector/SmaSelector.vhd#L293-L301
https://github.com/Time-Appliances-Project/Time-Card/blob/1042bd6f9ddb1844c8b471efbf560c96c8e6cecc/FPGA/Open-Source/Implementation/Xilinx/TimeCard_Production/Top/TimeCardTop.vhd#L473-L481

The software tests cover 243 configurations across FB/ADVA/ADVA X1 and
all four connectors, including enabled inputs, outputs and disconnected
states. They assert zero initialization writes and unchanged mux data,
then exercise re-enabling through the actual DPLL core get-before-set
function. The previous implementation fails the rebind assertion. This
is source/RTL validation, not a physical-card rebind test.

> This patch fixes that as well, because SMA_DISABLE matches the x1 "None"
> entry. Should the changelog mention this case for stable backporters?

Yes. The changelog now explains that ADVA X1 has no zero selector, so
the original disabled-input failure also blocked DPLL reads and later
frequency changes, rather than merely reporting a false 10 MHz.

> Could the paragraph be cut down to the testing that applies to this
> patch? Someone backporting only this commit could otherwise think it
> covers those other defects too.

Agreed. I removed the repeated cross-patch testing claims, kept the
commit explanation specific to disabled inputs, and placed this patch's
test details below the separator. Since initialization behavior changed,
I have not carried forward the earlier Reviewed-by for this patch.

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:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18 20:05 [PATCH net 0/4] ptp: ocp: fix timestamp teardown and DPLL routing Ahmad Byagowi
2026-11-18 20:05 ` [PATCH net 1/4] ptp: ocp: prevent timestamp rearming during detach Ahmad Byagowi
2026-11-19 18:24   ` Vadim Fedorenko
2026-11-19 21:19     ` Ahmad Byagowi
2026-11-22 20:41   ` netdev-bot+sashiko
2026-11-23  1:58     ` Ahmad Byagowi
2026-11-18 20:05 ` [PATCH net 2/4] ptp: ocp: use hardware selectors in DPLL frequency operations Ahmad Byagowi
2026-11-22 20:41   ` netdev-bot+sashiko
2026-11-23  1:57     ` Ahmad Byagowi
2026-11-18 20:05 ` [PATCH net 3/4] ptp: ocp: report disabled SMA inputs consistently over DPLL Ahmad Byagowi
2026-11-22 20:41   ` netdev-bot+sashiko
2026-11-23  1:57     ` Ahmad Byagowi [this message]
2026-11-18 20:05 ` [PATCH net 4/4] ptp: ocp: correct the DCF output frequency Ahmad Byagowi
2026-11-22 20:41   ` netdev-bot+sashiko
2026-11-23  1:58     ` 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-r3-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=linux-kernel@vger.kernel.org \
    --cc=netdev-bot+sashiko@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=vadim.fedorenko@linux.dev \
    /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

all inboxes | Powered by JetHome®