]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ice: fix missing priority callbacks for U.FL DPLL pins
authorPetr Oros <poros@redhat.com>
Tue, 2 Jun 2026 22:55:10 +0000 (15:55 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 5 Jun 2026 23:41:19 +0000 (16:41 -0700)
The U.FL2 input pin advertises DPLL_PIN_CAPABILITIES_PRIORITY_CAN_CHANGE
in its capability mask, but ice_dpll_pin_ufl_ops does not provide
.prio_get and .prio_set callbacks. As a result the DPLL subsystem
cannot report or accept priority for U.FL pins: pin-get omits the prio
field on U.FL2 and pin-set with prio is rejected as invalid, even
though the capability is present. This prevents user space from using
priority to select or disable U.FL2 as a DPLL input source.

Reproducer with iproute2 (dpll command):

  # dpll pin show board-label U.FL2
  pin id 16:
    module-name ice
    board-label U.FL2
    type ext
    capabilities priority-can-change|state-can-change
    parent-device:
      id 0 direction input state selectable phase-offset 0
    /* note: no "prio" between "direction" and "state",
       even though priority-can-change is advertised */

  # dpll pin set id 16 parent-device 0 prio 5
  RTNETLINK answers: Operation not supported

After the fix the prio field is reported by pin show and pin set with
prio is accepted on U.FL2.

Add the missing .prio_get and .prio_set callbacks to
ice_dpll_pin_ufl_ops, reusing ice_dpll_sw_input_prio_{get,set}. The
same ops struct is shared by U.FL1 and U.FL2: U.FL2 (input) delegates
to the backing hardware input pin, while U.FL1 (output) does not
advertise DPLL_PIN_CAPABILITIES_PRIORITY_CAN_CHANGE so the dpll core
capability gate never invokes prio_set for it, and prio_get reports
the OUTPUT sentinel (ICE_DPLL_PIN_PRIO_OUTPUT) on the output side
exactly like the SMA path does today.

Fixes: 2dd5d03c77e2 ("ice: redesign dpll sma/u.fl pins control")
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Petr Oros <poros@redhat.com>
Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Link: https://patch.msgid.link/20260602225513.393338-3-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/intel/ice/ice_dpll.c

index 892bc7c2e28b46f9e88dd381937775d0eff00ceb..0704e92ab04305ee0f2a72f0240b2bad640946d0 100644 (file)
@@ -2633,6 +2633,8 @@ static const struct dpll_pin_ops ice_dpll_pin_ufl_ops = {
        .state_on_dpll_set = ice_dpll_ufl_pin_state_set,
        .state_on_dpll_get = ice_dpll_sw_pin_state_get,
        .direction_get = ice_dpll_pin_sw_direction_get,
+       .prio_get = ice_dpll_sw_input_prio_get,
+       .prio_set = ice_dpll_sw_input_prio_set,
        .frequency_get = ice_dpll_sw_pin_frequency_get,
        .frequency_set = ice_dpll_sw_pin_frequency_set,
        .esync_set = ice_dpll_sw_esync_set,