Article View: linux.kernel.netdev
Article #26059Re: [PATCH net-next v17 10/13] dpll: sit9531x: implement output pin state on a DPLL
From: netdev-bot+sashiko
Date: Thu, 03 Dec 2026 00:39
Date: Thu, 03 Dec 2026 00:39
205 lines
15635 bytes
15635 bytes
Thank you for your contribution! Sashiko AI review found 3 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 2 · Low: 1
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] The output mute state is decided without looking at which CMOS
pads ODRn_MISC0 actually enables.
- [Medium] sit9531x_resume() keeps or re-takes an output's pre-mute Hi-Z
record based on the cached out->enabled (`if (rc || (!enabled &&…
- [Low] sit9531x_dpll_output_pin_state_on_dpll_set() returns a bare
-EINVAL for any state other than CONNECTED or DISCONNECTED, with no…
--
dpll: sit9531x: implement output pin state on a DPLL
This patch adds state_on_dpll_get/set for sit9531x output pins and starts
registering output pins. An output is muted by forcing its slot's Hi-Z
pairs. The configuration's Hi-Z overrides are recorded at probe and put
back on unmute. The patch also folds the Page 3 debug key open/close into
common helpers that the poll and removal paths retry.
> diff --git a/drivers/dpll/sit9531x/core.c b/drivers/dpll/sit9531x/core.c
> index bce58b3371130..3316e3761e16d 100644
> --- a/drivers/dpll/sit9531x/core.c
> +++ b/drivers/dpll/sit9531x/core.c
[ ... ]
> @@ -439,14 +440,16 @@ static int sit9531x_hiz_pair_forced(struct sit9531x_dev *sitdev,
> static int sit9531x_output_forced_hiz(struct sit9531x_dev *sitdev,
> u8 out_idx, bool *muted, bool *part)
> {
> + const struct sit9531x_out *out = &sitdev->out[out_idx];
> struct sit9531x_hiz_pair p[SIT9531X_HIZ_PAIRS];
> bool pad_p, pad_n;
> + u8 keep;
> int rc;
[ ... ]
> @@ -457,44 +460,91 @@ static int sit9531x_output_forced_hiz(struct sit9531x_dev *sitdev,
> if (rc)
> return rc;
>
> + /* A pad the loaded configuration forces is not a part mute */
> + keep = out->hiz_mask & ~out->hiz_state;
> *muted = pad_p && pad_n;
> - *part = pad_p != pad_n;
> + *part = pad_p != pad_n &&
> + !(keep & BIT(pad_p ? SIT9531X_HIZ_CMOS_P :
> + SIT9531X_HIZ_CMOS_N));
[Severity: Medium]
Can a CMOS output that uses only one pad be reported CONNECTED while that
pad is tri-stated?
sit9531x_output_mode_fetch() merges the two pad enables into one bool:
sitdev->out[out_idx].cmos = !!(val & (SIT9531X_OUT_CMOS_ENP |
SIT9531X_OUT_CMOS_ENN));
regs.h documents a single-pad CMOS mode ("Either set: single-ended (one
pad, or both as CMOS)"). Here, muted needs both pads forced. So an output
with ENP=1 and ENN=0 whose OutP pair is forced (MASK=1, STATE=0) gets
muted=false.
sit9531x_out_state_fetch() then sees the output as not muted and records
the OutP MASK bit in hiz_mask as a configuration force. keep then covers
OutP, so part is false too.
As a result, a CONNECTED request takes the early return in
sit9531x_dpll_output_pin_state_on_dpll_set():
if (!sit9531x_output_state_refresh(sitdev, dpin->id) &&
sitdev->out[dpin->id].enabled == enable &&
!sitdev->out[dpin->id].part_muted) {
A DISCONNECTED->CONNECTED cycle does not help either. On unmute,
sit9531x_output_hiz_write() writes the recorded force back onto OutP. Is
there any way to make such an output drive through the DPLL API?
An external tool that tri-states only the used pad can leave the output in
this state. So can this driver's own mute: if the CMOS_N write fails, the
undo of CMOS_P also fails ("Hi-Z override left part applied"), and the
driver is then rebound.
Could ENP and ENN be tracked separately, so that muted is decided from the
pads that are actually enabled?
sit9531x_output_mode_fetch() and sit9531x_output_forced_hiz() look the same
at the end of the series, in "dpll: sit9531x: model the inter-PLL sync line
as a pair of pins".
[ ... ]
> @@ -3771,17 +3991,26 @@ static int sit9531x_resume(struct device *dev)
> sit9531x_ref_pll_mask_rebuild(sitdev);
> for (i = 0; i < sitdev->info->num_outputs; i++) {
> struct sit9531x_out *out = &sitdev->out[i];
> + u8 hiz_mask = out->hiz_mask, hiz_state = out->hiz_state;
> + bool enabled = out->enabled;
> bool routed = out->routed;
> u8 pll_idx = out->pll_idx;
>
> rc = sit9531x_out_state_fetch(sitdev, i);
> - if (rc)
> + /* A muted output keeps the Hi-Z record taken before the mute */
> + if (rc || (!enabled && !out->enabled)) {
> + out->hiz_mask = hiz_mask;
> + out->hiz_state = hiz_state;
> + }
[Severity: Medium]
Should this condition also check out->state_stale? enabled is the value
cached before suspend, and it can be stale.
sit9531x_output_disable() can write the Hi-Z pairs and then fail the
readback. In that case it only sets state_stale, and enabled stays true:
} else {
sitdev->out[index].state_stale = true;
The error path's __dpll_pin_change_ntf() can fail as well, or the poll may
not have refreshed the cache yet. sit9531x_suspend() then cancels the poll
with kthread_cancel_delayed_work_sync(), so the cache is still stale at
suspend.
On resume, enabled is the stale true, so this condition is false.
sit9531x_out_state_fetch() has already cleared hiz_mask and hiz_state. It
finds the output muted and skips the MASK bit of every pair with STATE
clear:
if (state_val & BIT(p[i].bit))
out->hiz_state |= BIT(i);
else if (muted)
continue;
That drops the pre-mute record, including the bit for a pad the
configuration forced, such as one OutN pad of a two-pad CMOS output. Would
the next unmute through sit9531x_output_hiz_write() then release and drive
that pad?
If __dpll_pin_change_ntf() succeeds, the state_on_dpll_get callback
refreshes the stale state while the message is built. So the window is
limited to the failed or not yet retried notification path.
The final version of sit9531x_resume() in the series seems to keep this. It
computes outs_unread from state_stale but still uses
"!(outs_was & BIT(i)) && !out->enabled" as the restore condition.
[ ... ]
> diff --git a/drivers/dpll/sit9531x/dpll.c b/drivers/dpll/sit9531x/dpll.c
> index 25bee483bb5a7..b0403c0bc1320 100644
> --- a/drivers/dpll/sit9531x/dpll.c
> +++ b/drivers/dpll/sit9531x/dpll.c
[ ... ]
> @@ -676,8 +679,112 @@ sit9531x_dpll_output_pin_frequency_set(const struct dpll_pin *pin,
[ ... ]
> +static int
> +sit9531x_dpll_output_pin_state_on_dpll_set(const struct dpll_pin *pin,
> + void *pin_priv,
> + const struct dpll_device *dpll,
> + void *dpll_priv,
> + enum dpll_pin_state state,
> + struct netlink_ext_ack *extack)
> +{
[ ... ]
> + /* An output is routed explicitly, not a selection candidate */
> + if (!enable && state != DPLL_PIN_STATE_DISCONNECTED)
> + return -EINVAL;
[Severity: Low]
This isn't a functional problem, but could this refusal set an extack
message? The DPLL netlink policy passes SELECTABLE through to the driver,
and userspace gets a bare -EINVAL here.
The INTSYNC source pin callback, added later in the series in "dpll:
sit9531x: model the inter-PLL sync line as a pair of pins", explains the
same refusal:
NL_SET_ERR_MSG(extack,
"A PLL drives INTSYNC or not; use connected or disconnected");
The input pins also explain why they refuse CONNECTED ("Device selects its
reference by priority; use selectable").
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261201235202.97645-1-arouhi%40sitime.com
Technical Details
Message-ID:
<179625835133.3146.1308915527518454647@kernel.org>Path:
mbox-mo1.pugleaf.net!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376163-linux-kernel-netdev=dewy.ruReferences:
<20261201235202.97645-11-arouhi@sitime.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376163-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v17 10/13] dpll: sit9531x: implement output pin state on a DPLL Date: Thu, 03 Dec 2026 00:39:11 +0000 Organization: Usenet Network Message-ID: <179625835133.3146.1308915527518454647@kernel.org> References: <20261201235202.97645-11-arouhi@sitime.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2097454"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:OuDyTglNNPCYgOC72Cc1PyUNeG4= sha256:JCLdWBvqLxcnHvuvt7aw5tiTzBDT3DQvzToFKq3Mrlo= sha1:GR/rxzC7VhbVaWChQopb0C0A8WY= sha256:Vfj+oF4edpIC11E2YddKgZO2zZK3BzwZkFAxzrtnjH4= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 3E5F41177B9; Thu, 3 Dec 2026 03:39:31 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.501 X-Spam-Status: No, score=-3.501 tagged_above=-9999 required=6.31 tests=[DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2X69iLbqDmF4; Thu, 3 Dec 2026 03:39:27 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-376163-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74]) by mail.dewy.ru (Postfix) with ESMTPS id C067F1177BA; Thu, 3 Dec 2026 03:39:19 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sto.lore.kernel.org (Postfix) with ESMTP id 89CD4601DE2; Thu, 3 Dec 2026 00:39:18 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796258354; b=V0GsSWIjblcu3ZQHoATdiOhJPeCwQTqjIMMDaiBKS47uyRiSm3mHAllOtAl1dgwZFIM4 QLXhihurxgfs0L6dLsfe4/73jekZ46tpYaktlufoUhdLPfHtMU3PldDPY859HFwSpKB+V ChLYEnn+8hIHOzTnhKysjO+4fM3/DSKeoQz5vwUysgABNHe8irsG5KwWwVyk804tm0PBO IhSPC1dvsJzTaXuURzB8HoTH7vpWQYoIFAfp0/tPB47NnOIJUG8FxUN30iPySk0aXj9dH QmFMO9teqn+SEuQ9FSLs/JfiEoua+3Jsxb9fFxw9riaQxgzNOxC1uAq1eNF8Y+QAXsQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796258354; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=Do/SnznItmfmEDLACJoEm9dY4fPmTP+L3LkFqsglhZQ=; b=38mUyd99NY1UTIMk4mP5lY7JqGnhjAbI2Ltzfj46QjY5uIH40j0v+W3KRTwsHzu5Dw2g axKVd1m+iNMJte9XrK+scKRdYi7+LoWtkYjpRgmJdabnZgbaa9JpOvGayhluFzOau11Fr otE4IsRpYufrQfOmzhXYtLE0LpirhGYgIYrR4EV43c7430FJI0IYzjxsxjmp4eNfdjZF6 ifvmBTNGzjy4BKeqkdXbRqzcTQLms+SzklcE6MJIYjWM4vfoHR/we3admLv5jqM1ad2ib jUEEShLFKo3g6ImG+xRKgl/kia6BRipwNjL/hERSIHtKJYbbGW/mM9b2fBdMfvH0gzA== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=cwluuReI; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DE2F460A2604; Thu, 3 Dec 2026 00:39:13 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=cwluuReI X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796258353; b=N6oc4ZAR0cvX+FESG5HSDffKUrOPiA2Lq+IylzyQBcMIkeYDK9hgiS9AUOYiKJUCXj9v uB8UKSdJvAq0/uoB6xnu8bxzCl9x/MFpEd4AU3SqvJOV/W0QMCFtzx//upEiYhXzDGPRe ME4wVO8icjj9PB2fgBDTUJYCIH4Hgl1Xia48UO3oeJ7g8AfVtUwI9xnAutlMW5KdVDg7S BWW/bswOVvz5VJAxOlvMfQQgRVnuceTRnhQpY59p/f0Jd/U2iZqidLOP9qMgqOyNy05GS Lzv+9kMvhqd7iIiGtqrZY/Fl93ghUuUwgQBndir2Gk3KJ5jtoMmzv3zFrrK1S3Qi3yA== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796258353; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=Do/SnznItmfmEDLACJoEm9dY4fPmTP+L3LkFqsglhZQ=; b=YCI2wm4RCT/A0cErFY6zGc1PNhRYGPAK/CzWDBs9W6kOGRNe4GZDwQwB/kJpHYEMmkA0 oyn3pjXM+j0NT/gp/FiMqNVYfIWupAWkkUl2EACuX1gN+8F2n4CAz5qiQiKZtorP7qAXv /rAUpz66eZlxdp5ifJZQ3okj12HOYPEGsNuzZ+T6I0roRsYsVm5GfATPQE1OQlVi40sB2 HU1SdA0G4ew5D8AXSoHVpqJWni2gGHOC6+jP/OL7af/HxPl6B4+6KmKeFjcGD2X0NtyqA ySSF8zIxsZgn87/qZVUzdXrxKS3H6Hbfp1mdgr0SYgdV0Wl6yLah5l9k8vVHL7I+jqw== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=cwluuReI; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 09C6A606A687; Thu, 3 Dec 2026 00:39:12 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id C73EE1F00937; Thu, 3 Dec 2026 00:39:11 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796258352; bh=Do/SnznItmfmEDLACJoEm9dY4fPmTP+L3LkFqsglhZQ=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=cwluuReIvhSR9C5LSCLMzmhSPuxHfNnGgujLRiofqlUuw33y8m5rAUmCp4f+xB66P fOfjq/eSBDDb3OMv8oEeE/VxPedUr7Tp0MjW6qev9ikqc8mhsAmQH9ZkQ6LheSiZol WiZibp6tXuwpBOZOJxUfYAHNOhgwDEiaXzsQi4K1sXHG+Rgnyolze7so/LDNRdbIpz a5iNMwItlBw+puaGNrAd55IBTRtsFAPL92HX5cB4u3QwTPjc2elU0By/RD3b/puR9R n99k5M2B/9xG0766Hw6G3wzq8FMueW4CY3NhGMmZFgokHYq57mk77Ejli1f/+aEg14 jwhGcYkcY1c7w== X-Cc: jiri@resnulli.us, ivecera@redhat.com, vadim.fedorenko@linux.dev, arkadiusz.kubalewski@intel.com, kuba@kernel.org, pabeni@redhat.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, prabhakar.mahadev-lad.rj@bp.renesas.com, cjubran@nvidia.com, Oleg.Zadorozhnyi@devoxsoftware.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org X-In-Reply-To: <20261201235202.97645-11-arouhi@sitime.com> X-sashiko-severity: Medium X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list