* [PATCH net v2 0/2] ice: DPLL init fixes for E810 timing boards
@ 2026-12-02 21:10 Petr Oros
2026-12-02 21:10 ` [PATCH net v2 1/2] ice: fix DPLL registration on boards without the SMA clock mux Petr Oros
2026-12-02 21:10 ` [PATCH net v2 2/2] ice: skip the SW pin description on boards with generic DPLL pins Petr Oros
0 siblings, 2 replies; 4+ messages in thread
From: Petr Oros @ 2026-12-02 21:10 UTC (permalink / raw)
To: netdev
Cc: Petr Oros, Tony Nguyen, Przemek Kitszel, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman, Arkadiusz Kubalewski, Alexander Nowlin,
intel-wired-lan, linux-kernel
Two fixes for E810-C timing boards the driver's static pin tables were
not written for, seen on a board whose netlist has no PCA9575 clock mux
and whose CGU reports more pins than the tables describe. The first
layout is a reference design of its own, Intel ships it as the
E810_C827_SyncE_SFP_SEC NVM configuration.
Patch 1 keeps the DPLL registration alive when the PCA9575 clock mux is
missing. Today the lookup fails and the driver gives up on the whole
DPLL, so userspace loses both devices and every pin.
Patch 2 stops the SMA and U.FL wrapper setup from indexing the input
and output arrays at fixed positions when the driver has already fallen
back to generic pins, where those positions can lie past the end of the
arrays.
Both are tested on an E810-T with the mux present, with the mux hidden
from the driver, and with the generic pin path forced, and on the board
above, where both DPLLs now lock.
A follow-up for iwl-next derives the generic pin names from the pin
classification the firmware reports, so such boards get addressable
pins instead of ambiguous numbers.
Resending directly to netdev. The series went through review on
intel-wired-lan and collected tags, but was never picked up.
Changes since v1:
- repost to netdev, no code change
- review tags collected in the patches
Link to v1:
https://lore.kernel.org/all/20260917190258.3239282-1-poros@redhat.com/
Petr Oros (2):
ice: fix DPLL registration on boards without the SMA clock mux
ice: skip the SW pin description on boards with generic DPLL pins
drivers/net/ethernet/intel/ice/ice_dpll.c | 33 +++++++++++++++++------
1 file changed, 25 insertions(+), 8 deletions(-)
base-commit: 7c13d5d5afb4ba2e8634fe5aa0a9f2bca235cb4b
--
2.56.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH net v2 1/2] ice: fix DPLL registration on boards without the SMA clock mux
2026-12-02 21:10 [PATCH net v2 0/2] ice: DPLL init fixes for E810 timing boards Petr Oros
@ 2026-12-02 21:10 ` Petr Oros
2026-12-03 21:11 ` netdev-bot+sashiko
2026-12-02 21:10 ` [PATCH net v2 2/2] ice: skip the SW pin description on boards with generic DPLL pins Petr Oros
1 sibling, 1 reply; 4+ messages in thread
From: Petr Oros @ 2026-12-02 21:10 UTC (permalink / raw)
To: netdev
Cc: Petr Oros, stable, Tony Nguyen, Przemek Kitszel, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman, Arkadiusz Kubalewski, Alexander Nowlin,
intel-wired-lan, linux-kernel
The SMA and U.FL connectors of an E810-C timing board are routed by a
PCA9575 GPIO expander, and ice_dpll_init_info_sw_pins() reaches it
through ice_read_sma_ctrl(). On a board that carries a CGU but no such
expander the netlist lookup fails with -ENXIO, which aborts
ice_dpll_init_info() and with it the whole DPLL registration:
ice 0000:cc:00.0: ice_dpll_init_info - fail: d->inputs:...
ice 0000:cc:00.0: DPLLs init failure err:-6
Userspace loses the EEC and PPS devices, every CGU pin and the recovered
clock pin.
The netlist describes the mux with a clock mux node, which
ice_init_feature_support() already turns into ICE_F_SMA_CTRL. Key the
software controlled pins on that flag. Without the mux the SMA wrappers
stay inputs, the state the mux path programs at init anyway, and do not
advertise DIRECTION_CAN_CHANGE. The U.FL pins are the other leg of the
mux, so they are hidden, and the outgoing CGU pins stay visible as
REF-SMA1 and REF-SMA2/U.FL2.
The layout is not exotic, the E810_C827_SyncE_SFP_SEC configuration in
Intel's 4.80 NVM package has no clock mux node either. Such boards
worked until the SMA and U.FL redesign moved the expander access into
the DPLL init path.
Fixes: 2dd5d03c77e2 ("ice: redesign dpll sma/u.fl pins control")
Cc: stable@vger.kernel.org
Tested-by: Alexander Nowlin <alexander.nowlin@intel.com>
Reviewed-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Signed-off-by: Petr Oros <poros@redhat.com>
---
v2:
- repost directly to netdev, no functional change
v1: https://lore.kernel.org/all/20260917190258.3239282-2-poros@redhat.com/
---
drivers/net/ethernet/intel/ice/ice_dpll.c | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_dpll.c b/drivers/net/ethernet/intel/ice/ice_dpll.c
index 5148e419f49a07..4410dbd2b231b6 100644
--- a/drivers/net/ethernet/intel/ice/ice_dpll.c
+++ b/drivers/net/ethernet/intel/ice/ice_dpll.c
@@ -110,6 +110,9 @@ static const struct dpll_pin_frequency ice_esync_range[] = {
*/
static bool ice_dpll_is_sw_pin(struct ice_pf *pf, u8 index, bool input)
{
+ if (!input && !ice_is_feature_supported(pf, ICE_F_SMA_CTRL))
+ return false;
+
if (input && pf->hw.device_id == ICE_DEV_ID_E810C_QSFP)
index -= ICE_DPLL_SW_PIN_INPUT_BASE_QSFP -
ICE_DPLL_SW_PIN_INPUT_BASE_SFP;
@@ -1216,6 +1219,8 @@ static int ice_dpll_sma_direction_set(struct ice_dpll_pin *p,
if (p->direction == direction && p->active)
return 0;
+ if (!ice_is_feature_supported(p->pf, ICE_F_SMA_CTRL))
+ return -EOPNOTSUPP;
ret = ice_read_sma_ctrl(&p->pf->hw, &data);
if (ret)
return ret;
@@ -4873,9 +4878,14 @@ static int ice_dpll_init_info_sw_pins(struct ice_pf *pf)
true, &freq_supp_num);
pin->prop.freq_supported_num = freq_supp_num;
pin->prop.capabilities =
- (DPLL_PIN_CAPABILITIES_DIRECTION_CAN_CHANGE |
- DPLL_PIN_CAPABILITIES_PRIORITY_CAN_CHANGE |
- caps);
+ (DPLL_PIN_CAPABILITIES_PRIORITY_CAN_CHANGE | caps);
+ if (ice_is_feature_supported(pf, ICE_F_SMA_CTRL)) {
+ pin->prop.capabilities |=
+ DPLL_PIN_CAPABILITIES_DIRECTION_CAN_CHANGE;
+ } else {
+ pin->active = true;
+ pin->direction = DPLL_PIN_DIRECTION_INPUT;
+ }
pin->pf = pf;
pin->prop.board_label = ice_dpll_sw_pin_sma[i];
pin->input = &d->inputs[pin_abs_idx];
@@ -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);
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.
--
2.56.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH net v2 2/2] ice: skip the SW pin description on boards with generic DPLL pins
2026-12-02 21:10 [PATCH net v2 0/2] ice: DPLL init fixes for E810 timing boards Petr Oros
2026-12-02 21:10 ` [PATCH net v2 1/2] ice: fix DPLL registration on boards without the SMA clock mux Petr Oros
@ 2026-12-02 21:10 ` Petr Oros
1 sibling, 0 replies; 4+ messages in thread
From: Petr Oros @ 2026-12-02 21:10 UTC (permalink / raw)
To: netdev
Cc: Petr Oros, Tony Nguyen, Przemek Kitszel, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman, Arkadiusz Kubalewski, Alexander Nowlin,
intel-wired-lan, linux-kernel
ice_dpll_init_info_sw_pins() describes the SMA and U.FL wrappers by
pointing them at fixed positions of the input and output arrays, inputs
4 and 5 and outputs 0 and 1 on an E810-C SFP, and reads the ref-sync
partner of the input it picked. The arrays are sized by the pin counts
firmware reports. On a board that does not match the Intel reference
layout the driver has already fallen back to generic pins, and when
such a board reports fewer pins than the reference the reads run past
the end of the arrays.
The wrappers are never registered on a generic board, but
ice_dpll_init_pins() still calls ice_dpll_pin_ref_sync_register() on
them, so a stray nonzero partner from the out of bounds read would pair
NULL pins.
Describe the wrappers only when the static pin table is in use and keep
their ref-sync registration under the same condition. The default
programming of the PCA9575 clock mux stays on the generic path, a board
that has the mux still needs its SMA connectors switched to inputs.
Fixes: 2dd5d03c77e2 ("ice: redesign dpll sma/u.fl pins control")
Tested-by: Alexander Nowlin <alexander.nowlin@intel.com>
Reviewed-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Signed-off-by: Petr Oros <poros@redhat.com>
---
v2:
- repost directly to netdev, no functional change
- note in the kernel-doc of ice_dpll_init_info_sw_pins() that the SW pin
caching only happens for the static pin table
v1: https://lore.kernel.org/all/20260917190258.3239282-3-poros@redhat.com/
---
drivers/net/ethernet/intel/ice/ice_dpll.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_dpll.c b/drivers/net/ethernet/intel/ice/ice_dpll.c
index 4410dbd2b231b6..791fc95bab5e6d 100644
--- a/drivers/net/ethernet/intel/ice/ice_dpll.c
+++ b/drivers/net/ethernet/intel/ice/ice_dpll.c
@@ -4486,15 +4486,15 @@ static int ice_dpll_init_pins(struct ice_pf *pf, bool cgu)
if (ret)
goto deinit_sma;
count += ICE_DPLL_PIN_SW_NUM;
+ ret = ice_dpll_pin_ref_sync_register(pf->dplls.sma,
+ ICE_DPLL_PIN_SW_NUM);
+ if (ret)
+ goto deinit_ufl;
}
ret = ice_dpll_pin_ref_sync_register(pf->dplls.inputs,
pf->dplls.num_inputs);
if (ret)
goto deinit_ufl;
- ret = ice_dpll_pin_ref_sync_register(pf->dplls.sma,
- ICE_DPLL_PIN_SW_NUM);
- if (ret)
- goto deinit_ufl;
} else {
count += pf->dplls.num_outputs + 2 * ICE_DPLL_PIN_SW_NUM;
}
@@ -4849,7 +4849,9 @@ static int ice_dpll_init_info_rclk_pin(struct ice_pf *pf)
* @pf: board private structure
*
* Init information for software controlled pins, cache them in
- * pf->dplls.sma and pf->dplls.ufl.
+ * pf->dplls.sma and pf->dplls.ufl. The wrappers are only described when
+ * the board matches the static pin table, a board with generic DPLL pins
+ * keeps the arrays undescribed and only runs the SMA control setup.
*
* Return:
* * 0 - success
@@ -4864,6 +4866,8 @@ static int ice_dpll_init_info_sw_pins(struct ice_pf *pf)
int i, ret;
u8 data;
+ if (d->generic)
+ goto init_sma_ctrl;
if (pf->hw.device_id == ICE_DEV_ID_E810C_QSFP)
input_idx_offset = ICE_E810_RCLK_PINS_NUM;
phase_adj_max = max(d->input_phase_adj_max, d->output_phase_adj_max);
@@ -4929,6 +4933,7 @@ static int ice_dpll_init_info_sw_pins(struct ice_pf *pf)
ice_dpll_phase_range_set(&pin->prop.phase_range, phase_adj_max);
}
+init_sma_ctrl:
if (!ice_is_feature_supported(pf, ICE_F_SMA_CTRL))
return 0;
@@ -4947,7 +4952,7 @@ static int ice_dpll_init_info_sw_pins(struct ice_pf *pf)
if (ret)
return ret;
- ret = ice_dpll_pin_state_update(pf, pin, ICE_DPLL_PIN_TYPE_SOFTWARE,
+ ret = ice_dpll_pin_state_update(pf, d->sma, ICE_DPLL_PIN_TYPE_SOFTWARE,
NULL);
if (ret)
return ret;
--
2.56.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net v2 1/2] ice: fix DPLL registration on boards without the SMA clock mux
2026-12-02 21:10 ` [PATCH net v2 1/2] ice: fix DPLL registration on boards without the SMA clock mux Petr Oros
@ 2026-12-03 21:11 ` netdev-bot+sashiko
0 siblings, 0 replies; 4+ messages in thread
From: netdev-bot+sashiko @ 2026-12-03 21:11 UTC (permalink / raw)
To: poros
Cc: netdev, anthony.l.nguyen, przemyslaw.kitszel, andrew+netdev,
davem, edumazet, kuba, pabeni, horms, arkadiusz.kubalewski,
alexander.nowlin, intel-wired-lan, linux-kernel
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-12-03 21:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02 21:10 [PATCH net v2 0/2] ice: DPLL init fixes for E810 timing boards Petr Oros
2026-12-02 21:10 ` [PATCH net v2 1/2] ice: fix DPLL registration on boards without the SMA clock mux Petr Oros
2026-12-03 21:11 ` netdev-bot+sashiko
2026-12-02 21:10 ` [PATCH net v2 2/2] ice: skip the SW pin description on boards with generic DPLL pins Petr Oros
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox