Article View: linux.kernel.netdev
Article #26065Re: [PATCH net-next v17 12/13] dpll: sit9531x: add support to get phase offset on the connected input
From: netdev-bot+sashiko
Date: Thu, 03 Dec 2026 00:39
Date: Thu, 03 Dec 2026 00:39
160 lines
13576 bytes
13576 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The kernel-doc for struct sit9531x_chan in
drivers/dpll/sit9531x/core.h has the two saved debug-tap fields…
- [Low] The commit message says the probe failure path "now runs the same
retries as removal", but only the DPLL-registration failure path…
--
dpll: sit9531x: add support to get phase offset on the connected input
This commit adds phase_offset_get to the sit9531x input pin ops. The
phase difference is read from the on-chip TDC through the PLL page debug
window, and the debug tap selection is saved and restored around each
sample. Tap restores that fail are retried by the poll, on removal and on
the probe failure path, which now shares sit9531x_dev_pending_retry() with
removal.
> diff --git a/drivers/dpll/sit9531x/core.c b/drivers/dpll/sit9531x/core.c
> index 96d317c9bf370..1f4ed3365ffe1 100644
> --- a/drivers/dpll/sit9531x/core.c
> +++ b/drivers/dpll/sit9531x/core.c
[ ... ]
> @@ -3990,6 +4172,61 @@ static void sit9531x_dev_stop(struct sit9531x_dev *sitdev)
> (sitdev->flush_armed & BIT(i)) ? "parked" : "armed");
> }
> mutex_unlock(&sitdev->multiop_lock);
> +
> + sit9531x_tap_pending_retry(sitdev);
> +}
> +
> +static int sit9531x_dev_start(struct sit9531x_dev *sitdev)
> +{
> + struct sit9531x_dpll *sitdpll;
> + int rc;
> +
> + rc = sit9531x_dev_state_fetch(sitdev);
> + if (rc)
> + return rc;
[Severity: Low]
The commit message says:
a restore that fails is retried by the poll, at removal and on the
probe failure path, which now runs the same retries as removal.
Does that hold when sit9531x_dev_state_fetch() fails? This early return
skips sit9531x_dev_pending_retry(). Only the err_unregister path below
calls it.
The state fetch can leave a PLL debug key unlocked through this call
chain:
sit9531x_dev_start()
sit9531x_dev_state_fetch()
sit9531x_chan_state_fetch()
sit9531x_chan_lock_fetch()
sit9531x_chan_routed_ref_read()
If the relock write in sit9531x_chan_routed_ref_read() still fails after
SIT9531X_CLOSE_TRIES attempts, it sets key_pending and returns the error:
relock:
lock_rc = sit9531x_write_pll_close(sitdev, pll_idx,
SIT9531X_PLL_REG_DEBUG,
SIT9531X_PLL_DEBUG_LOCK);
sitdev->chan[pll_idx].key_pending = !!lock_rc;
return rc ? rc : lock_rc;
That error ends the probe. sit9531x_devm_dpll_init() then jumps to
err_destroy_worker, and that path has no retry of its own:
rc = sit9531x_dev_start(sitdev);
if (rc) {
rc = dev_err_probe(sitdev->dev, rc, "Failed to start device\n");
goto err_destroy_worker;
}
So neither sit9531x_tap_pending_retry() nor sit9531x_debug_back_retry()
runs. The debug key is left unlocked on the part, and the "PLL%c left with
its debug taps moved or window open" warning is never printed.
The tap restore part of the claim looks fine, because tap_pending can only
be set after registration. Should this path also call
sit9531x_dev_pending_retry(), or sit9531x_tap_pending_retry() at least?
Alternatively, could the commit message be narrowed to the registration
failure path?
> +
> + mutex_lock(&sitdev->multiop_lock);
> + sit9531x_eeprom_state_report(sitdev);
> + sit9531x_pll_states_report(sitdev);
> + mutex_unlock(&sitdev->multiop_lock);
[ ... ]
> +err_unregister:
> + list_for_each_entry_continue_reverse(sitdpll, &sitdev->dplls, list)
> + sit9531x_dpll_unregister(sitdpll);
> +
> + sit9531x_dev_pending_retry(sitdev);
> +
> + return rc;
> +}
[ ... ]
> diff --git a/drivers/dpll/sit9531x/core.h b/drivers/dpll/sit9531x/core.h
> index 562c63ee117d3..933789c1aa1c5 100644
> --- a/drivers/dpll/sit9531x/core.h
> +++ b/drivers/dpll/sit9531x/core.h
> @@ -206,6 +206,9 @@ struct sit9531x_out {
> * stays in forced holdover
> * @table_back: table reported and to be rewritten while @table_pending
> * @key_pending: debug key of the PLL page not locked again
> + * @tap_pending: debug taps not restored after a phase-offset read
> + * @tap_write_code: tap selection to restore while @tap_pending
> + * @tap_read_code: readback selection to restore while @tap_pending
[Severity: Low]
This isn't a bug, but are these two descriptions swapped?
The comment this patch adds in regs.h says "Dig_Sys_ReadCode selects the
tap, Dig_Sys_WriteCode its modifiers".
The code agrees with regs.h. sit9531x_phase_offset_read() selects the TDC
tap by writing to SIT9531X_PLL_REG_DBG_READ_CODE. In
SIT9531X_PLL_REG_DBG_WRITE_CODE it only sets the low-frequency clock
modifier bit:
rc = sit9531x_write_pll_u8(sitdev, pll_idx,
SIT9531X_PLL_REG_DBG_READ_CODE,
SIT9531X_DBG_READ_CODE_TDC);
sit9531x_tap_restore() then writes tap_read_code back to READ_CODE and
tap_write_code back to WRITE_CODE:
rc = sit9531x_write_pll_close(sitdev, pll_idx,
SIT9531X_PLL_REG_DBG_READ_CODE,
chan->tap_read_code);
So tap_read_code holds the tap selection and tap_write_code holds the
modifiers.
> * @prio_srcs: cached priority table, a source code per slot
> * @prio_last: first slot of each source plus one, 0 if absent
> * @prio_mask: bit per canonical source in the priority table read back
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261201235202.97645-1-arouhi%40sitime.com
Technical Details
Message-ID:
<179625835436.3146.622350637250967370@kernel.org>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376165-linux-kernel-netdev=dewy.ruReferences:
<20261201235202.97645-13-arouhi@sitime.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376165-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v17 12/13] dpll: sit9531x: add support to get phase offset on the connected input Date: Thu, 03 Dec 2026 00:39:14 +0000 Organization: Usenet Network Message-ID: <179625835436.3146.622350637250967370@kernel.org> References: <20261201235202.97645-13-arouhi@sitime.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2097871"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:rU2YQ7YLKoEZi17VuH2ROpAHxQg= sha256:jE8+hsGj0OqxVKY08YwtO70MM927y8n4AtlCSUNxlOQ= sha1:F5OEjEytrbWegpJSrnlnke4Xeqo= sha256:ZOX6E3hC0NWOwxk1HVHjGoGdv+oQKBsh/iV0oqlLuL8= 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 1E9D31177C1; Thu, 3 Dec 2026 03:40:32 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -2.301 X-Spam-Status: No, score=-2.301 tagged_above=-9999 required=6.31 tests=[DCC_CHECK=1.1, DCC_REPUT_70_89=0.1, 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 eL7u0lykBZnx; Thu, 3 Dec 2026 03:40:28 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-376165-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 286AE1177BA; Thu, 3 Dec 2026 03:40:18 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 51BEF2F9FE; Thu, 3 Dec 2026 00:39:30 +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=1796258362; b=ktVZbdnTzu4fLsI2gPh3t+jmE/JKxKjPXdQ7HpcHcCPVxEW+/5QBvTmZS2D+yt5PbMJ1 xT01MsYuRCSQSd+bawltFXcSbRohaZ7C3cgjcDCgUAAOqalDg4lFvm5Q9Cf0QUTo+mIBp qz7835xlR4CAhCkTvxGSVuAqRZmafxCDNqoN29QuPfke/F1dT8ucrFocuzCNSlOLjMoMl YCXcSPNHYdNUyNdIAsuQcUoKc2ktRF0+RGfQJVXrceGRmbP4S3qFld5QPkgUPXCXk0d1S h2FptZQWIRSZFp9rxCRs/uetHlKah3YdYUU9vmV7Rws+eYMpLcURCMUxcPdlElH3l5g== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796258362; 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=rVl2eFBBKXlG+biAvCupjReIu/+CSXI3wQJPb2gMmtc=; b=Y4nuxZ/vazh1eUfqxKI60GTl1gflUUZuWOGaldhgVGrEtFffbkHK4WvIEq4MPVCCSa0p +Z8YBIETJA4vfpNHpqVPFjc8LOSFXffnD9hU7rHFsIZYiwjlG3zfy3q3DoZc0kKq36Mjk e7KzxkumNkYAjIXXztoOAHIUkuTLxECs9Y9h4BvCxlsWwJuMlqFLfxko6YoZMI0z+iMMT qxR4qH2YShdR6kFE3BCDiO8MHZRbiZl3I9ts1xNdnoDCDns+xNj/I1RniJLFUbgAmBSNx k9USTqngOCaGdsl9kzXYn/YxlcMo4xjBJMVO7/F4YnHR3WuSmVPgZAMWMo7gptmM6Ag== 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=Xep24EKp; 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 E0C22606A69B; Thu, 3 Dec 2026 00:39:21 +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=Xep24EKp 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=1796258356; b=XG/g0dNdJ9LuHlsn5B7Pjoc03TP7SM2N08e+lY3F1r7z0EiDm+8FOlCbakE+rxFq56kR QhqCPInrJnxWl1m41OzXfMZI/hdLe8bxIT8VJg3m4v7V7El3PqVLGezg/GMWfD9Tjg7E2 gjOESulnXjrd/QZqa2UjS2FHozGgDboK0b9l3AnRiuWrQtMc7oHxUZdxh5ua1JCYtQ38R VpLlgDRAq5c62aP+a+K5DoN2lKGnPYOzRSGlhav/Y6EreWgbfROYmg5QDI6Ka2T4MlEmK 3rzqCpZTeCrAYNx0axHmas99ZbV9CNGoH4Gnhjyj0NktUeYnCuY4mAWz0CUm0kLB6Sg== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796258356; 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=rVl2eFBBKXlG+biAvCupjReIu/+CSXI3wQJPb2gMmtc=; b=WjQYANN/AyitchHum3TfnckGV9gT0kBOaTiyTo1JAb4DcmuYCsEXWTm9nh5nGiqBFeuF IzgdPC7JVUlBUqj0flIkfqZu7Ba6PWFaRvXl8Kza7c22CGmy9iS1SxrgjrvyGPQW8F2KM Up3qofp46U/DkopshUMUiB8LdAMHyjcfTROX2QPmtQq1xSVqQNvj6WYax8JKtuAhX3I16 l5EH0U4g6ZlYG3HByiYNZ/GSNKOYmbDeL1z0HORmMXEozI2HWBokPaS3qHsjgzdH5I185 EHDyRbeI4yqXbAqsIChGlI+4JEKmuZgHWja7D8X3pC1sbW9x241tstPMbxSLWKoqeMQ== 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=Xep24EKp; 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 0D449606A335; Thu, 3 Dec 2026 00:39:15 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA6BD1F0089B; Thu, 3 Dec 2026 00:39:14 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796258355; bh=rVl2eFBBKXlG+biAvCupjReIu/+CSXI3wQJPb2gMmtc=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=Xep24EKpxkCcKPLP6gfZ7UP0PuNzX8paR5d0FUO0TF14tYuY8T+BkrIjqWA18/b6D PCVPk9NsLUeaxtXMN99N5tqdlaN5pGRRxficjY/sywNCut5PY8QKs/C3IxScDnoevS n4Bed4N5wOUp0HkO2ILlA7P5GJTcUFHV3rvauExiQP0GET8ISPqY1tNqvfNhXlX1UQ miNmhG6A0QnGTeYfAr0RszmXsx7T+02hxWVNc0M+W1weeWeMQ44/b5CXR38IGc1v1t dV59wm7OQIpbrIFdc7jWqmMOGrca/kyznitgyUTnGEKE8F+sZVacBe21/4UYO3LPlp +pqXx6NA8cjgg== 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-13-arouhi@sitime.com> X-sashiko-severity: Low 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