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=1796312168; b=oWJnfMqWJHGJuvvdLhjxa5G/OpukHELz8Ic1jJFMNv4jybDCLjZYqoHJYOkQ0YmxJZtt gIr2uqfLAqWD6iJJgWWGHwZkh85Gjfi06bE3uFmlhtHo1uNyxralTjLVjTKUwfXgE5xTb GzrtQvrdjHk7xrADnh+/6PHC/lcGdxGZPfPJJVzinXlXDmDUUxTG8Phc9VuE+Mdxy4X/N +dO1Q6o3gfa2Ari4csDNPGZQtbAt7K6wigkYK+lqYb7BdWQwYrvgD4GuZajGgh8I5t7ok VQmVYB4ieI2NPvAaxSHfS1J7fzBS5CSzTfWPZORA2lheCwpSKiqsT7iAYoDc2Ia+WrA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796312168; 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=GT/KWP59DJt2WdKb+j4rW/NyQ17f7IFxvnZAwHNOAdg=; b=brS9nasnghysl3sNfX13Oc0LmpKaQdV6thjTDTuA5JAL/qFkgYFsjqtR5/qrc1IpFq3F Cy4beGOGPxb2UH3BL/bc94xCFJY7QtNCaSdbk+UqM52jnXfBGKsK7+a5JVDMMvXJpHYQD B209qEpTINiAwyZwnxAXKJgN8oPwkkCOZY0v6UE/O9Y/ofkFE3yjIZLaPSSFF9HzasYmH +x4kMrcM9nBaOjZCj2LQp+TcpyILkSUTALwE+hfOd4VUqpD2/S+y8bN2rcT0bCNPi9RT5 P5/ZTMEqGRERYFaGaF6s/gVW1P/xhslrmo5hKz6pAegLtAZIXnZgdn0hq1BJojO0P3Q== 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=ZE1aCVTH; 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 C7A3B606A33A; Thu, 3 Dec 2026 15:36:08 +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=ZE1aCVTH Received: by smtp.kernel.org (Postfix) with ESMTPSA id C3F521F000C1; Thu, 3 Dec 2026 15:36:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796312168; bh=GT/KWP59DJt2WdKb+j4rW/NyQ17f7IFxvnZAwHNOAdg=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=ZE1aCVTH4NZ2q5cdips6wkklxcrrtLWlQQgnr1wjksVZFVSxfy0/cn8Qg+uQ6Kihk W6hnuu9+fMo3kxF0ctdrpJmvOSx0LQ8yRVb54KawIOn3tsSyMxuxABjcGiV3s8HiBh Vap/Ja/ev/6Py44M0owhhBKAujxEdUR6wIK8aEyLQ0eAoRaz5+irPz+c902BbkXSq3 zSIB63Wl3rkDvfYxmHN8r3XATkC1N6kO9ud4FiQelyutqRymwBcuoibz0VNj2b7187 rrcZLR71lvZTmRZsn77xgntXw0y9w7p/RcRC+7Gtg3kJ8xcY2y//x7/yaHlU07Up8U R2x02HznbjleQ== Subject: Re: [PATCH net-next v6 06/14] selftests: dpll: add pin state tests From: netdev-bot+sashiko@kernel.org To: poros@redhat.com Cc: netdev@vger.kernel.org, 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, ivecera@redhat.com, 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 Date: Thu, 03 Dec 2026 15:36:07 +0000 Message-ID: <179631216737.3146.9610878079136648096@kernel.org> In-Reply-To: <20261202153223.2725780-7-poros@redhat.com> References: <20261202153223.2725780-7-poros@redhat.com> X-sashiko-severity: Medium Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: linux-doc@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 1 potential issue(s) to consider. Critical: 0 · High: 0 · Medium: 1 · Low: 0 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] On an Intel E810-T device that the user provides (DPLL_DEV_ID / DPLL_DRIVER=ice), dpll_features.sh can pick U.FL2 as PIN_TUNE_ID. -- selftests: dpll: add pin state tests This adds dpll_features.sh. It picks a spare input pin, moves it between disconnected and selectable, reads the state back after each step and restores it at the end. By default it runs against a dpllsim device, or against a device given by DPLL_DEV_ID or DPLL_DRIVER. The library gains a pin state setter and getters for the device mode and pin operstate, and the stress script gains a test that floods pin state changes. > diff --git a/tools/testing/selftests/drivers/dpll/dpll_features.sh b/tools/testing/selftests/drivers/dpll/dpll_features.sh > new file mode 100755 > index 0000000000000..9dcf53d019987 > --- /dev/null > +++ b/tools/testing/selftests/drivers/dpll/dpll_features.sh > @@ -0,0 +1,500 @@ [ ... ] > + if ! dpll_pin_set_state "$DPLL_DEV_ID" "$PIN_TUNE_ID" "$before"; then > + reason=${DPLL_LAST_ERR%%$'\n'*} > + reason=${reason:+, $reason} > + if [ "$RET" -eq 0 ]; then > + dpll_log_test_skip_or_fail \ > + "DPLL pin state transitions" \ > + "cannot set pin state to $before$reason" > + return > + fi > + check_err 1 "cannot restore pin state$reason" > + else > + TUNE_CHANGED=0 > + fi > + # The automatic selection may pick a pin that is selectable again, > + # like it may in the loop above. A pin that shares its input with > + # another one, as U.FL2 does with SMA2 on E810-T, reads > + # disconnected once it is restored, while the partner pin stays > + # changed, so the readback cannot tell it from a pin that was > + # restored cleanly, the sharing is what the interface does not > + # show, see the script header. > + after=$(dpll_pin_get_state "$DPLL_DEV_ID" "$PIN_TUNE_ID") > + if [ -z "$after" ]; then > + check_err 1 "cannot read the restored pin state back" > + elif [ "$after" != "$before" ] && > + [ "$may_pick/$before/$after" != 1/selectable/connected ]; then > + check_err 1 "pin state not restored, got '$after'" > + fi > + > + log_test "DPLL pin state transitions" > +} [Severity: Medium] On an E810-T device given through DPLL_DEV_ID or DPLL_DRIVER=ice, can this test leave the SMA2 connector reconfigured and still report PASS? When SMA2 is an input that is not the reference, U.FL2 is inactive and reads disconnected. pin_is_spare() accepts it. pin_ranks_below_refs() also passes when the reference ranks above the CGU input that the two pins share. So pick_tune_pin() can choose U.FL2 when no earlier input qualifies. The loop in test_pin_state_transitions() then sets U.FL2 to selectable, and the final restore sets it back to disconnected. In ice_dpll_ufl_pin_state_set() those two transitions do: case ICE_DPLL_PIN_SW_2_IDX: if (state == DPLL_PIN_STATE_SELECTABLE) { data |= ICE_SMA2_DIR_EN; data &= ~ICE_SMA2_UFL2_RX_DIS; enable = true; } else if (state == DPLL_PIN_STATE_DISCONNECTED) { ... data |= ICE_SMA2_UFL2_RX_DIS; enable = false; The disconnected branch never clears ICE_SMA2_DIR_EN, and it disables the shared CGU input. After the test, ice_dpll_sw_pins_update() reports SMA2 differently: else if (data & ICE_SMA2_DIR_EN) p->direction = DPLL_PIN_DIRECTION_OUTPUT; SMA2 shows up as an output, or as inactive if TX_EN was set, where it used to be an input. If TX_EN was clear, SMA2 is now an active output on a connector that may be wired to external equipment as an input. U.FL2 itself reads back disconnected, which matches $before, so the readback passes and log_test reports PASS. The deferred tune_restore covers only PIN_TUNE_ID. Is the comment right that the interface does not show the sharing? The script header says the same thing. ice calls ice_dpll_sw_pin_notify_peer() after the set, and the change to SMA2's direction and state is visible in dpll pin show. Could the test dump the other pins of the device before the first set and compare them after the restore? It could then fail, or skip a pin whose state change rewires another pin, rather than only documenting the risk in the header. -- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261202153223.2725780-1-poros%40redhat.com