]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ice: dpll: fix rclk pin state get for E810
authorIvan Vecera <ivecera@redhat.com>
Wed, 6 May 2026 21:48:16 +0000 (14:48 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 8 May 2026 23:01:09 +0000 (16:01 -0700)
commitcce709d8df6ba6d2a0a0dbf34acc2cdd9e23bd46
treee7f3993e789fedeb40a32b1c6e88a1c1f72a4c97
parent0ded1f36ba4021cba50513e80be6b6e173710168
ice: dpll: fix rclk pin state get for E810

The refactoring of ice_dpll_rclk_state_on_pin_get() to use
ice_dpll_pin_get_parent_idx() omitted the base_rclk_idx adjustment that was
correctly added in the ice_dpll_rclk_state_on_pin_set() path. This breaks
E810 devices where base_rclk_idx is non-zero, causing the wrong hardware
index to be used for pin state lookup and incorrect recovered clock state
to be reported via the DPLL subsystem. E825C is unaffected as its
base_rclk_idx is 0.

While at it, add bounds check against ICE_DPLL_RCLK_NUM_MAX on hw_idx after
the base_rclk_idx subtraction in both ice_dpll_rclk_state_on_pin_{get,set}()
to prevent out-of-bounds access on the pin state array.

Fixes: ad1df4f2d591 ("ice: dpll: Support E825-C SyncE and dynamic pin discovery")
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/20260506-jk-iwl-net-2026-05-04-v2-7-a5ea4dc837a9@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/intel/ice/ice_dpll.c