Article View: linux.kernel.netdev
Article #24123Re: [PATCH net-next v5 08/14] selftests: dpll: add pin priority test
From: netdev-bot+sashiko
Date: Sun, 29 Nov 2026 10:38
Date: Sun, 29 Nov 2026 10:38
140 lines
12811 bytes
12811 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] In `tools/testing/selftests/drivers/dpll/dpll_features.sh`,
`test_pin_priority_get_set()` never checks that the starting priority…
- [Low] `test_pin_priority_get_set()` in
`tools/testing/selftests/drivers/dpll/dpll_features.sh` reads the pin…
--
selftests: dpll: add pin priority test
This adds a test to dpll_features.sh that sets a new priority on a spare
input pin, reads it back and restores the original value. The
dpllsim_add_pin() helper gains an optional priority argument. The
standard and stress devices now configure priorities for their input
pins.
> diff --git a/tools/testing/selftests/drivers/dpll/dpll_features.sh b/tools/testing/selftests/drivers/dpll/dpll_features.sh
> index 61ebfd9e71892..34e6b28ee224c 100755
> --- a/tools/testing/selftests/drivers/dpll/dpll_features.sh
> +++ b/tools/testing/selftests/drivers/dpll/dpll_features.sh
[ ... ]
> @@ -130,6 +131,138 @@ pin_tune_spare()
> return 1
> }
>
> +test_pin_priority_get_set()
> +{
[ ... ]
> + pin_tune_spare "DPLL pin priority set/get" || return
> +
> + # A query that failed is not a pin without a priority.
> + if ! before=$(dpll_pin_get_prio "$DPLL_DEV_ID" "$PIN_TUNE_ID"); then
> + check_err 1 "pin $PIN_TUNE_ID query failed"
> + log_test "DPLL pin priority set/get"
> + return
> + fi
> + if [ -z "$before" ]; then
> + dpll_log_test_skip_or_fail "DPLL pin priority set/get" \
> + "prio not reported"
> + return
> + fi
[Severity: Low]
On the device the script creates, should before also be compared with
the priority this patch configures?
This patch makes dpllsim_add_standard_pins() write prio 0 to gnss0 and
prio 1 to ext0. The dpllsim_setup_standard_device() comment documents
that layout, and Documentation/driver-api/dpllsim.rst says "Every live
transition starts from the configured values".
Here, though, the only check on before is that it is not empty. The
readback of target and the restore check that follow are both relative
to before.
Suppose dpllsim_pin_prio_store() stopped storing cfg_prio, or
dpllsim_pin_reset() in drivers/dpll/dpllsim/dpll.c stopped doing this:
pin->prio = pin->cfg_prio;
ext0 would then report the simulator default (DPLLSIM_DEFAULT_PIN_PRIO,
128) instead of 1, and this test would still pass.
No other selftest under tools/testing/selftests/drivers/dpll/ compares
the reported prio with the layout either. As a result, nothing tests the
initial priority on its way from configfs to netlink.
[ ... ]
> + # The selection may have taken the pin since pin_tune_spare
> + # looked, as in the state test, and a priority that ranks lower
> + # could make the device leave it for another input.
> + case "$state" in
> + disconnected|selectable)
> + ;;
> + *)
> + dpll_log_test_skip_or_fail "DPLL pin priority set/get" \
> + "the input pin is not spare any more"
> + return
> + ;;
> + esac
[Severity: Low]
Can this re-check see the case it describes on zl3073x in automatic
mode?
In AUTO mode, zl3073x reports SELECTABLE for every input whose priority
is not NONE, including the reference the channel is locked to. It never
reports CONNECTED in that mode:
drivers/dpll/zl3073x/dpll.c:zl3073x_dpll_input_pin_state_on_dpll_get() {
...
case ZL_DPLL_MODE_REFSEL_MODE_AUTO:
if (zl3073x_chan_ref_is_selectable(chan, ref))
*state = DPLL_PIN_STATE_SELECTABLE;
else
*state = DPLL_PIN_STATE_DISCONNECTED;
break;
...
}
The only place the live reference shows up is operstate. That is set to
DPLL_PIN_OPERSTATE_ACTIVE in zl3073x_dpll_ref_operstate_get().
pin_is_spare() checks operstate, but this re-check reads .state only.
Several netlink calls run between pin_tune_spare() and this point: the
prio query, the write-back of before, and the mode and state queries.
Suppose the channel switches to PIN_TUNE_ID in that window. The check
still passes, and the loop writes before + 1 or before + 2 to the live
reference.
Could that make the device switch to another qualified input until the
restore runs?
The state test's copy of this check limits it to ice in its comment
("ice reports it connected then"). This comment reads as if it applied
to any driver.
Would calling pin_tune_spare() again here, or also reading operstate,
close the gap on zl3073x?
> + candidates=("$((before + 1))" "$((before + 2))")
> + if [ "$mode" != automatic ] || [ "$state" = disconnected ]; then
> + candidates+=("$((before - 1))" 1 7)
> + fi
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261125090522.3777494-1-poros%40redhat.com
Technical Details
Message-ID:
<179594873230.3146.1439194847668718778@kernel.org>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373454-linux-kernel-netdev=dewy.ruReferences:
<20261125090522.3777494-9-poros@redhat.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373454-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v5 08/14] selftests: dpll: add pin priority test Date: Sun, 29 Nov 2026 10:38:52 +0000 Organization: Usenet Network Message-ID: <179594873230.3146.1439194847668718778@kernel.org> References: <20261125090522.3777494-9-poros@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="1150478"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:Eg7DWMMSFPJQQufYq7AtTHRt7CA= sha256:zrbXl9EMisIr+5SoESw4FohUEZxBHzGQnLw4Qd0HZ0U= sha1:yzF1Q1O0FM3O5h8o6PLS5ICsYBA= sha256:0vcbRKsHxwdD2ILQfT8yU+7nnlo2WjmvKTqR2Nt6DbA= 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 23347125F97; Sun, 29 Nov 2026 13:39:19 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.4 X-Spam-Status: No, score=-3.4 tagged_above=-9999 required=6.31 tests=[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, URIBL_BLOCKED=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 IzfldqiFelC0; Sun, 29 Nov 2026 13:39:15 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-373454-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 4860B125F96; Sun, 29 Nov 2026 13:39:07 +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 4F37E269EF; Sun, 29 Nov 2026 10:38:55 +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=1795948735; b=zI4OLaaXu7m4tFMPA3w1+6BQAnwf06k/Ac0D2OYq22HPtobsHHlDZ99GsJTewHVfoJ3V 5v7MzKozi3qm2sjjvHanXMyyK8wrF/B0A0cW5yuAs5XoS0p8us7pSkGZKjrWhqE9z060q 3cuEYr3Ej7OARVLPTKts200EN55n1FPvb7tZtAAVqlAH82UoFer6F/4UbtyOE3KOz6dTq E4ubvfRsBekOlq45ELQ1/3D9oaNRdInqMWg1MuJ8/NJQ/dvk/KrPAAxQOnhzMMZcuxNg2 hWXqD0XMq9ifOjPI+hisrIfRbrb9FJSCefNn8cIxhzVUH+SB4EApg+4vdjw095R9gGQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795948735; 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=7HH+jItqerRRZcIn//qfIfKRE7n1zZInSJFY3yZMylY=; b=M23rZftN4webBeGo2XtbFHcg9HfczIecmh9TUOtCC6xCaDCdljZG4qJ44h/q4A4zqhx1 fOsw4h6W3/WTIY72etk0yTmSL2iAfT/MRwyqFt1A4xrdUCPoUOFOqZMV1g1XdVQBariEi XA48MC50/STIF3igBCpXqg6LO2e/c85Z10PqypTVpAQX2gbyD4m2QnU3GzULcqwX6xaSJ qEEc9QokVZtCs9pEbba41REGHsb9XqW15VMmA1el2tXdUCvN7TOBXucxLWNE/YQo6pbla zJvb+9wfLefWxzUMgLUT6gzlzewwJmWvqndB9RQdR5sLNbA/kF0Xo1sujedQXmFdHHA== 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=kSKCq9nY; 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 23FA1606A325; Sun, 29 Nov 2026 10:38:55 +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=kSKCq9nY 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=1795948734; b=UvPlNTlX/B/s7O0PvlMyfWAYcKnDKXku7PY8dBUT/GegZmTKjQTyg9xJyPqUx+cWAWCS 0iof4x9B9y5HRggd9xkNd0pdqNn9A17MwYikG+45b+W2dNLiY+X20aOyWUnxPo6AXrUuD f12/jKZ257t25+s87Fb16R6BGhSuslrW8FGFBfNGQi0hdbQIOmActIgKmT3aL6uakTH/Q E8z1+oLCw5e1cMoKpdt3ZdTOgUxLgoLtEBM0LQUf/npxLaWIRaqp7tIZi+3Ek1AHLQ3BM yr2myWb/luffulSAqiqT5DuACQC3VcoWsEr6Cr8ZM2NDEDTGzTnkgL9BqkngpTqf7+w== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795948734; 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=7HH+jItqerRRZcIn//qfIfKRE7n1zZInSJFY3yZMylY=; b=q2/5xsxDqLwY0FsNIDvdmJ+RiucAzIW3xxNPFICwUpwRYimBQrtVji0LPtSPmKb0k2mi 9RCnWXHZlTcjCo62K6CZ0IeDvWWqKAQ/1rKCrr/a2721Guft4Yz/UG+U6es4/6CWJ4E/T s31dK+ToHbEMlLmgv8OyRsbnlF/KH3jPLWy8uxX2yX6jPerwcqemchDst8T5D+C+ZqeVZ QCF7k31C31288YY6GjFhJDD60ClG4jVGnWbOh+svOaWrYAcF0TwZ8yEFPG0O122VRN6+Q Xh3QMu/obX1UWjJ8SvHhSYa9O1BBNDq30HBVKJ4ze+JSHyDfzodnNO1H4WNzHi0y9hg== 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=kSKCq9nY; 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 45652606A323; Sun, 29 Nov 2026 10:38:54 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id BC6DC1F0089C; Sun, 29 Nov 2026 10:38:52 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795948733; bh=7HH+jItqerRRZcIn//qfIfKRE7n1zZInSJFY3yZMylY=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=kSKCq9nYviJAgtG5Kopqa9VLpH/CjCIouARWN0OwLC1fMW2lQ5Aj9pMTTKPS43HkH S24XLgIbyyQv018q9dYBwivUx71O3nIKSrsaWzFAltcjBEsPy/mFilNGTCTJqrd5aM y8gFCCw5ULX6Bpv3LNr3uQFrOfGqiIHRwSxAzr+aYl7uX6MDUf8lMlVti9XB0VtR+m tpnEIoGaaula7KPWk2JxbyHo6zf3jkfzXQYaWnN2HY9uzoizFU0el3SeMv3vrbZz1W UmqW34FFgNBdFF0YLOOQzlV2Nz5XJMTYuOI59kKSmq+74DnOfa+/vl96ZkaJNeYFlt uvgh9xpmubVxg== X-Cc: netdev@vger.kernel.org, ivecera@redhat.com, jiri@nvidia.com, corbet@lwn.net, skhan@linuxfoundation.org, shuah@kernel.org, rdunlap@infradead.org, jani.nikula@intel.com, vadim.fedorenko@linux.dev, arkadiusz.kubalewski@intel.com, jiri@resnulli.us, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org X-In-Reply-To: <20261125090522.3777494-9-poros@redhat.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