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=1796332283; b=X1n4pqtaW+ON6LZAreSvx6476LbULaW+fIYbLaGx8L8jutpACZQKH2V9gm6F+r7AiVLy 9i+T8zRNZlFCxwsrVmGPdW3OyyTBUKxnEOq9feZS770fwebf0StpAVWoW3JOHfzuolU6J M83Lq2uAM44SKwkZ3qgYRek10fMLQU5zam3irmZdCD6pXkybSoCJbQjt1mQbjk67vf4KD Tvs9S/BnhmqwGW77W6eetSB5ov19hmxuI+JenJ3JGAOS+vJqEMHvy/THjDL/qRSaJggGm ztcMx7P6PERxnMljncJ9jpQDZq2fpGTqjj3PX05h1bXde6PVheoLskJPGsrZm8go7vw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796332283; 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=LwUOdqhqMrhu9MY+nc4+G3r9lRX9hKBverMcG418BZY=; b=JFIVA9w5d83yIpdOTHldFZMVg2u/cLPuo5zffEKUnbI2kHdDUrjN55rhnCXWK7VwUOTX Ci+6xFLrMeHzPcXYxCcD+ZQl6amaJLFTb0rnHXiph0MohZUrWngo6oox76aZCOdOnysj+ xlkYdRd5w9c9c4lbphZhqgbDqtdFE/516w4/JESibnQm7/CSVAN9+xbB15S/drdXlPzwZ uirg7JbplCDdlQwh27oCGhs4wZbRWfktfO/76LXwM961PJgxJdeNyEDHPQIsFrDGWl5h/ jiHArrOki+322I1OfiW+xJJth9xUWeDs6Dg3LNrfWuNNFnbB9RuWDnBOy8DzbfGFOEA== 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=NsJp87fL; 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 09A45606A32C; Thu, 3 Dec 2026 21:11:22 +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=NsJp87fL Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB9281F0092B; Thu, 3 Dec 2026 21:11:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796332282; bh=LwUOdqhqMrhu9MY+nc4+G3r9lRX9hKBverMcG418BZY=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=NsJp87fL3GfKd8VYSyegSUwhbOiTpKZHNWcl5YjEdLWDn4BgamqJav7aUBsMMGF3j 2coNFSXtk1Ce1DKDOtO/VOPG8X6DRzXqLoATHlaiEF4kkahXGICz85Y8HWa6ff3ZEG qD+39u33Jy+1OLWyg/hHWzan0x1GO2rv9/gm4MhM0xeVYcBVn7Xg36raKemJl7Kb2w ZMuplX29dkms3PJnBtSSVY8K5ovuN+gT+3WXs9vhZdaFD1o6B+9H5p9MsXUtuJPfNd PluKBLsiPD9iOAKjQpZoT6N05/yYwrwIaCzZfsw1nYqqF1BlLNTLFgxWy0LYFUjmvS rt7ttOcVIxmRw== Subject: Re: [PATCH net v2 1/2] ice: fix DPLL registration on boards without the SMA clock mux From: netdev-bot+sashiko@kernel.org To: poros@redhat.com Cc: netdev@vger.kernel.org, anthony.l.nguyen@intel.com, przemyslaw.kitszel@intel.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, arkadiusz.kubalewski@intel.com, alexander.nowlin@intel.com, intel-wired-lan@lists.osuosl.org, linux-kernel@vger.kernel.org Date: Thu, 03 Dec 2026 21:11:21 +0000 Message-ID: <179633228142.3146.7257777743538378508@kernel.org> In-Reply-To: <20261202211046.3007751-2-poros@redhat.com> References: <20261202211046.3007751-2-poros@redhat.com> X-sashiko-severity: Medium Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: netdev@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 2 potential issue(s) to consider. Critical: 0 · High: 0 · Medium: 1 · 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 fix uses ICE_F_SMA_CTRL as proof that the PCA9575 SMA/U.FL expander exists, but that flag and the expander lookup come from… - [Low] The patch hides the U.FL wrapper pins on boards without the clock mux (`pin->hidden = !ice_is_feature_supported(pf, ICE_F_SMA_CTRL)` in… -- ice: fix DPLL registration on boards without the SMA clock mux This commit keys the software controlled SMA/U.FL pins on ICE_F_SMA_CTRL. Boards that have a CGU but no PCA9575 clock mux then no longer fail DPLL registration with -ENXIO. Without the mux, the SMA pins stay fixed inputs without DIRECTION_CAN_CHANGE, the U.FL pins are hidden, and the SMA control register initialization is skipped. > diff --git a/drivers/net/ethernet/intel/ice/ice_dpll.c b/drivers/net/ethernet/intel/ice/ice_dpll.c > index 5148e419f49a0..4410dbd2b231b 100644 > --- a/drivers/net/ethernet/intel/ice/ice_dpll.c > +++ b/drivers/net/ethernet/intel/ice/ice_dpll.c [ ... ] > @@ -4889,6 +4899,7 @@ static int ice_dpll_init_info_sw_pins(struct ice_pf *pf) > pin->idx = i; > pin->prop.type = DPLL_PIN_TYPE_EXT; > pin->prop.capabilities = caps; > + pin->hidden = !ice_is_feature_supported(pf, ICE_F_SMA_CTRL); [Severity: Low] Now that the U.FL pins are hidden, can the notification helpers still send change notifications for them? ice_dpll_get_pins() still calls dpll_pin_get() for hidden entries, so ufl[i].pin is non-NULL. ice_dpll_register_pins() skips them, though: if (!pins[i].hidden) { ret = dpll_pin_register(dpll, pins[i].pin, ops, &pins[i]); ice_dpll_sw_pin_notify_peer() checks only the pointer. On a board without the mux, every SMA state or direction set then notifies the unregistered U.FL peer: if (peer->pin) __dpll_pin_change_ntf(peer->pin); ice_dpll_pin_ntf() has the same problem. ufl[1].input is the same CGU input that backs SMA2: if (dplls->ufl[i].pin && dplls->ufl[i].input && dplls->ufl[i].input->pin == pin) dpll_pin_change_ntf(dplls->ufl[i].pin); So every active input or phase offset change on that CGU input also notifies U.FL2. The kernel-doc of ice_dpll_pin_ntf() says it notifies "any registered SMA/U.FL pin". __dpll_pin_change_ntf() documents its argument as a "registered pin pointer". For the unregistered pin, dpll_pin_notify(DPLL_PIN_CHANGED) still runs. dpll_pin_event_send() returns -ENODEV, so no netlink message goes out and nothing is visible today. Should both helpers also check !hidden, as the register and unregister helpers already do? ice_dpll_pin_ntf() already notifies the hidden CGU inputs behind the SMA wrappers, so part of this predates the patch. The U.FL case is new, though, and the next patch in the series does not change these helpers. > pin->pf = pf; > pin->prop.board_label = ice_dpll_sw_pin_ufl[i]; > if (i == ICE_DPLL_PIN_SW_1_IDX) { > @@ -4918,6 +4929,9 @@ static int ice_dpll_init_info_sw_pins(struct ice_pf *pf) > ice_dpll_phase_range_set(&pin->prop.phase_range, phase_adj_max); > } > > + if (!ice_is_feature_supported(pf, ICE_F_SMA_CTRL)) > + return 0; > + > /* Initialize the SMA control register to a known-good default state. > * Without this write the PCA9575 GPIO expander retains its power-on > * default (all outputs high) which makes all SW pins appear inactive. [Severity: Medium] Does ICE_F_SMA_CTRL guarantee that ice_read_sma_ctrl() will find the PCA9575 expander here? ice_init_feature_support() sets the flag from a CLK_MUX node check. It does this for all six E810 device IDs, including the BACKPLANE and XXV variants: if (ice_is_clock_mux_in_netlist(&pf->hw)) ice_set_feature_support(pf, ICE_F_SMA_CTRL); ice_get_pca9575_handle() looks up a different node: GPIO_CTRL at an index that depends on the device ID. It checks for the PCA9575 part number and rejects any other device ID outright: if (hw->device_id == ICE_DEV_ID_E810C_SFP) idx = SW_PCA9575_SFP_TOPO_IDX; else if (hw->device_id == ICE_DEV_ID_E810C_QSFP) idx = SW_PCA9575_QSFP_TOPO_IDX; else return -ENXIO; The netlist could report a clock mux while the expander is missing, is not a PCA9575, or sits at another index. The device could also be a BACKPLANE/XXV variant with a CGU. In any of those cases, wouldn't the -ENXIO still propagate up this chain? ice_dpll_init_info() ice_dpll_init_pins_info(pf, ICE_DPLL_PIN_TYPE_SOFTWARE) ice_dpll_init_info_sw_pins() ice_read_sma_ctrl() ice_get_pca9575_handle() -> -ENXIO That would abort the whole DPLL registration with "DPLLs init failure err:-6" again. This is still true at the end of the series. The follow-up commit "ice: skip the SW pin description on boards with generic DPLL pins" still sends generic boards to init_sma_ctrl. A BACKPLANE/XXV board has no static CGU pin table, so it takes that path. If ICE_F_SMA_CTRL is set, it hits the same read. There is some history here. The original SMA support in commit 325b2064d00a ("ice: Implement support for SMA and U.FL on E810-T") cleared ICE_F_SMA_CTRL when !ice_is_pca9575_present(). ice_ptp_setup_sma_pins_e810t() also treated SMA read failures as non-fatal. Could -ENXIO from the expander lookup be treated as "no mux"? Another option is to probe the expander once when the feature flag is set. Either would avoid relying on the firmware always reporting both nodes together. -- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261202211046.3007751-1-poros%40redhat.com