From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 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== 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== 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 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) 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 Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA6BD1F0089B; Thu, 3 Dec 2026 00:39:14 +0000 (UTC) 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== Subject: Re: [PATCH net-next v17 12/13] dpll: sit9531x: add support to get phase offset on the connected input From: netdev-bot+sashiko@kernel.org To: arouhi@sitime.com 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 Date: Thu, 03 Dec 2026 00:39:14 +0000 Message-ID: <179625835436.3146.622350637250967370@kernel.org> In-Reply-To: <20261201235202.97645-13-arouhi@sitime.com> References: <20261201235202.97645-13-arouhi@sitime.com> X-sashiko-severity: Low Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 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