drivers/net/ethernet/intel/ice/ice_dpll.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
ice_dpll_notify_changes() sends dpll_pin_change_ntf() only for the
direct CGU input pin stored in d->active_input. Software-controlled
pins (SMA/U.FL) are separate dpll_pin objects that wrap a backing CGU
input, but they never receive a change notification. As a result,
userspace consumers such as synce4l that monitor SMA pins via dpll
netlink never learn when the pin state transitions (e.g. from
SELECTABLE to CONNECTED), even though 'dpll pin show' reports the
correct state on demand.
When the active input changes, also send dpll_pin_change_ntf() for any
registered SMA/U.FL input pin whose backing CGU input matches the old
or new active input.
v2:
- Extract ice_dpll_sw_pin_needs_notify() helper for readability,
- Move loop variable into for() scope.
Fixes: 2dd5d03c77e2 ("ice: redesign dpll sma/u.fl pins control")
Signed-off-by: Petr Oros <poros@redhat.com>
---
drivers/net/ethernet/intel/ice/ice_dpll.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/drivers/net/ethernet/intel/ice/ice_dpll.c b/drivers/net/ethernet/intel/ice/ice_dpll.c
index c2ad39bfe177db..2a505d924fcbae 100644
--- a/drivers/net/ethernet/intel/ice/ice_dpll.c
+++ b/drivers/net/ethernet/intel/ice/ice_dpll.c
@@ -2468,8 +2468,18 @@ static u64 ice_generate_clock_id(struct ice_pf *pf)
*
* Once change detected appropriate event is submitted to the dpll subsystem.
*/
+static bool
+ice_dpll_sw_pin_needs_notify(struct ice_dpll_pin *p,
+ struct dpll_pin *active, struct dpll_pin *old)
+{
+ return p->pin &&
+ p->direction == DPLL_PIN_DIRECTION_INPUT &&
+ (p->input->pin == active || p->input->pin == old);
+}
+
static void ice_dpll_notify_changes(struct ice_dpll *d)
{
+ struct ice_dplls *dplls = &d->pf->dplls;
bool pin_notified = false;
if (d->prev_dpll_state != d->dpll_state) {
@@ -2477,6 +2487,8 @@ static void ice_dpll_notify_changes(struct ice_dpll *d)
dpll_device_change_ntf(d->dpll);
}
if (d->prev_input != d->active_input) {
+ struct dpll_pin *old = d->prev_input;
+
if (d->prev_input)
dpll_pin_change_ntf(d->prev_input);
d->prev_input = d->active_input;
@@ -2484,6 +2496,14 @@ static void ice_dpll_notify_changes(struct ice_dpll *d)
dpll_pin_change_ntf(d->active_input);
pin_notified = true;
}
+ for (int i = 0; i < ICE_DPLL_PIN_SW_NUM; i++) {
+ if (ice_dpll_sw_pin_needs_notify(&dplls->sma[i],
+ d->active_input, old))
+ dpll_pin_change_ntf(dplls->sma[i].pin);
+ if (ice_dpll_sw_pin_needs_notify(&dplls->ufl[i],
+ d->active_input, old))
+ dpll_pin_change_ntf(dplls->ufl[i].pin);
+ }
}
if (d->prev_phase_offset != d->phase_offset) {
d->prev_phase_offset = d->phase_offset;
--
2.52.0
On 2/19/26 2:15 PM, Petr Oros wrote:
> ice_dpll_notify_changes() sends dpll_pin_change_ntf() only for the
> direct CGU input pin stored in d->active_input. Software-controlled
> pins (SMA/U.FL) are separate dpll_pin objects that wrap a backing CGU
> input, but they never receive a change notification. As a result,
> userspace consumers such as synce4l that monitor SMA pins via dpll
> netlink never learn when the pin state transitions (e.g. from
> SELECTABLE to CONNECTED), even though 'dpll pin show' reports the
> correct state on demand.
>
> When the active input changes, also send dpll_pin_change_ntf() for any
> registered SMA/U.FL input pin whose backing CGU input matches the old
> or new active input.
>
> v2:
> - Extract ice_dpll_sw_pin_needs_notify() helper for readability,
> - Move loop variable into for() scope.
>
> Fixes: 2dd5d03c77e2 ("ice: redesign dpll sma/u.fl pins control")
> Signed-off-by: Petr Oros <poros@redhat.com>
> ---
> drivers/net/ethernet/intel/ice/ice_dpll.c | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_dpll.c b/drivers/net/ethernet/intel/ice/ice_dpll.c
> index c2ad39bfe177db..2a505d924fcbae 100644
> --- a/drivers/net/ethernet/intel/ice/ice_dpll.c
> +++ b/drivers/net/ethernet/intel/ice/ice_dpll.c
> @@ -2468,8 +2468,18 @@ static u64 ice_generate_clock_id(struct ice_pf *pf)
> *
> * Once change detected appropriate event is submitted to the dpll subsystem.
> */
> +static bool
> +ice_dpll_sw_pin_needs_notify(struct ice_dpll_pin *p,
> + struct dpll_pin *active, struct dpll_pin *old)
> +{
> + return p->pin &&
> + p->direction == DPLL_PIN_DIRECTION_INPUT &&
> + (p->input->pin == active || p->input->pin == old);
> +}
> +
Move this function above comment that documents function
ice_dpll_notify_changes().
Ivan
> static void ice_dpll_notify_changes(struct ice_dpll *d)
> {
> + struct ice_dplls *dplls = &d->pf->dplls;
> bool pin_notified = false;
>
> if (d->prev_dpll_state != d->dpll_state) {
> @@ -2477,6 +2487,8 @@ static void ice_dpll_notify_changes(struct ice_dpll *d)
> dpll_device_change_ntf(d->dpll);
> }
> if (d->prev_input != d->active_input) {
> + struct dpll_pin *old = d->prev_input;
> +
> if (d->prev_input)
> dpll_pin_change_ntf(d->prev_input);
> d->prev_input = d->active_input;
> @@ -2484,6 +2496,14 @@ static void ice_dpll_notify_changes(struct ice_dpll *d)
> dpll_pin_change_ntf(d->active_input);
> pin_notified = true;
> }
> + for (int i = 0; i < ICE_DPLL_PIN_SW_NUM; i++) {
> + if (ice_dpll_sw_pin_needs_notify(&dplls->sma[i],
> + d->active_input, old))
> + dpll_pin_change_ntf(dplls->sma[i].pin);
> + if (ice_dpll_sw_pin_needs_notify(&dplls->ufl[i],
> + d->active_input, old))
> + dpll_pin_change_ntf(dplls->ufl[i].pin);
> + }
> }
> if (d->prev_phase_offset != d->phase_offset) {
> d->prev_phase_offset = d->phase_offset;
Hi Petr, kernel test robot noticed the following build warnings: [auto build test WARNING on tnguy-net-queue/dev-queue] url: https://github.com/intel-lab-lkp/linux/commits/Petr-Oros/ice-fix-missing-dpll-notification-for-SW-pins/20260219-211758 base: https://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue.git dev-queue patch link: https://lore.kernel.org/r/20260219131500.2271897-1-poros%40redhat.com patch subject: [PATCH iwl-net v2] ice: fix missing dpll notification for SW pins config: um-allyesconfig (https://download.01.org/0day-ci/archive/20260220/202602201417.eTuOe57F-lkp@intel.com/config) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260220/202602201417.eTuOe57F-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202602201417.eTuOe57F-lkp@intel.com/ All warnings (new ones prefixed by >>): >> Warning: drivers/net/ethernet/intel/ice/ice_dpll.c:2625 function parameter 'p' not described in 'ice_dpll_sw_pin_needs_notify' >> Warning: drivers/net/ethernet/intel/ice/ice_dpll.c:2625 function parameter 'active' not described in 'ice_dpll_sw_pin_needs_notify' >> Warning: drivers/net/ethernet/intel/ice/ice_dpll.c:2625 function parameter 'old' not described in 'ice_dpll_sw_pin_needs_notify' >> Warning: drivers/net/ethernet/intel/ice/ice_dpll.c:2625 expecting prototype for ice_dpll_notify_changes(). Prototype was for ice_dpll_sw_pin_needs_notify() instead -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Hi Petr, kernel test robot noticed the following build warnings: [auto build test WARNING on tnguy-net-queue/dev-queue] url: https://github.com/intel-lab-lkp/linux/commits/Petr-Oros/ice-fix-missing-dpll-notification-for-SW-pins/20260219-211758 base: https://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue.git dev-queue patch link: https://lore.kernel.org/r/20260219131500.2271897-1-poros%40redhat.com patch subject: [PATCH iwl-net v2] ice: fix missing dpll notification for SW pins config: x86_64-rhel-9.4 (https://download.01.org/0day-ci/archive/20260220/202602200046.SGwK2tWh-lkp@intel.com/config) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260220/202602200046.SGwK2tWh-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202602200046.SGwK2tWh-lkp@intel.com/ All warnings (new ones prefixed by >>): >> Warning: drivers/net/ethernet/intel/ice/ice_dpll.c:2625 function parameter 'p' not described in 'ice_dpll_sw_pin_needs_notify' >> Warning: drivers/net/ethernet/intel/ice/ice_dpll.c:2625 function parameter 'active' not described in 'ice_dpll_sw_pin_needs_notify' >> Warning: drivers/net/ethernet/intel/ice/ice_dpll.c:2625 function parameter 'old' not described in 'ice_dpll_sw_pin_needs_notify' >> Warning: drivers/net/ethernet/intel/ice/ice_dpll.c:2625 expecting prototype for ice_dpll_notify_changes(). Prototype was for ice_dpll_sw_pin_needs_notify() instead -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
© 2016 - 2026 Red Hat, Inc.