From: Ivan Vecera <ivecera@redhat.com>
To: netdev@vger.kernel.org
Cc: Petr Oros <poros@redhat.com>,
Chris du Quesnay <Chris.duQuesnay@microchip.com>,
Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>,
Jakub Kicinski <kuba@kernel.org>, Jiri Pirko <jiri@resnulli.us>,
Min Li <min.li@microchip.com>, Paolo Abeni <pabeni@redhat.com>,
Richard Cochran <richardcochran@gmail.com>,
Vadim Fedorenko <vadim.fedorenko@linux.dev>,
linux-kernel@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
linux-doc@vger.kernel.org
Subject: Re: [PATCH net-next v6 2/3] dpll: zl3073x: add channel ToD, phase step and TIE operations
Date: Tue, 11 Aug 2026 14:21:40 +0200 [thread overview]
Message-ID: <4713be61-9c2d-4799-a88a-db8e3eb33021@redhat.com> (raw)
In-Reply-To: <20260809182340.1081610-3-ivecera@redhat.com>
Sashiko findings with replies:
> Should the kernel-doc match what the function actually does here?
> [case 0 returns without testing SEM]
Will restructure tod_ready_wait to check the SEM bit first. If SEM
is clear, no operation is pending and we can return 0 immediately
regardless of the CMD field value. This also handles the unknown-CMD
case from a prior boot stage gracefully — if the semaphore is clear,
whatever CMD bits remain are stale and irrelevant.
> The documented return list [...] does not mention -EOPNOTSUPP.
Will update the return documentation.
> Can this loop exhaust its 20 retries on healthy hardware and return
> -EBUSY?
Testing shows that a single iteration of the loop body (two ToD
reads) takes approximately 17-19 ms. With 20 retries that gives a
budget of 340-380 ms, which is more than enough to outlast the 20 ms
margin window near a 1 Hz edge. After the edge crosses, the next
read returns ~980 ms of margin and the loop breaks immediately.
> How is the measured margin guaranteed to still hold when the
> WR_NEXT_1HZ command finally reaches the device? [...]
> Would a post-write confirmation [...] be worth adding?
The 20 ms threshold provides sufficient margin for the write
sequence (ready wait + three register writes + command). A post-write
confirmation would add complexity for a scenario that requires ~20 ms
of preemption under a mutex, which is unreachable in practice.
> The kernel-doc says delta_ns "must be within +-1s", which reads as an
> inclusive bound, while the guard accepts only the open interval
Will reword to clarify the exclusive bound.
> The ToD ready wait logic fails permanently if the hardware control
> register inherits an unknown command from a prior boot stage.
Addressed by the SEM-first restructuring described above. If SEM is
clear, the function returns 0 regardless of the CMD bits.
Thanks,
Ivan
next prev parent reply other threads:[~2026-08-11 12:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-09 18:23 [PATCH net-next v6 0/3] dpll: zl3073x: add PTP clock support Ivan Vecera
2026-08-09 18:23 ` [PATCH net-next v6 1/3] dpll: zl3073x: scale poll interval proportionally to timeout Ivan Vecera
2026-08-11 12:19 ` Ivan Vecera
2026-08-11 12:20 ` Ivan Vecera
2026-08-09 18:23 ` [PATCH net-next v6 2/3] dpll: zl3073x: add channel ToD, phase step and TIE operations Ivan Vecera
2026-08-11 12:21 ` Ivan Vecera [this message]
2026-08-11 12:22 ` Ivan Vecera
2026-08-09 18:23 ` [PATCH net-next v6 3/3] dpll: zl3073x: add PTP clock support Ivan Vecera
2026-08-11 12:25 ` Ivan Vecera
2026-08-11 12:26 ` Ivan Vecera
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=4713be61-9c2d-4799-a88a-db8e3eb33021@redhat.com \
--to=ivecera@redhat.com \
--cc=Chris.duQuesnay@microchip.com \
--cc=arkadiusz.kubalewski@intel.com \
--cc=corbet@lwn.net \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=min.li@microchip.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=poros@redhat.com \
--cc=richardcochran@gmail.com \
--cc=skhan@linuxfoundation.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.