| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/09/08 23:25 | flow | patch-triage |
0mArgs:null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"KMSANReasoning": "",
"NeedsKMSAN": false,
"Reasoning": "The patch modifies the Intel Ethernet Connection E800 series driver (drivers/net/ethernet/intel/ice) to add TSPLL (TimeSync PLL) handling and monitoring for Intel E825 devices. This requires physical Intel E800/E825 series PCIe network hardware that is not emulated in standard virtualized fuzzing environments (QEMU/GCE), making the modified code structurally unreachable.",
"WorthFuzzing": false
} |
| 1/1 | 2026/09/08 23:25 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit d34ae6b1b79e3b881b1485b22ed5b9cf689f01a3\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Tue Sep 8 23:25:56 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/ethernet/intel/ice/ice_dpll.c b/drivers/net/ethernet/intel/ice/ice_dpll.c\nindex 85a74cd6ea1f3..0109fc34307c2 100644\n--- a/drivers/net/ethernet/intel/ice/ice_dpll.c\n+++ b/drivers/net/ethernet/intel/ice/ice_dpll.c\n@@ -22,6 +22,8 @@\n \n #define E825_RCLK_PARENT_0_PIN_IDX\t\t0\n #define E825_RCLK_PARENT_1_PIN_IDX\t\t1\n+#define E825_DPLL_TSPLL_BASE_IDX\t\t0\n+#define E825_DPLL_TXCLK_BASE_IDX\t\t1\n \n #define ICE_DPLL_PIN_SW_INPUT_ABS(in_idx) \\\n \t(ICE_DPLL_SW_PIN_INPUT_BASE_SFP + (in_idx))\n@@ -84,6 +86,7 @@ static const char * const ice_dpll_sw_pin_sma[] = { \"SMA1\", \"SMA2\" };\n static const char * const ice_dpll_sw_pin_ufl[] = { \"U.FL1\", \"U.FL2\" };\n static const char * const ice_dpll_ext_eref_pin = \"EXT_EREF0\";\n static const char * const ice_dpll_fwnode_ext_synce = \"clk_ref_synce\";\n+static const char * const ice_dpll_fwnode_time_ref = \"time_ref\";\n \n static const struct dpll_pin_frequency ice_esync_range[] = {\n \tDPLL_PIN_FREQUENCY_RANGE(0, DPLL_PIN_FREQUENCY_1_HZ),\n@@ -2814,6 +2817,160 @@ static const struct dpll_pin_ops ice_dpll_txclk_ops = {\n \t.direction_get = ice_dpll_input_direction,\n };\n \n+/**\n+ * ice_dpll_tspll_lock_status_get - derive TSPLL state for dpll subsystem\n+ * @pf: board private structure\n+ * @use_cached: if true, read lock state from pf-\u003eptp.tspll_locked (maintained\n+ * by the PTP periodic worker); if false, query hardware directly\n+ *\n+ * If TIME_REF is not selected, TSPLL is treated as unlocked from the dpll\n+ * subsystem perspective, regardless of raw lock bit.\n+ *\n+ * Return: TSPLL lock status\n+ */\n+static enum dpll_lock_status\n+ice_dpll_tspll_lock_status_get(struct ice_pf *pf, bool use_cached)\n+{\n+\tenum ice_clk_src clk_src;\n+\tbool locked;\n+\n+\tif (ice_tspll_get_clk_src(\u0026pf-\u003ehw, \u0026clk_src) ||\n+\t clk_src != ICE_CLK_SRC_TIME_REF)\n+\t\treturn DPLL_LOCK_STATUS_UNLOCKED;\n+\n+\tif (use_cached) {\n+\t\tlocked = READ_ONCE(pf-\u003eptp.tspll_locked);\n+\t} else {\n+\t\tbool lock_lost;\n+\n+\t\tif (ice_tspll_lost_lock_e825c(\u0026pf-\u003ehw, \u0026lock_lost))\n+\t\t\treturn DPLL_LOCK_STATUS_UNLOCKED;\n+\t\tlocked = !lock_lost;\n+\t}\n+\treturn locked ? DPLL_LOCK_STATUS_LOCKED : DPLL_LOCK_STATUS_UNLOCKED;\n+}\n+\n+/**\n+ * ice_dpll_tspll_state_on_dpll_get - get TIME_REF pin state on TSPLL DPLL\n+ * @pin: pointer to a pin\n+ * @pin_priv: private data pointer passed on pin registration\n+ * @dpll: registered dpll pointer\n+ * @dpll_priv: private data pointer passed on dpll registration\n+ * @state: on success holds pin state on parent dpll\n+ * @extack: error reporting\n+ *\n+ * Dpll subsystem callback. Returns CONNECTED if the TSPLL is using\n+ * TIME_REF as its clock source, DISCONNECTED otherwise.\n+ *\n+ * Return:\n+ * * 0 - success\n+ * * negative - failed to read clock source\n+ */\n+static int\n+ice_dpll_tspll_state_on_dpll_get(const struct dpll_pin *pin, void *pin_priv,\n+\t\t\t\t const struct dpll_device *dpll,\n+\t\t\t\t void *dpll_priv,\n+\t\t\t\t enum dpll_pin_state *state,\n+\t\t\t\t struct netlink_ext_ack *extack)\n+{\n+\tstruct ice_dpll_pin *p = pin_priv;\n+\tenum ice_clk_src clk_src;\n+\tint err;\n+\n+\tif (ice_dpll_is_reset(p-\u003epf, extack))\n+\t\treturn -EBUSY;\n+\n+\terr = ice_tspll_get_clk_src(\u0026p-\u003epf-\u003ehw, \u0026clk_src);\n+\tif (err)\n+\t\treturn err;\n+\n+\t*state = clk_src == ICE_CLK_SRC_TIME_REF ? DPLL_PIN_STATE_CONNECTED :\n+\t\t\t\t\t\t DPLL_PIN_STATE_DISCONNECTED;\n+\treturn 0;\n+}\n+\n+/**\n+ * ice_dpll_tspll_state_on_dpll_set - set TIME_REF pin state on TSPLL DPLL\n+ * @pin: pointer to a pin\n+ * @pin_priv: private data pointer passed on pin registration\n+ * @dpll: registered dpll pointer\n+ * @dpll_priv: private data pointer passed on dpll registration\n+ * @state: requested state of the pin\n+ * @extack: error reporting\n+ *\n+ * Dpll subsystem callback. Enables (CONNECTED) or disables (DISCONNECTED)\n+ * the TIME_REF signal as the TSPLL clock source. Selects TCXO when disabled.\n+ *\n+ * Return:\n+ * * 0 - success\n+ * * negative - error\n+ */\n+static int\n+ice_dpll_tspll_state_on_dpll_set(const struct dpll_pin *pin, void *pin_priv,\n+\t\t\t\t const struct dpll_device *dpll,\n+\t\t\t\t void *dpll_priv, enum dpll_pin_state state,\n+\t\t\t\t struct netlink_ext_ack *extack)\n+{\n+\tstruct ice_dpll_pin *p = pin_priv;\n+\tstruct ice_pf *pf = p-\u003epf;\n+\tenum ice_clk_src clk_src;\n+\tbool changed = false;\n+\tstruct ice_dpll *tp;\n+\tint ret;\n+\n+\tif (ice_dpll_is_reset(pf, extack))\n+\t\treturn -EBUSY;\n+\n+\tif (state != DPLL_PIN_STATE_CONNECTED \u0026\u0026\n+\t state != DPLL_PIN_STATE_DISCONNECTED) {\n+\t\tNL_SET_ERR_MSG(extack,\n+\t\t\t \"unsupported pin state for TSPLL reference clock\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tclk_src = (state == DPLL_PIN_STATE_CONNECTED) ? ICE_CLK_SRC_TIME_REF :\n+\t\t\t\t\t\t\tICE_CLK_SRC_TCXO;\n+\ttp = \u0026pf-\u003edplls.tspll;\n+\t/* Serialize multi-register TSPLL reconfiguration with restart path. */\n+\tmutex_lock(\u0026pf-\u003edplls.lock);\n+\tret = ice_tspll_set_cfg(\u0026pf-\u003ehw, ICE_TSPLL_FREQ_156_250, clk_src);\n+\tif (!ret || ret == -EAGAIN) {\n+\t\tenum dpll_lock_status new_state;\n+\n+\t\tnew_state = ice_dpll_tspll_lock_status_get(pf, false);\n+\n+\t\t/* Sync the cached lock state to what we just observed from HW\n+\t\t * so ice_dpll_periodic_work_e825() (cached path) does not emit\n+\t\t * a spurious UNLOCKED notification between now and the next\n+\t\t * PTP monitor tick.\n+\t\t */\n+\t\tWRITE_ONCE(pf-\u003eptp.tspll_locked,\n+\t\t\t new_state == DPLL_LOCK_STATUS_LOCKED);\n+\n+\t\tif (tp-\u003eprev_dpll_state != new_state) {\n+\t\t\ttp-\u003edpll_state = new_state;\n+\t\t\ttp-\u003eprev_dpll_state = new_state;\n+\t\t\tchanged = true;\n+\t\t}\n+\t}\n+\tmutex_unlock(\u0026pf-\u003edplls.lock);\n+\tif (changed)\n+\t\t__dpll_device_change_ntf(tp-\u003edpll);\n+\t/* TSPLL reconfiguration may complete before lock is reacquired.\n+\t * PTP periodic monitoring tracks and restores the final lock state.\n+\t */\n+\tif (ret == -EAGAIN)\n+\t\tret = 0;\n+\n+\treturn ret;\n+}\n+\n+static const struct dpll_pin_ops ice_dpll_tspll_in_ops = {\n+\t.state_on_dpll_set = ice_dpll_tspll_state_on_dpll_set,\n+\t.state_on_dpll_get = ice_dpll_tspll_state_on_dpll_get,\n+\t.direction_get = ice_dpll_input_direction,\n+};\n+\n static const struct dpll_pin_ops ice_dpll_pin_sma_ops = {\n \t.state_on_dpll_set = ice_dpll_sma_pin_state_set,\n \t.state_on_dpll_get = ice_dpll_sw_pin_state_get,\n@@ -2902,6 +3059,68 @@ static u64 ice_generate_clock_id(struct ice_pf *pf)\n \treturn pci_get_dsn(pf-\u003epdev);\n }\n \n+/**\n+ * ice_generate_dpll_clock_id - generate clock_id for a specific dpll device\n+ * @pf: board private structure\n+ * @d: dpll device context\n+ * @type: dpll type being registered\n+ *\n+ * For E825 generic DPLLs, use per-interface permanent MAC as the clock_id\n+ * basis so userspace can unambiguously map DPLL devices to interfaces.\n+ * TX-CLK keeps plain MAC-derived ID, while TSPLL uses the same basis with\n+ * a dedicated tag bit to remain distinct on source-timer owner PFs.\n+ * Other DPLL objects keep board-level DSN-derived clock_id.\n+ *\n+ * Return: generated clock id for a dpll device\n+ */\n+static u64 ice_generate_dpll_clock_id(struct ice_pf *pf, struct ice_dpll *d,\n+\t\t\t\t enum dpll_type type)\n+{\n+\tstruct ice_hw *hw = \u0026pf-\u003ehw;\n+\tu64 mac_clock_id;\n+\n+\tif (hw-\u003emac_type == ICE_MAC_GENERIC_3K_E825 \u0026\u0026\n+\t type == DPLL_TYPE_GENERIC \u0026\u0026\n+\t hw-\u003eport_info \u0026\u0026\n+\t is_valid_ether_addr(hw-\u003eport_info-\u003emac.perm_addr)) {\n+\t\tmac_clock_id = ether_addr_to_u64(hw-\u003eport_info-\u003emac.perm_addr);\n+\n+\t\tif (d-\u003edpll_idx \u003e= E825_DPLL_TXCLK_BASE_IDX)\n+\t\t\treturn mac_clock_id;\n+\n+\t\tif (d-\u003edpll_idx == E825_DPLL_TSPLL_BASE_IDX)\n+\t\t\treturn mac_clock_id | BIT_ULL(63);\n+\t}\n+\n+\treturn pf-\u003edplls.clock_id;\n+}\n+\n+/**\n+ * ice_dpll_is_own_dpll_clock_id - check if clock_id belongs to this pf's DPLLs\n+ * @pf: board private structure\n+ * @clock_id: clock_id from a DPLL notification\n+ *\n+ * Match info-\u003esrc_clock_id from a DPLL pin notification against any DPLL\n+ * device this PF has registered. Used to suppress self-notifications\n+ * generated as a side effect of our own dpll_pin_register() and\n+ * dpll_pin_unregister() calls on the fwnode-backed SYNCE and TIME_REF pins,\n+ * whose DPLLs (TXC and TSPLL) use MAC-derived clock_ids on E825.\n+ *\n+ * Return: true if clock_id matches one of this PF's registered DPLL devices.\n+ */\n+static bool ice_dpll_is_own_dpll_clock_id(struct ice_pf *pf, u64 clock_id)\n+{\n+\tif (clock_id == pf-\u003edplls.clock_id)\n+\t\treturn true;\n+\tif (pf-\u003ehw.mac_type != ICE_MAC_GENERIC_3K_E825)\n+\t\treturn false;\n+\tif (clock_id == ice_generate_dpll_clock_id(pf, \u0026pf-\u003edplls.txc,\n+\t\t\t\t\t\t DPLL_TYPE_GENERIC))\n+\t\treturn true;\n+\treturn clock_id == ice_generate_dpll_clock_id(pf, \u0026pf-\u003edplls.tspll,\n+\t\t\t\t\t\t DPLL_TYPE_GENERIC);\n+}\n+\n /**\n * ice_dpll_pin_ntf - notify pin change including any SW pin wrappers\n * @dplls: pointer to dplls struct\n@@ -3134,12 +3353,44 @@ ice_dpll_update_state(struct ice_pf *pf, struct ice_dpll *d, bool init)\n \treturn ret;\n }\n \n+/**\n+ * ice_dpll_periodic_work_e825 - TSPLL DPLL periodic update for E825\n+ * @pf: board private structure\n+ *\n+ * Publish TSPLL lock status to the dpll subsystem. The PTP periodic worker\n+ * owns TSPLL lock polling and recovery; this function consumes the cached\n+ * result for dpll notifications.\n+ *\n+ * Context: Must be called without pf-\u003edplls.lock held.\n+ */\n+static void ice_dpll_periodic_work_e825(struct ice_pf *pf)\n+{\n+\tstruct ice_dpll *tp = \u0026pf-\u003edplls.tspll;\n+\tenum dpll_lock_status new_state;\n+\tbool changed = false;\n+\n+\tmutex_lock(\u0026pf-\u003edplls.lock);\n+\tnew_state = ice_dpll_tspll_lock_status_get(pf, true);\n+\n+\tif (tp-\u003eprev_dpll_state != new_state) {\n+\t\ttp-\u003edpll_state = new_state;\n+\t\ttp-\u003eprev_dpll_state = new_state;\n+\t\tchanged = true;\n+\t}\n+\tmutex_unlock(\u0026pf-\u003edplls.lock);\n+\tif (changed)\n+\t\tdpll_device_change_ntf(tp-\u003edpll);\n+}\n+\n /**\n * ice_dpll_periodic_work - DPLLs periodic worker\n * @work: pointer to kthread_work structure\n *\n- * DPLLs periodic worker is responsible for polling state of dpll.\n- * Context: Holds pf-\u003edplls.lock\n+ * Periodic worker responsible for polling DPLL state. On E810 devices it\n+ * polls the EEC and PPS DPLLs. On E825 devices, when this PF owns the\n+ * source timer, it publishes TSPLL lock status to the dpll subsystem.\n+ *\n+ * Context: Acquires and releases pf-\u003edplls.lock\n */\n static void ice_dpll_periodic_work(struct kthread_work *work)\n {\n@@ -3147,38 +3398,43 @@ static void ice_dpll_periodic_work(struct kthread_work *work)\n \tstruct ice_pf *pf = container_of(d, struct ice_pf, dplls);\n \tstruct ice_dpll *de = \u0026pf-\u003edplls.eec;\n \tstruct ice_dpll *dp = \u0026pf-\u003edplls.pps;\n-\tu32 phase_offset_ntf = 0;\n+\tu32 ntf_mask = 0;\n \tint ret = 0;\n \n \tif (ice_is_reset_in_progress(pf-\u003estate))\n \t\tgoto resched;\n-\tmutex_lock(\u0026pf-\u003edplls.lock);\n-\td-\u003eperiodic_counter++;\n-\tret = ice_dpll_update_state(pf, de, false);\n-\tif (!ret)\n-\t\tret = ice_dpll_update_state(pf, dp, false);\n-\tif (!ret \u0026\u0026 dp-\u003ephase_offset_monitor_period \u0026\u0026\n-\t d-\u003eperiodic_counter % dp-\u003ephase_offset_monitor_period == 0)\n-\t\tret = ice_dpll_pps_update_phase_offsets(pf, \u0026phase_offset_ntf);\n-\tif (ret) {\n-\t\t/* EBUSY is expected during reset recovery */\n-\t\tif (pf-\u003ehw.adminq.sq_last_status != LIBIE_AQ_RC_EBUSY)\n-\t\t\td-\u003ecgu_state_acq_err_num++;\n-\t\t/* stop rescheduling this worker */\n-\t\tif (d-\u003ecgu_state_acq_err_num \u003e\n-\t\t ICE_CGU_STATE_ACQ_ERR_THRESHOLD) {\n-\t\t\tdev_err(ice_pf_to_dev(pf),\n-\t\t\t\t\"EEC/PPS DPLLs periodic work disabled\\n\");\n-\t\t\tmutex_unlock(\u0026pf-\u003edplls.lock);\n-\t\t\treturn;\n+\n+\tif (pf-\u003ehw.mac_type == ICE_MAC_GENERIC_3K_E825) {\n+\t\tice_dpll_periodic_work_e825(pf);\n+\t} else {\n+\t\tmutex_lock(\u0026pf-\u003edplls.lock);\n+\t\td-\u003eperiodic_counter++;\n+\t\tret = ice_dpll_update_state(pf, de, false);\n+\t\tif (!ret)\n+\t\t\tret = ice_dpll_update_state(pf, dp, false);\n+\t\tif (!ret \u0026\u0026 dp-\u003ephase_offset_monitor_period \u0026\u0026\n+\t\t d-\u003eperiodic_counter % dp-\u003ephase_offset_monitor_period == 0)\n+\t\t\tret = ice_dpll_pps_update_phase_offsets(pf, \u0026ntf_mask);\n+\t\tif (ret) {\n+\t\t\t/* EBUSY is expected during reset recovery */\n+\t\t\tif (pf-\u003ehw.adminq.sq_last_status != LIBIE_AQ_RC_EBUSY)\n+\t\t\t\td-\u003ecgu_state_acq_err_num++;\n+\t\t\t/* stop rescheduling this worker */\n+\t\t\tif (d-\u003ecgu_state_acq_err_num \u003e\n+\t\t\t ICE_CGU_STATE_ACQ_ERR_THRESHOLD) {\n+\t\t\t\tdev_err(ice_pf_to_dev(pf),\n+\t\t\t\t\t\"EEC/PPS DPLLs periodic work disabled\\n\");\n+\t\t\t\tmutex_unlock(\u0026pf-\u003edplls.lock);\n+\t\t\t\treturn;\n+\t\t\t}\n \t\t}\n+\t\tmutex_unlock(\u0026pf-\u003edplls.lock);\n+\t\tice_dpll_notify_changes(de);\n+\t\tice_dpll_notify_changes(dp);\n+\t\tif (ntf_mask)\n+\t\t\tice_dpll_pins_notify_mask(d, d-\u003einputs, d-\u003enum_inputs,\n+\t\t\t\t\t\t ntf_mask);\n \t}\n-\tmutex_unlock(\u0026pf-\u003edplls.lock);\n-\tice_dpll_notify_changes(de);\n-\tice_dpll_notify_changes(dp);\n-\tif (phase_offset_ntf)\n-\t\tice_dpll_pins_notify_mask(d, d-\u003einputs, d-\u003enum_inputs,\n-\t\t\t\t\t phase_offset_ntf);\n \n resched:\n \t/* Run twice a second or reschedule if update failed */\n@@ -3536,6 +3792,7 @@ static void ice_dpll_pin_notify_work(struct work_struct *work)\n \t\t\t\t\t\t work);\n \tstruct ice_dpll_pin *pin, *parent = w-\u003epin;\n \tbool is_tx_synce_parent = false;\n+\tbool is_tspll_time_ref = false;\n \tstruct ice_pf *pf = parent-\u003epf;\n \tbool is_rclk_parent = false;\n \tint ret;\n@@ -3556,7 +3813,11 @@ static void ice_dpll_pin_notify_work(struct work_struct *work)\n \tis_tx_synce_parent =\n \t\tice_dpll_fwnode_eq(parent-\u003efwnode,\n \t\t\t\t pf-\u003edplls.txclks[E825_EXT_SYNCE_PIN_IDX].fwnode);\n-\tif (!is_rclk_parent \u0026\u0026 !is_tx_synce_parent)\n+\n+\tis_tspll_time_ref =\n+\t\tice_dpll_fwnode_eq(parent-\u003efwnode, pf-\u003edplls.tspll_in.fwnode);\n+\n+\tif (!is_rclk_parent \u0026\u0026 !is_tx_synce_parent \u0026\u0026 !is_tspll_time_ref)\n \t\tgoto out;\n \n \tswitch (w-\u003eaction) {\n@@ -3597,6 +3858,18 @@ static void ice_dpll_pin_notify_work(struct work_struct *work)\n \t\t\t\t\tERR_PTR(ret));\n \t\t\t\tgoto drop_parent_ref;\n \t\t\t}\n+\t\t} else if (is_tspll_time_ref) {\n+\t\t\t/* Register TIME_REF pin directly to TSPLL DPLL */\n+\t\t\tret = dpll_pin_register(pf-\u003edplls.tspll.dpll,\n+\t\t\t\t\t\tparent-\u003epin,\n+\t\t\t\t\t\t\u0026ice_dpll_tspll_in_ops,\n+\t\t\t\t\t\tparent);\n+\t\t\tif (ret) {\n+\t\t\t\tdev_err(ice_pf_to_dev(pf),\n+\t\t\t\t\t\"TSPLL TIME_REF pin register failed: %pe\\n\",\n+\t\t\t\t\tERR_PTR(ret));\n+\t\t\t\tgoto drop_parent_ref;\n+\t\t\t}\n \t\t}\n \t\tbreak;\n \tcase DPLL_PIN_DELETED:\n@@ -3615,6 +3888,11 @@ static void ice_dpll_pin_notify_work(struct work_struct *work)\n \t\t\tpin = \u0026pf-\u003edplls.txclks[E825_EXT_SYNCE_PIN_IDX];\n \t\t\tdpll_pin_unregister(pf-\u003edplls.txc.dpll, pin-\u003epin,\n \t\t\t\t\t \u0026ice_dpll_txclk_ops, pin);\n+\t\t} else if (is_tspll_time_ref) {\n+\t\t\t/* Unregister TIME_REF pin from TSPLL DPLL */\n+\t\t\tdpll_pin_unregister(pf-\u003edplls.tspll.dpll,\n+\t\t\t\t\t parent-\u003epin,\n+\t\t\t\t\t \u0026ice_dpll_tspll_in_ops, parent);\n \t\t}\n drop_parent_ref:\n \t\t/* Drop fwnode pin reference */\n@@ -3642,10 +3920,12 @@ static int ice_dpll_pin_notify(struct notifier_block *nb, unsigned long action,\n \tif (pin-\u003efwnode != info-\u003efwnode)\n \t\treturn NOTIFY_DONE; /* Not this pin */\n \n-\t/* Ignore notification which are the outcome of internal pin\n-\t * registration/unregistration calls - synce pin case.\n+\t/* Ignore notifications that are a side effect of internal pin\n+\t * registration/unregistration calls. E825 uses per-device\n+\t * MAC-derived clock_ids for the TXC and TSPLL generic DPLLs, so\n+\t * info-\u003esrc_clock_id may not equal pf-\u003edplls.clock_id.\n \t */\n-\tif (info-\u003esrc_clock_id == pin-\u003epf-\u003edplls.clock_id)\n+\tif (ice_dpll_is_own_dpll_clock_id(pin-\u003epf, info-\u003esrc_clock_id))\n \t\treturn NOTIFY_DONE;\n \n \twork = kzalloc_obj(*work);\n@@ -3786,12 +4066,12 @@ ice_dpll_deinit_fwnode_pins(struct ice_pf *pf, struct ice_dpll_pin *pins,\n \tdestroy_workqueue(pf-\u003edplls.wq);\n }\n \n-static int ice_dpll_deinit_txclk_pins(struct ice_pf *pf)\n+static int ice_dpll_deinit_txclk_pins(struct ice_pf *pf, bool flush)\n {\n \tstruct ice_dpll_pin *synce_pin = \u0026pf-\u003edplls.txclks[E825_EXT_SYNCE_PIN_IDX];\n \tstruct ice_dpll *dt = \u0026pf-\u003edplls.txc;\n \n-\tice_dpll_stop_fwnode_pin_activity(synce_pin, true);\n+\tice_dpll_stop_fwnode_pin_activity(synce_pin, flush);\n \tice_dpll_unregister_pins(dt-\u003edpll, pf-\u003edplls.txclks,\n \t\t\t\t \u0026ice_dpll_txclk_ops,\n \t\t\t\t ARRAY_SIZE(pf-\u003edplls.txclks));\n@@ -3806,6 +4086,25 @@ static int ice_dpll_deinit_txclk_pins(struct ice_pf *pf)\n \treturn 0;\n }\n \n+/**\n+ * ice_dpll_deinit_tspll_pins - deinitialize TSPLL fwnode pin\n+ * @pf: board private structure\n+ *\n+ * Stop notifier activity and release the TIME_REF fwnode pin, unregistering\n+ * it from the TSPLL DPLL if it was registered.\n+ */\n+static void ice_dpll_deinit_tspll_pins(struct ice_pf *pf)\n+{\n+\tstruct ice_dpll_pin *time_ref = \u0026pf-\u003edplls.tspll_in;\n+\tstruct ice_dpll *tp = \u0026pf-\u003edplls.tspll;\n+\n+\tice_dpll_stop_fwnode_pin_activity(time_ref, true);\n+\tif (!IS_ERR_OR_NULL(time_ref-\u003epin))\n+\t\tdpll_pin_unregister(tp-\u003edpll, time_ref-\u003epin,\n+\t\t\t\t \u0026ice_dpll_tspll_in_ops, time_ref);\n+\tice_dpll_release_fwnode_pin(time_ref);\n+}\n+\n /**\n * ice_dpll_deinit_pins - deinitialize direct pins\n * @pf: board private structure\n@@ -3826,7 +4125,10 @@ static void ice_dpll_deinit_pins(struct ice_pf *pf, bool cgu)\n \n \tice_dpll_deinit_rclk_pin(pf);\n \tif (pf-\u003ehw.mac_type == ICE_MAC_GENERIC_3K_E825) {\n-\t\tice_dpll_deinit_txclk_pins(pf);\n+\t\tif (ice_pf_src_tmr_owned(pf) \u0026\u0026\n+\t\t test_bit(ICE_FLAG_PTP_SUPPORTED, pf-\u003eflags))\n+\t\t\tice_dpll_deinit_tspll_pins(pf);\n+\t\tice_dpll_deinit_txclk_pins(pf, true);\n \t\tice_dpll_deinit_fwnode_pins(pf, pf-\u003edplls.inputs, 0);\n \t}\n \tif (cgu) {\n@@ -3968,10 +4270,16 @@ static int ice_dpll_init_txclk_pins(struct ice_pf *pf, int start_idx)\n {\n \tstruct ice_dpll_pin *ref_pin = pf-\u003edplls.txclks;\n \tstruct ice_dpll *txc = \u0026pf-\u003edplls.txc;\n+\tu64 clock_id;\n \tint ret;\n \n+\t/* EXT_EREF0 is a non-fwnode pin; its clock_id must match the TX-CLK\n+\t * DPLL device clock_id (see dpll_pin_register()).\n+\t */\n+\tclock_id = ice_generate_dpll_clock_id(pf, txc, DPLL_TYPE_GENERIC);\n+\n \t/* Configure EXT_EREF0 pin */\n-\tret = ice_dpll_get_pins(pf, ref_pin, start_idx, 1, pf-\u003edplls.clock_id);\n+\tret = ice_dpll_get_pins(pf, ref_pin, start_idx, 1, clock_id);\n \tif (ret)\n \t\treturn ret;\n \tret = dpll_pin_register(txc-\u003edpll, ref_pin-\u003epin, \u0026ice_dpll_txclk_ops,\n@@ -4022,6 +4330,45 @@ static int ice_dpll_init_txclk_pins(struct ice_pf *pf, int start_idx)\n \treturn ret;\n }\n \n+/**\n+ * ice_dpll_init_tspll_pins - init and register TSPLL TIME_REF fwnode pin\n+ * @pf: board private structure\n+ *\n+ * Initialize the fwnode-based TIME_REF input pin for the TSPLL DPLL on E825.\n+ * If the pin is not yet available in the dpll subsystem, registration will\n+ * be deferred via the notifier path.\n+ *\n+ * Return:\n+ * * 0 - success\n+ * * negative - initialization failure reason\n+ */\n+static int ice_dpll_init_tspll_pins(struct ice_pf *pf)\n+{\n+\tstruct ice_dpll_pin *time_ref = \u0026pf-\u003edplls.tspll_in;\n+\tstruct ice_dpll *tp = \u0026pf-\u003edplls.tspll;\n+\tint ret;\n+\n+\ttime_ref-\u003epf = pf;\n+\tret = ice_dpll_init_fwnode_pin(time_ref, ice_dpll_fwnode_time_ref);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tif (IS_ERR_OR_NULL(time_ref-\u003epin)) {\n+\t\tdev_dbg(ice_pf_to_dev(pf),\n+\t\t\t\"TSPLL TIME_REF pin not registered yet\\n\");\n+\t\treturn 0;\n+\t}\n+\n+\tret = dpll_pin_register(tp-\u003edpll, time_ref-\u003epin,\n+\t\t\t\t\u0026ice_dpll_tspll_in_ops, time_ref);\n+\tif (ret) {\n+\t\tice_dpll_stop_fwnode_pin_activity(time_ref, false);\n+\t\tice_dpll_release_fwnode_pin(time_ref);\n+\t}\n+\n+\treturn ret;\n+}\n+\n /**\n * ice_dpll_init_pins_e825 - init pins and register pins with a dplls\n * @pf: board private structure\n@@ -4049,8 +4396,24 @@ static int ice_dpll_init_pins_e825(struct ice_pf *pf)\n \t\tgoto unregister_pins;\n \n \tret = ice_dpll_init_txclk_pins(pf, 0);\n-\tif (ret)\n+\tif (ret) {\n \t\tice_dpll_deinit_rclk_pin(pf);\n+\t\tgoto unregister_pins;\n+\t}\n+\n+\tif (ice_pf_src_tmr_owned(pf) \u0026\u0026\n+\t test_bit(ICE_FLAG_PTP_SUPPORTED, pf-\u003eflags)) {\n+\t\tret = ice_dpll_init_tspll_pins(pf);\n+\t\tif (ret) {\n+\t\t\t/* Avoid flushing pf-\u003edplls.wq here: notifier work\n+\t\t\t * items block on pf-\u003edplls.dpll_init which is\n+\t\t\t * completed by the unregister_pins path below.\n+\t\t\t * destroy_workqueue() there drains queued items.\n+\t\t\t */\n+\t\t\tice_dpll_deinit_txclk_pins(pf, false);\n+\t\t\tice_dpll_deinit_rclk_pin(pf);\n+\t\t}\n+\t}\n \n unregister_pins:\n \tif (ret) {\n@@ -4194,7 +4557,7 @@ static int\n ice_dpll_init_dpll(struct ice_pf *pf, struct ice_dpll *d, bool cgu,\n \t\t enum dpll_type type)\n {\n-\tu64 clock_id = pf-\u003edplls.clock_id;\n+\tu64 clock_id = ice_generate_dpll_clock_id(pf, d, type);\n \tint ret;\n \n \td-\u003edpll = dpll_device_get(clock_id, d-\u003edpll_idx, THIS_MODULE,\n@@ -4237,6 +4600,7 @@ static void ice_dpll_deinit_worker(struct ice_pf *pf)\n \n \tkthread_cancel_delayed_work_sync(\u0026d-\u003ework);\n \tkthread_destroy_worker(d-\u003ekworker);\n+\td-\u003ekworker = NULL;\n }\n \n /**\n@@ -4673,6 +5037,7 @@ static void ice_dpll_deinit_info(struct ice_pf *pf)\n static int ice_dpll_init_info_e825c(struct ice_pf *pf)\n {\n \tstruct ice_dplls *d = \u0026pf-\u003edplls;\n+\tstruct ice_dpll *tp = \u0026d-\u003etspll;\n \tstruct ice_dpll *dt = \u0026d-\u003etxc;\n \tint ret = 0;\n \tint i;\n@@ -4681,7 +5046,11 @@ static int ice_dpll_init_info_e825c(struct ice_pf *pf)\n \td-\u003enum_inputs = ICE_SYNCE_CLK_NUM;\n \tdt-\u003edpll_state = ice_txclk_lock_status(pf-\u003eptp.port.tx_clk);\n \tdt-\u003emode = DPLL_MODE_MANUAL;\n-\tdt-\u003edpll_idx = pf-\u003eptp.port.port_num;\n+\tdt-\u003edpll_idx = E825_DPLL_TXCLK_BASE_IDX + pf-\u003eptp.port.port_num;\n+\ttp-\u003edpll_state = ice_dpll_tspll_lock_status_get(pf, false);\n+\ttp-\u003eprev_dpll_state = tp-\u003edpll_state;\n+\ttp-\u003emode = DPLL_MODE_MANUAL;\n+\ttp-\u003edpll_idx = E825_DPLL_TSPLL_BASE_IDX;\n \n \td-\u003einputs = kzalloc_objs(*d-\u003einputs, d-\u003enum_inputs);\n \tif (!d-\u003einputs)\n@@ -4824,7 +5193,8 @@ static int ice_dpll_init_info(struct ice_pf *pf, bool cgu)\n * resources and unregistering the dpll, pin and all resources used for\n * handling them.\n *\n- * Context: Destroys pf-\u003edplls.lock mutex. Call only if ICE_FLAG_DPLL was set.\n+ * Context: Call only if ICE_FLAG_DPLL was set. pf-\u003edplls.lock lifetime is\n+ * managed by ice_init_features()/ice_deinit_features().\n */\n void ice_dpll_deinit(struct ice_pf *pf)\n {\n@@ -4848,7 +5218,7 @@ void ice_dpll_deinit(struct ice_pf *pf)\n \t\tup_write(\u0026pf-\u003edplls.txclk_notify_rwsem);\n \t}\n \n-\tif (cgu)\n+\tif (pf-\u003edplls.kworker)\n \t\tice_dpll_deinit_worker(pf);\n \n \tif (pf-\u003ehw.mac_type == ICE_MAC_GENERIC_3K_E825)\n@@ -4861,9 +5231,10 @@ void ice_dpll_deinit(struct ice_pf *pf)\n \t\tice_dpll_deinit_dpll(pf, \u0026pf-\u003edplls.eec, cgu);\n \tif (!IS_ERR_OR_NULL(pf-\u003edplls.txc.dpll))\n \t\tice_dpll_deinit_dpll(pf, \u0026pf-\u003edplls.txc, false);\n+\tif (!IS_ERR_OR_NULL(pf-\u003edplls.tspll.dpll))\n+\t\tice_dpll_deinit_dpll(pf, \u0026pf-\u003edplls.tspll, false);\n \n \tice_dpll_deinit_info(pf);\n-\tmutex_destroy(\u0026pf-\u003edplls.lock);\n }\n \n /**\n@@ -4873,8 +5244,6 @@ void ice_dpll_deinit(struct ice_pf *pf)\n * Set up the device dplls, register them and pins connected within Linux dpll\n * subsystem. Allow userspace to obtain state of DPLL and handling of DPLL\n * configuration requests.\n- *\n- * Context: Initializes pf-\u003edplls.lock mutex.\n */\n static void ice_dpll_init_e825(struct ice_pf *pf)\n {\n@@ -4892,7 +5261,6 @@ static void ice_dpll_init_e825(struct ice_pf *pf)\n \t\t\tpf-\u003eptp.port.port_num = pf-\u003ehw.lane_num;\n \t}\n \n-\tmutex_init(\u0026d-\u003elock);\n \t/* Initialize the txclk worker and its notification rwsem before any\n \t * code path can fail: ice_dpll_deinit() runs unconditionally on\n \t * failure and calls cancel_work_sync() / down_write() on these.\n@@ -4904,9 +5272,30 @@ static void ice_dpll_init_e825(struct ice_pf *pf)\n \terr = ice_dpll_init_info_e825c(pf);\n \tif (err)\n \t\tgoto err_exit;\n+\tif (ice_pf_src_tmr_owned(pf) \u0026\u0026\n+\t test_bit(ICE_FLAG_PTP_SUPPORTED, pf-\u003eflags)) {\n+\t\terr = ice_dpll_init_dpll(pf, \u0026pf-\u003edplls.tspll, false,\n+\t\t\t\t\t DPLL_TYPE_GENERIC);\n+\t\tif (err)\n+\t\t\tgoto deinit_info;\n+\t\t/* Start the periodic worker before registering fwnode pins. The\n+\t\t * fwnode notifier path (ice_dpll_pin_notify_work()) blocks on\n+\t\t * pf-\u003edplls.dpll_init, which is only signalled on the success\n+\t\t * return below. Starting the worker before any fwnode notifier\n+\t\t * is registered means a subsequent init failure cannot leave\n+\t\t * notifier work items queued on pf-\u003edplls.wq, so the deinit\n+\t\t * flush_workqueue() paths in ice_dpll_deinit_pins() cannot\n+\t\t * deadlock. The E825 periodic worker only touches\n+\t\t * pf-\u003edplls.tspll (already registered above) and pf-\u003eptp state,\n+\t\t * so it is safe to run before pins.\n+\t\t */\n+\t\terr = ice_dpll_init_worker(pf);\n+\t\tif (err)\n+\t\t\tgoto deinit_tspll;\n+\t}\n \terr = ice_dpll_init_dpll(pf, \u0026pf-\u003edplls.txc, false, DPLL_TYPE_GENERIC);\n \tif (err)\n-\t\tgoto deinit_info;\n+\t\tgoto deinit_worker;\n \terr = ice_dpll_init_pins_e825(pf);\n \tif (err)\n \t\tgoto deinit_txclk;\n@@ -4917,10 +5306,15 @@ static void ice_dpll_init_e825(struct ice_pf *pf)\n \n deinit_txclk:\n \tice_dpll_deinit_dpll(pf, \u0026pf-\u003edplls.txc, false);\n+deinit_worker:\n+\tif (pf-\u003edplls.kworker)\n+\t\tice_dpll_deinit_worker(pf);\n+deinit_tspll:\n+\tif (!IS_ERR_OR_NULL(pf-\u003edplls.tspll.dpll))\n+\t\tice_dpll_deinit_dpll(pf, \u0026pf-\u003edplls.tspll, false);\n deinit_info:\n \tice_dpll_deinit_info(pf);\n err_exit:\n-\tmutex_destroy(\u0026d-\u003elock);\n \tdev_warn(ice_pf_to_dev(pf), \"DPLLs init failure err:%d\\n\", err);\n }\n \n@@ -4931,16 +5325,12 @@ static void ice_dpll_init_e825(struct ice_pf *pf)\n * Set up the device dplls, register them and pins connected within Linux dpll\n * subsystem. Allow userspace to obtain state of DPLL and handling of DPLL\n * configuration requests.\n- *\n- * Context: Initializes pf-\u003edplls.lock mutex.\n */\n static void ice_dpll_init_e810(struct ice_pf *pf)\n {\n \tbool cgu = ice_is_feature_supported(pf, ICE_F_CGU);\n-\tstruct ice_dplls *d = \u0026pf-\u003edplls;\n \tint err = 0;\n \n-\tmutex_init(\u0026d-\u003elock);\n \terr = ice_dpll_init_info(pf, cgu);\n \tif (err)\n \t\tgoto err_exit;\n@@ -4971,7 +5361,6 @@ static void ice_dpll_init_e810(struct ice_pf *pf)\n deinit_info:\n \tice_dpll_deinit_info(pf);\n err_exit:\n-\tmutex_destroy(\u0026d-\u003elock);\n \tdev_warn(ice_pf_to_dev(pf), \"DPLLs init failure err:%d\\n\", err);\n }\n \ndiff --git a/drivers/net/ethernet/intel/ice/ice_dpll.h b/drivers/net/ethernet/intel/ice/ice_dpll.h\nindex 103ba3e490682..bce0bea9a664b 100644\n--- a/drivers/net/ethernet/intel/ice/ice_dpll.h\n+++ b/drivers/net/ethernet/intel/ice/ice_dpll.h\n@@ -133,10 +133,12 @@ struct ice_dpll {\n * @eec: pointer to EEC dpll dev\n * @pps: pointer to PPS dpll dev\n * @txc: pointer to TXC dpll dev\n+ * @tspll: pointer to TSPLL dpll dev (E825 only)\n * @inputs: input pins pointer\n * @outputs: output pins pointer\n * @rclk: recovered pins pointer\n * @txclks: TX clock reference pins pointer\n+ * @tspll_in: TSPLL TIME_REF fwnode input pin (E825 only)\n * @num_inputs: number of input pins available on dpll\n * @num_outputs: number of output pins available on dpll\n * @cgu_state_acq_err_num: number of errors returned during periodic work\n@@ -177,12 +179,14 @@ struct ice_dplls {\n \tstruct ice_dpll eec;\n \tstruct ice_dpll pps;\n \tstruct ice_dpll txc;\n+\tstruct ice_dpll tspll;\n \tstruct ice_dpll_pin *inputs;\n \tstruct ice_dpll_pin *outputs;\n \tstruct ice_dpll_pin sma[ICE_DPLL_PIN_SW_NUM];\n \tstruct ice_dpll_pin ufl[ICE_DPLL_PIN_SW_NUM];\n \tstruct ice_dpll_pin rclk;\n \tstruct ice_dpll_pin txclks[ICE_DPLL_TXCLK_NUM_MAX];\n+\tstruct ice_dpll_pin tspll_in;\n \tu8 num_inputs;\n \tu8 num_outputs;\n \tu8 sma_data;\ndiff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c\nindex d88835482d3aa..2f372dd37b534 100644\n--- a/drivers/net/ethernet/intel/ice/ice_main.c\n+++ b/drivers/net/ethernet/intel/ice/ice_main.c\n@@ -4725,6 +4725,14 @@ static void ice_init_features(struct ice_pf *pf)\n \tif (ice_is_safe_mode(pf))\n \t\treturn;\n \n+\t/* pf-\u003edplls.lock guards TSPLL/CGU access shared between the DPLL\n+\t * subsystem callbacks and the PTP periodic worker's TSPLL monitor.\n+\t * Initialize it before ice_ptp_init() so the PTP kworker never sees\n+\t * an uninitialized mutex, and destroy it in ice_deinit_features()\n+\t * only after ice_ptp_release() has drained the kworker.\n+\t */\n+\tmutex_init(\u0026pf-\u003edplls.lock);\n+\n \t/* initialize DDP driven features */\n \tif (test_bit(ICE_FLAG_PTP_SUPPORTED, pf-\u003eflags))\n \t\tice_ptp_init(pf);\n@@ -4769,6 +4777,7 @@ static void ice_deinit_features(struct ice_pf *pf)\n \t\tice_ptp_release(pf);\n \tif (test_bit(ICE_FLAG_DPLL, pf-\u003eflags))\n \t\tice_dpll_deinit(pf);\n+\tmutex_destroy(\u0026pf-\u003edplls.lock);\n \tif (pf-\u003eeswitch_mode == DEVLINK_ESWITCH_MODE_SWITCHDEV)\n \t\txa_destroy(\u0026pf-\u003eeswitch.reprs);\n \tice_hwmon_exit(pf);\ndiff --git a/drivers/net/ethernet/intel/ice/ice_ptp.c b/drivers/net/ethernet/intel/ice/ice_ptp.c\nindex eaec36ab6ae3f..e54a98a0bdd08 100644\n--- a/drivers/net/ethernet/intel/ice/ice_ptp.c\n+++ b/drivers/net/ethernet/intel/ice/ice_ptp.c\n@@ -4,8 +4,11 @@\n #include \"ice.h\"\n #include \"ice_lib.h\"\n #include \"ice_trace.h\"\n+#include \"ice_tspll.h\"\n #include \"ice_txclk.h\"\n \n+#define ICE_TSPLL_LOG_INTERVAL\t\t120\n+\n static const char ice_pin_names[][64] = {\n \t\"SDP0\",\n \t\"SDP1\",\n@@ -2849,6 +2852,79 @@ static void ice_ptp_maybe_trigger_tx_interrupt(struct ice_pf *pf)\n \t}\n }\n \n+/**\n+ * ice_ptp_tspll_monitor - poll and recover TSPLL lock on E825 owner PFs\n+ * @pf: Board private structure\n+ *\n+ * Called from the PTP periodic worker. On E825 devices that own the source\n+ * timer, poll the TSPLL lock status via CGU registers and trigger a restart\n+ * if the lock has been lost. The result is cached in @pf-\u003eptp.tspll_locked\n+ * so it can be consumed by the DPLL periodic worker via READ_ONCE().\n+ *\n+ * TSPLL lock is critical for PHC operation and must be monitored regardless\n+ * of whether DPLL init succeeded or CONFIG_DPLL is enabled. Placing the\n+ * monitor here makes recovery independent of the dpll subsystem.\n+ *\n+ * AQ read errors are rate-limited and do not stop monitoring. Lock-lost\n+ * events are logged every 120 retries (~60 s at normal poll rate) to\n+ * surface persistent failures without flooding the log.\n+ */\n+static void ice_ptp_tspll_monitor(struct ice_pf *pf)\n+{\n+\tbool lock_lost;\n+\tint err;\n+\n+\tif (pf-\u003ehw.mac_type != ICE_MAC_GENERIC_3K_E825 ||\n+\t !ice_pf_src_tmr_owned(pf))\n+\t\treturn;\n+\n+\t/* Serialize the entire monitor tick against TSPLL userspace reconfig\n+\t * (ice_dpll_tspll_state_on_dpll_set()). Both paths read HW state and\n+\t * write pf-\u003eptp.tspll_locked; without holding pf-\u003edplls.lock across\n+\t * the HW read here, a preempted monitor could observe stale HW state\n+\t * and then overwrite an accurate cache update from the DPLL callback.\n+\t * pf-\u003edplls.lock is initialized in ice_init_features() before the PTP\n+\t * kworker starts and destroyed in ice_deinit_features() only after\n+\t * ice_ptp_release() has drained the kworker, so it is always valid.\n+\t */\n+\tmutex_lock(\u0026pf-\u003edplls.lock);\n+\terr = ice_tspll_lost_lock_e825c(\u0026pf-\u003ehw, \u0026lock_lost);\n+\tif (err) {\n+\t\tmutex_unlock(\u0026pf-\u003edplls.lock);\n+\t\tdev_err_ratelimited(ice_pf_to_dev(pf),\n+\t\t\t\t \"Failed reading TimeSync PLL lock status (err: %d). Retrying.\\n\",\n+\t\t\t\t err);\n+\t\treturn;\n+\t}\n+\n+\tif (lock_lost) {\n+\t\tWRITE_ONCE(pf-\u003eptp.tspll_locked, false);\n+\t\tif (!(pf-\u003eptp.tspll_lock_retries % ICE_TSPLL_LOG_INTERVAL))\n+\t\t\tdev_warn(ice_pf_to_dev(pf),\n+\t\t\t\t \"TimeSync PLL lock lost. Retrying to acquire lock.\\n\");\n+\t\terr = ice_tspll_restart_e825c(\u0026pf-\u003ehw);\n+\t\tif (err)\n+\t\t\tdev_err_ratelimited(ice_pf_to_dev(pf),\n+\t\t\t\t\t \"Failed to restart TimeSync PLL (err: %d).\\n\",\n+\t\t\t\t\t err);\n+\t\tpf-\u003eptp.tspll_lock_retries++;\n+\t} else {\n+\t\tif (pf-\u003eptp.tspll_lock_retries) {\n+\t\t\tconst char *src_str = \"unknown\";\n+\t\t\tenum ice_clk_src clk_src;\n+\n+\t\t\tif (!ice_tspll_get_clk_src(\u0026pf-\u003ehw, \u0026clk_src))\n+\t\t\t\tsrc_str = ice_tspll_clk_src_str(clk_src);\n+\t\t\tdev_info(ice_pf_to_dev(pf),\n+\t\t\t\t \"TimeSync PLL lock acquired with %s clock source after %u retries.\\n\",\n+\t\t\t\t src_str, pf-\u003eptp.tspll_lock_retries);\n+\t\t}\n+\t\tWRITE_ONCE(pf-\u003eptp.tspll_locked, true);\n+\t\tpf-\u003eptp.tspll_lock_retries = 0;\n+\t}\n+\tmutex_unlock(\u0026pf-\u003edplls.lock);\n+}\n+\n static void ice_ptp_periodic_work(struct kthread_work *work)\n {\n \tstruct ice_ptp *ptp = container_of(work, struct ice_ptp, work.work);\n@@ -2858,6 +2934,8 @@ static void ice_ptp_periodic_work(struct kthread_work *work)\n \tif (pf-\u003eptp.state != ICE_PTP_READY)\n \t\treturn;\n \n+\tice_ptp_tspll_monitor(pf);\n+\n \terr = ice_ptp_update_cached_phctime(pf);\n \n \tice_ptp_maybe_trigger_tx_interrupt(pf);\n@@ -2975,6 +3053,9 @@ static int ice_ptp_rebuild_owner(struct ice_pf *pf)\n \terr = ice_tspll_init(hw);\n \tif (err)\n \t\treturn err;\n+\t/* Rebuild reinitialized TSPLL, so reset monitor retry state. */\n+\tWRITE_ONCE(ptp-\u003etspll_locked, true);\n+\tptp-\u003etspll_lock_retries = 0;\n \n \t/* Acquire the global hardware lock */\n \tif (!ice_ptp_lock(hw)) {\n@@ -3319,6 +3400,7 @@ void ice_ptp_init(struct ice_pf *pf)\n \t}\n \tptp-\u003eport.port_num = hw-\u003elane_num;\n \n+\tptp-\u003etspll_locked = true;\n \tice_ptp_init_hw(hw);\n \n \tice_ptp_init_tx_interrupt_mode(pf);\ndiff --git a/drivers/net/ethernet/intel/ice/ice_ptp.h b/drivers/net/ethernet/intel/ice/ice_ptp.h\nindex c4b0da7ce20ed..0e40fef3b4e8a 100644\n--- a/drivers/net/ethernet/intel/ice/ice_ptp.h\n+++ b/drivers/net/ethernet/intel/ice/ice_ptp.h\n@@ -249,6 +249,15 @@ struct ice_ptp_pin_desc {\n * @tx_hwtstamp_discarded: number of Tx skbs discarded due to cached PHC time\n * being too old to correctly extend timestamp\n * @late_cached_phc_updates: number of times cached PHC update is late\n+ * @tspll_locked: last observed TSPLL lock state on E825 owner PFs.\n+ *\tWritten by the PTP periodic worker after polling the TSPLL and\n+ *\tintended to be read (without pf-\u003edplls.lock) by the DPLL periodic\n+ *\tworker in a follow-up change. Access via READ_ONCE()/WRITE_ONCE();\n+ *\tprecise synchronization is not required because both workers\n+ *\tconverge on the same value within one poll period.\n+ * @tspll_lock_retries: counts consecutive poll cycles in which the TSPLL\n+ *\twas found unlocked. Reset to zero when lock is re-acquired. Used to\n+ *\trate-limit the lock-lost log message (~every 120 retries / ~60 s).\n */\n struct ice_ptp {\n \tenum ice_ptp_state state;\n@@ -274,6 +283,8 @@ struct ice_ptp {\n \tu32 tx_hwtstamp_flushed;\n \tu32 tx_hwtstamp_discarded;\n \tu32 late_cached_phc_updates;\n+\tbool tspll_locked;\n+\tu32 tspll_lock_retries;\n };\n \n #define __ptp_port_to_ptp(p) \\\ndiff --git a/drivers/net/ethernet/intel/ice/ice_tspll.c b/drivers/net/ethernet/intel/ice/ice_tspll.c\nindex fd4b58eb9bc00..85bacb7c3a790 100644\n--- a/drivers/net/ethernet/intel/ice/ice_tspll.c\n+++ b/drivers/net/ethernet/intel/ice/ice_tspll.c\n@@ -129,7 +129,7 @@ static bool ice_tspll_check_params(struct ice_hw *hw,\n *\n * Return: specified clock source converted to its string name\n */\n-static const char *ice_tspll_clk_src_str(enum ice_clk_src clk_src)\n+const char *ice_tspll_clk_src_str(enum ice_clk_src clk_src)\n {\n \tswitch (clk_src) {\n \tcase ICE_CLK_SRC_TCXO:\n@@ -334,8 +334,9 @@ static int ice_tspll_dis_sticky_bits_e82x(struct ice_hw *hw)\n * Return:\n * * %0 - success\n * * %-EINVAL - input parameters are incorrect\n- * * %-EBUSY - failed to lock TSPLL\n- * * %other - CGU read/write failure\n+ * * %-EAGAIN - TSPLL configuration succeeded but lock is not acquired yet\n+ * * %-EBUSY - CGU access is busy (for example during reset)\n+ * * %other - other CGU read/write failures\n */\n static int ice_tspll_cfg_e825c(struct ice_hw *hw, enum ice_tspll_freq clk_freq,\n \t\t\t enum ice_clk_src clk_src)\n@@ -467,7 +468,7 @@ static int ice_tspll_cfg_e825c(struct ice_hw *hw, enum ice_tspll_freq clk_freq,\n \n \tif (!(val \u0026 ICE_CGU_RO_LOCK_TRUE_LOCK)) {\n \t\tdev_warn(ice_hw_to_dev(hw), \"CGU PLL failed to lock\\n\");\n-\t\treturn -EBUSY;\n+\t\treturn -EAGAIN;\n \t}\n \n \terr = ice_read_cgu_reg(hw, ICE_CGU_R9, \u0026r9);\n@@ -531,6 +532,62 @@ int ice_tspll_cfg_pps_out_e825c(struct ice_hw *hw, bool enable)\n \treturn ice_write_cgu_reg(hw, ICE_CGU_R9, val);\n }\n \n+/**\n+ * ice_tspll_lost_lock_e825c - check if TSPLL lost lock\n+ * @hw: Pointer to the HW struct\n+ * @lost_lock: Output flag for reporting lost lock\n+ *\n+ * Get E825 device TSPLL DPLL lock status.\n+ *\n+ * Return:\n+ * * 0 - OK\n+ * * negative - error\n+ */\n+int ice_tspll_lost_lock_e825c(struct ice_hw *hw, bool *lost_lock)\n+{\n+\tu32 val;\n+\tint err;\n+\n+\terr = ice_read_cgu_reg(hw, ICE_CGU_RO_LOCK, \u0026val);\n+\tif (err)\n+\t\treturn err;\n+\n+\t*lost_lock = !FIELD_GET(ICE_CGU_RO_LOCK_TRUE_LOCK, val);\n+\n+\treturn 0;\n+}\n+\n+/**\n+ * ice_tspll_restart_e825c - trigger TSPLL restart\n+ * @hw: Pointer to the HW struct\n+ *\n+ * Re-enable TSPLL for E825 device.\n+ *\n+ * Return:\n+ * * 0 - OK\n+ * * negative - error\n+ */\n+int ice_tspll_restart_e825c(struct ice_hw *hw)\n+{\n+\tu32 val;\n+\tint err;\n+\n+\t/* Read the initial values of r23 and disable the PLL */\n+\terr = ice_read_cgu_reg(hw, ICE_CGU_R23, \u0026val);\n+\tif (err)\n+\t\treturn err;\n+\n+\tval \u0026= ~ICE_CGU_R23_R24_TSPLL_ENABLE;\n+\terr = ice_write_cgu_reg(hw, ICE_CGU_R23, val);\n+\tif (err)\n+\t\treturn err;\n+\n+\t/* Wait at least 1 ms before reenabling PLL */\n+\tusleep_range(USEC_PER_MSEC, 2 * USEC_PER_MSEC);\n+\tval |= ICE_CGU_R23_R24_TSPLL_ENABLE;\n+\treturn ice_write_cgu_reg(hw, ICE_CGU_R23, val);\n+}\n+\n /**\n * ice_tspll_cfg - Configure the Clock Generation Unit TSPLL\n * @hw: Pointer to the HW struct\n@@ -577,6 +634,61 @@ static int ice_tspll_dis_sticky_bits(struct ice_hw *hw)\n \t}\n }\n \n+/**\n+ * ice_tspll_get_clk_src - get current TSPLL clock source\n+ * @hw: board private hw structure\n+ * @clk_src: pointer to store clk_src value\n+ *\n+ * Get current TSPLL clock source settings.\n+ *\n+ * Return:\n+ * * 0 - OK\n+ * * negative - error\n+ */\n+int ice_tspll_get_clk_src(struct ice_hw *hw, enum ice_clk_src *clk_src)\n+{\n+\tu32 val;\n+\tint err;\n+\n+\terr = (hw-\u003emac_type == ICE_MAC_GENERIC_3K_E825) ?\n+\t\tice_read_cgu_reg(hw, ICE_CGU_R23, \u0026val) :\n+\t\tice_read_cgu_reg(hw, ICE_CGU_R24, \u0026val);\n+\tif (err)\n+\t\treturn err;\n+\n+\t*clk_src = (enum ice_clk_src)FIELD_GET(ICE_CGU_R23_R24_TIME_REF_SEL,\n+\t\t\t\t\t val);\n+\n+\treturn 0;\n+}\n+\n+/**\n+ * ice_tspll_set_cfg - configure TS PLL with new settings\n+ * @hw: board private hw structure\n+ * @clk_freq: clock frequency to program\n+ * @clk_src: clock source to select (TIME_REF, or TCXO)\n+ *\n+ * Configure CGU with new clock source and clock frequency settings.\n+ *\n+ * Return:\n+ * * 0 - OK\n+ * * negative - error\n+ */\n+int ice_tspll_set_cfg(struct ice_hw *hw, enum ice_tspll_freq clk_freq,\n+\t\t enum ice_clk_src clk_src)\n+{\n+\tint ret;\n+\n+\tif (!ice_tspll_check_params(hw, clk_freq, clk_src))\n+\t\treturn -EINVAL;\n+\n+\tret = ice_tspll_dis_sticky_bits(hw);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\treturn ice_tspll_cfg(hw, clk_freq, clk_src);\n+}\n+\n /**\n * ice_tspll_init - Initialize TSPLL with settings from firmware\n * @hw: Pointer to the HW structure\ndiff --git a/drivers/net/ethernet/intel/ice/ice_tspll.h b/drivers/net/ethernet/intel/ice/ice_tspll.h\nindex d650867004d1f..832c049e686cc 100644\n--- a/drivers/net/ethernet/intel/ice/ice_tspll.h\n+++ b/drivers/net/ethernet/intel/ice/ice_tspll.h\n@@ -32,6 +32,11 @@ struct ice_tspll_params_e82x {\n #define ICE_TSPLL_FBDIV_INTGR_E825\t\t256\n \n int ice_tspll_cfg_pps_out_e825c(struct ice_hw *hw, bool enable);\n+int ice_tspll_lost_lock_e825c(struct ice_hw *hw, bool *lost_lock);\n+int ice_tspll_restart_e825c(struct ice_hw *hw);\n+int ice_tspll_get_clk_src(struct ice_hw *hw, enum ice_clk_src *clk_src);\n+int ice_tspll_set_cfg(struct ice_hw *hw, enum ice_tspll_freq clk_freq,\n+\t\t enum ice_clk_src clk_src);\n int ice_tspll_init(struct ice_hw *hw);\n int ice_tspll_bypass_mux_active_e825c(struct ice_hw *hw, u8 port, bool *active,\n \t\t\t\t enum ice_synce_clk output);\n@@ -39,4 +44,5 @@ int ice_tspll_cfg_bypass_mux_e825c(struct ice_hw *hw, bool ena, u32 port_num,\n \t\t\t\t enum ice_synce_clk output);\n int ice_tspll_cfg_synce_ethdiv_e825c(struct ice_hw *hw,\n \t\t\t\t enum ice_synce_clk output);\n+const char *ice_tspll_clk_src_str(enum ice_clk_src clk_src);\n #endif /* _ICE_TSPLL_H_ */\n"
} |
| 2/1 | 2026/09/08 23:25 | agent | patch-evaluator |
0mModel:core Args: null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies the Intel Ethernet Connection E800 series driver (drivers/net/ethernet/intel/ice) to add TSPLL (TimeSync PLL) handling and monitoring for Intel E825 devices. This requires physical Intel E800/E825 series PCIe network hardware that is not emulated in standard virtualized fuzzing environments (QEMU/GCE), making the modified code structurally unreachable.",
"WorthFuzzing": false
}Instruction: You are an expert Linux kernel maintainer and security engineer.
Your job is to review a provided patch series and evaluate whether it warrants fuzzing with syzkaller.
IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in
your workspace. Do NOT rely on internal assumptions. You must actively use your code access
tools to inspect the actual source code, callers, and surrounding context.
================================================================================
1. CORE TRIAGE PHILOSOPHY
================================================================================
The goal of patch fuzzing is to discover crashes, regressions, exposed latent bugs,
and newly triggered assertions introduced by the patch series.
- REACHABILITY IS THE PRIMARY GATE:
Fuzzing can only discover bugs in code that can actually execute in standard virtualized
environments (GCE or QEMU, utilizing software-emulated devices like USB gadgets, netdev, tun/tap).
If the modified code is structurally unreachable (see Section 2), it MUST NOT be fuzzed,
regardless of whether it adds assertions or complex logic.
- DO NOT BLINDLY TRUST "NO FUNCTIONAL CHANGE" (NFCI) OR "REFACTORING" CLAIMS:
Patch authors routinely label changes as "cleanups", "refactorings", or state
"No functional change intended". Do NOT take these claims at face value.
Code refactorings that rearrange logic, introduce helper functions, or alter state management
in core subsystems frequently introduce subtle semantic shifts or uncover latent kernel bugs.
If reachable executable code is modified or refactored, it MUST be fuzzed.
- NEW OR MODIFIED ASSERTIONS IN REACHABLE CODE MUST BE FUZZED:
When a patch introduces or modifies runtime checks or assertions (e.g., WARN_ON*, VM_WARN_ON*,
BUG_ON*, lockdep_assert*) in reachable code paths, it enforces new or stricter invariants.
Even if the author believes the invariant always holds, fuzzing is essential to verify whether
an unusual sequence of operations can violate it.
================================================================================
2. WHEN TO RETURN WorthFuzzing=false (NEGATIVE CRITERIA)
================================================================================
Return WorthFuzzing=false ONLY IF all modified code falls strictly into one or more of these categories:
- Non-kernel and non-executable changes:
* Modifications to Documentation/, comments, or spelling fixes.
* User-space directories, self-tests, samples, or scripts (e.g., tools/, samples/, scripts/, usr/)
that do not affect the compiled kernel image (vmlinux) or kernel modules.
* Purely decorative logging (e.g., message strings in pr_err, printk, dev_info) or tracepoints
that do not alter control flow or data structures.
* Build system or Kconfig changes that do not alter compiled C logic.
- Structurally unreachable hardware:
* Vendor-specific PCIe switches, SmartNICs, or GPU drivers (e.g., mlxsw, pds_core, qed,
ionic, amdgpu) requiring physical ASIC/PCIe cards not emulated in standard QEMU.
- Unreachable execution paths:
* Driver teardown callbacks (.remove, .shutdown, pci_unregister_driver) executed only during
physical PCI hot-unplug or manual sysfs driver unbinding.
* Code paths exclusive to architectures other than the target architecture.
================================================================================
3. WHEN TO RETURN WorthFuzzing=true (POSITIVE CRITERIA)
================================================================================
Return WorthFuzzing=true whenever the patch touches reachable executable code, including:
- Core Subsystems:
* Any logic modifications in memory management (mm/), synchronization/locking (kernel/locking/),
BPF, scheduler, core networking, VFS, or syscall handling.
- Refactorings and Code Cleanups:
* Any restructuring of reachable data structures, helper abstractions, or algorithm flows.
- Runtime Assertions and Defensive Checks:
* Any introduction or alteration of assertions (WARN_ON*, VM_WARN_ON*, BUG_ON*, etc.) in reachable paths.
- Reachable Drivers and Protocols:
* Drivers accessible via virtual buses (virtio, USB gadget, loopback, netlink, binder, sockets, etc.).
================================================================================
4. EXTRACTING FocusSymbols (PREVENTING DILUTION)
================================================================================
When WorthFuzzing=true, you must extract specific kernel functions into FocusSymbols to guide the fuzzer:
- AVOID UBIQUITOUS LIFECYCLE HOT-PATHS:
Do NOT list generic, ubiquitous functions called by almost every program in the corpus
(including, but not limited to: general memory allocators and deallocators, page fault
and trap handlers, or core synchronization primitives; this is not an exhaustive list).
Listing ubiquitous functions causes the fuzzer to classify thousands of unrelated tests as "focused",
which severely dilutes fuzzing effort away from the actual changes.
- TARGET SPECIFIC FEATURE LOGIC AND ENTRYPOINTS:
List functions that specifically implement the logic being added or altered, or direct API entrypoints
for the subsystem feature under review.
- HANDLING STATIC INLINE FUNCTIONS IN HEADERS (.h):
Compiler-inlined static functions (such as static inlines in mm/*.h or include/linux/*.h) lack
distinct symbol addresses in vmlinux and cannot be targeted directly by symbol coverage filters.
If the changes are primarily in static inline helpers, identify non-static, feature-specific caller
functions in .c files that exercise them (avoiding ubiquitous lifecycle wrappers).
================================================================================
5. IDENTIFYING EnableConfigs
================================================================================
Identify any specific CONFIG_ options required to properly compile and reach the modified code:
- Inspect Kconfig files and #ifdef guards; do not make assumptions.
- Check "depends on" lines in Kconfig to include any non-standard parent subsystem configs needed.
- Strip any 'CONFIG_' prefix (e.g., return "NET_IPV4" instead of "CONFIG_NET_IPV4").
Prefer calling several tools at the same time to save round-trips.
Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.
Prompt: Target architecture: amd64
For your convenience, here is the diff of the changes:
commit d34ae6b1b79e3b881b1485b22ed5b9cf689f01a3
Author: syz-cluster <triage@syzkaller.com>
Date: Tue Sep 8 23:25:56 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/net/ethernet/intel/ice/ice_dpll.c b/drivers/net/ethernet/intel/ice/ice_dpll.c
index 85a74cd6ea1f3..0109fc34307c2 100644
--- a/drivers/net/ethernet/intel/ice/ice_dpll.c
+++ b/drivers/net/ethernet/intel/ice/ice_dpll.c
@@ -22,6 +22,8 @@
#define E825_RCLK_PARENT_0_PIN_IDX 0
#define E825_RCLK_PARENT_1_PIN_IDX 1
+#define E825_DPLL_TSPLL_BASE_IDX 0
+#define E825_DPLL_TXCLK_BASE_IDX 1
#define ICE_DPLL_PIN_SW_INPUT_ABS(in_idx) \
(ICE_DPLL_SW_PIN_INPUT_BASE_SFP + (in_idx))
@@ -84,6 +86,7 @@ static const char * const ice_dpll_sw_pin_sma[] = { "SMA1", "SMA2" };
static const char * const ice_dpll_sw_pin_ufl[] = { "U.FL1", "U.FL2" };
static const char * const ice_dpll_ext_eref_pin = "EXT_EREF0";
static const char * const ice_dpll_fwnode_ext_synce = "clk_ref_synce";
+static const char * const ice_dpll_fwnode_time_ref = "time_ref";
static const struct dpll_pin_frequency ice_esync_range[] = {
DPLL_PIN_FREQUENCY_RANGE(0, DPLL_PIN_FREQUENCY_1_HZ),
@@ -2814,6 +2817,160 @@ static const struct dpll_pin_ops ice_dpll_txclk_ops = {
.direction_get = ice_dpll_input_direction,
};
+/**
+ * ice_dpll_tspll_lock_status_get - derive TSPLL state for dpll subsystem
+ * @pf: board private structure
+ * @use_cached: if true, read lock state from pf->ptp.tspll_locked (maintained
+ * by the PTP periodic worker); if false, query hardware directly
+ *
+ * If TIME_REF is not selected, TSPLL is treated as unlocked from the dpll
+ * subsystem perspective, regardless of raw lock bit.
+ *
+ * Return: TSPLL lock status
+ */
+static enum dpll_lock_status
+ice_dpll_tspll_lock_status_get(struct ice_pf *pf, bool use_cached)
+{
+ enum ice_clk_src clk_src;
+ bool locked;
+
+ if (ice_tspll_get_clk_src(&pf->hw, &clk_src) ||
+ clk_src != ICE_CLK_SRC_TIME_REF)
+ return DPLL_LOCK_STATUS_UNLOCKED;
+
+ if (use_cached) {
+ locked = READ_ONCE(pf->ptp.tspll_locked);
+ } else {
+ bool lock_lost;
+
+ if (ice_tspll_lost_lock_e825c(&pf->hw, &lock_lost))
+ return DPLL_LOCK_STATUS_UNLOCKED;
+ locked = !lock_lost;
+ }
+ return locked ? DPLL_LOCK_STATUS_LOCKED : DPLL_LOCK_STATUS_UNLOCKED;
+}
+
+/**
+ * ice_dpll_tspll_state_on_dpll_get - get TIME_REF pin state on TSPLL DPLL
+ * @pin: pointer to a pin
+ * @pin_priv: private data pointer passed on pin registration
+ * @dpll: registered dpll pointer
+ * @dpll_priv: private data pointer passed on dpll registration
+ * @state: on success holds pin state on parent dpll
+ * @extack: error reporting
+ *
+ * Dpll subsystem callback. Returns CONNECTED if the TSPLL is using
+ * TIME_REF as its clock source, DISCONNECTED otherwise.
+ *
+ * Return:
+ * * 0 - success
+ * * negative - failed to read clock source
+ */
+static int
+ice_dpll_tspll_state_on_dpll_get(const struct dpll_pin *pin, void *pin_priv,
+ const struct dpll_device *dpll,
+ void *dpll_priv,
+ enum dpll_pin_state *state,
+ struct netlink_ext_ack *extack)
+{
+ struct ice_dpll_pin *p = pin_priv;
+ enum ice_clk_src clk_src;
+ int err;
+
+ if (ice_dpll_is_reset(p->pf, extack))
+ return -EBUSY;
+
+ err = ice_tspll_get_clk_src(&p->pf->hw, &clk_src);
+ if (err)
+ return err;
+
+ *state = clk_src == ICE_CLK_SRC_TIME_REF ? DPLL_PIN_STATE_CONNECTED :
+ DPLL_PIN_STATE_DISCONNECTED;
+ return 0;
+}
+
+/**
+ * ice_dpll_tspll_state_on_dpll_set - set TIME_REF pin state on TSPLL DPLL
+ * @pin: pointer to a pin
+ * @pin_priv: private data pointer passed on pin registration
+ * @dpll: registered dpll pointer
+ * @dpll_priv: private data pointer passed on dpll registration
+ * @state: requested state of the pin
+ * @extack: error reporting
+ *
+ * Dpll subsystem callback. Enables (CONNECTED) or disables (DISCONNECTED)
+ * the TIME_REF signal as the TSPLL clock source. Selects TCXO when disabled.
+ *
+ * Return:
+ * * 0 - success
+ * * negative - error
+ */
+static int
+ice_dpll_tspll_state_on_dpll_set(const struct dpll_pin *pin, void *pin_priv,
+ const struct dpll_device *dpll,
+ void *dpll_priv, enum dpll_pin_state state,
+ struct netlink_ext_ack *extack)
+{
+ struct ice_dpll_pin *p = pin_priv;
+ struct ice_pf *pf = p->pf;
+ enum ice_clk_src clk_src;
+ bool changed = false;
+ struct ice_dpll *tp;
+ int ret;
+
+ if (ice_dpll_is_reset(pf, extack))
+ return -EBUSY;
+
+ if (state != DPLL_PIN_STATE_CONNECTED &&
+ state != DPLL_PIN_STATE_DISCONNECTED) {
+ NL_SET_ERR_MSG(extack,
+ "unsupported pin state for TSPLL reference clock");
+ return -EINVAL;
+ }
+
+ clk_src = (state == DPLL_PIN_STATE_CONNECTED) ? ICE_CLK_SRC_TIME_REF :
+ ICE_CLK_SRC_TCXO;
+ tp = &pf->dplls.tspll;
+ /* Serialize multi-register TSPLL reconfiguration with restart path. */
+ mutex_lock(&pf->dplls.lock);
+ ret = ice_tspll_set_cfg(&pf->hw, ICE_TSPLL_FREQ_156_250, clk_src);
+ if (!ret || ret == -EAGAIN) {
+ enum dpll_lock_status new_state;
+
+ new_state = ice_dpll_tspll_lock_status_get(pf, false);
+
+ /* Sync the cached lock state to what we just observed from HW
+ * so ice_dpll_periodic_work_e825() (cached path) does not emit
+ * a spurious UNLOCKED notification between now and the next
+ * PTP monitor tick.
+ */
+ WRITE_ONCE(pf->ptp.tspll_locked,
+ new_state == DPLL_LOCK_STATUS_LOCKED);
+
+ if (tp->prev_dpll_state != new_state) {
+ tp->dpll_state = new_state;
+ tp->prev_dpll_state = new_state;
+ changed = true;
+ }
+ }
+ mutex_unlock(&pf->dplls.lock);
+ if (changed)
+ __dpll_device_change_ntf(tp->dpll);
+ /* TSPLL reconfiguration may complete before lock is reacquired.
+ * PTP periodic monitoring tracks and restores the final lock state.
+ */
+ if (ret == -EAGAIN)
+ ret = 0;
+
+ return ret;
+}
+
+static const struct dpll_pin_ops ice_dpll_tspll_in_ops = {
+ .state_on_dpll_set = ice_dpll_tspll_state_on_dpll_set,
+ .state_on_dpll_get = ice_dpll_tspll_state_on_dpll_get,
+ .direction_get = ice_dpll_input_direction,
+};
+
static const struct dpll_pin_ops ice_dpll_pin_sma_ops = {
.state_on_dpll_set = ice_dpll_sma_pin_state_set,
.state_on_dpll_get = ice_dpll_sw_pin_state_get,
@@ -2902,6 +3059,68 @@ static u64 ice_generate_clock_id(struct ice_pf *pf)
return pci_get_dsn(pf->pdev);
}
+/**
+ * ice_generate_dpll_clock_id - generate clock_id for a specific dpll device
+ * @pf: board private structure
+ * @d: dpll device context
+ * @type: dpll type being registered
+ *
+ * For E825 generic DPLLs, use per-interface permanent MAC as the clock_id
+ * basis so userspace can unambiguously map DPLL devices to interfaces.
+ * TX-CLK keeps plain MAC-derived ID, while TSPLL uses the same basis with
+ * a dedicated tag bit to remain distinct on source-timer owner PFs.
+ * Other DPLL objects keep board-level DSN-derived clock_id.
+ *
+ * Return: generated clock id for a dpll device
+ */
+static u64 ice_generate_dpll_clock_id(struct ice_pf *pf, struct ice_dpll *d,
+ enum dpll_type type)
+{
+ struct ice_hw *hw = &pf->hw;
+ u64 mac_clock_id;
+
+ if (hw->mac_type == ICE_MAC_GENERIC_3K_E825 &&
+ type == DPLL_TYPE_GENERIC &&
+ hw->port_info &&
+ is_valid_ether_addr(hw->port_info->mac.perm_addr)) {
+ mac_clock_id = ether_addr_to_u64(hw->port_info->mac.perm_addr);
+
+ if (d->dpll_idx >= E825_DPLL_TXCLK_BASE_IDX)
+ return mac_clock_id;
+
+ if (d->dpll_idx == E825_DPLL_TSPLL_BASE_IDX)
+ return mac_clock_id | BIT_ULL(63);
+ }
+
+ return pf->dplls.clock_id;
+}
+
+/**
+ * ice_dpll_is_own_dpll_clock_id - check if clock_id belongs to this pf's DPLLs
+ * @pf: board private structure
+ * @clock_id: clock_id from a DPLL notification
+ *
+ * Match info->src_clock_id from a DPLL pin notification against any DPLL
+ * device this PF has registered. Used to suppress self-notifications
+ * generated as a side effect of our own dpll_pin_register() and
+ * dpll_pin_unregister() calls on the fwnode-backed SYNCE and TIME_REF pins,
+ * whose DPLLs (TXC and TSPLL) use MAC-derived clock_ids on E825.
+ *
+ * Return: true if clock_id matches one of this PF's registered DPLL devices.
+ */
+static bool ice_dpll_is_own_dpll_clock_id(struct ice_pf *pf, u64 clock_id)
+{
+ if (clock_id == pf->dplls.clock_id)
+ return true;
+ if (pf->hw.mac_type != ICE_MAC_GENERIC_3K_E825)
+ return false;
+ if (clock_id == ice_generate_dpll_clock_id(pf, &pf->dplls.txc,
+ DPLL_TYPE_GENERIC))
+ return true;
+ return clock_id == ice_generate_dpll_clock_id(pf, &pf->dplls.tspll,
+ DPLL_TYPE_GENERIC);
+}
+
/**
* ice_dpll_pin_ntf - notify pin change including any SW pin wrappers
* @dplls: pointer to dplls struct
@@ -3134,12 +3353,44 @@ ice_dpll_update_state(struct ice_pf *pf, struct ice_dpll *d, bool init)
return ret;
}
+/**
+ * ice_dpll_periodic_work_e825 - TSPLL DPLL periodic update for E825
+ * @pf: board private structure
+ *
+ * Publish TSPLL lock status to the dpll subsystem. The PTP periodic worker
+ * owns TSPLL lock polling and recovery; this function consumes the cached
+ * result for dpll notifications.
+ *
+ * Context: Must be called without pf->dplls.lock held.
+ */
+static void ice_dpll_periodic_work_e825(struct ice_pf *pf)
+{
+ struct ice_dpll *tp = &pf->dplls.tspll;
+ enum dpll_lock_status new_state;
+ bool changed = false;
+
+ mutex_lock(&pf->dplls.lock);
+ new_state = ice_dpll_tspll_lock_status_get(pf, true);
+
+ if (tp->prev_dpll_state != new_state) {
+ tp->dpll_state = new_state;
+ tp->prev_dpll_state = new_state;
+ changed = true;
+ }
+ mutex_unlock(&pf->dplls.lock);
+ if (changed)
+ dpll_device_change_ntf(tp->dpll);
+}
+
/**
* ice_dpll_periodic_work - DPLLs periodic worker
* @work: pointer to kthread_work structure
*
- * DPLLs periodic worker is responsible for polling state of dpll.
- * Context: Holds pf->dplls.lock
+ * Periodic worker responsible for polling DPLL state. On E810 devices it
+ * polls the EEC and PPS DPLLs. On E825 devices, when this PF owns the
+ * source timer, it publishes TSPLL lock status to the dpll subsystem.
+ *
+ * Context: Acquires and releases pf->dplls.lock
*/
static void ice_dpll_periodic_work(struct kthread_work *work)
{
@@ -3147,38 +3398,43 @@ static void ice_dpll_periodic_work(struct kthread_work *work)
struct ice_pf *pf = container_of(d, struct ice_pf, dplls);
struct ice_dpll *de = &pf->dplls.eec;
struct ice_dpll *dp = &pf->dplls.pps;
- u32 phase_offset_ntf = 0;
+ u32 ntf_mask = 0;
int ret = 0;
if (ice_is_reset_in_progress(pf->state))
goto resched;
- mutex_lock(&pf->dplls.lock);
- d->periodic_counter++;
- ret = ice_dpll_update_state(pf, de, false);
- if (!ret)
- ret = ice_dpll_update_state(pf, dp, false);
- if (!ret && dp->phase_offset_monitor_period &&
- d->periodic_counter % dp->phase_offset_monitor_period == 0)
- ret = ice_dpll_pps_update_phase_offsets(pf, &phase_offset_ntf);
- if (ret) {
- /* EBUSY is expected during reset recovery */
- if (pf->hw.adminq.sq_last_status != LIBIE_AQ_RC_EBUSY)
- d->cgu_state_acq_err_num++;
- /* stop rescheduling this worker */
- if (d->cgu_state_acq_err_num >
- ICE_CGU_STATE_ACQ_ERR_THRESHOLD) {
- dev_err(ice_pf_to_dev(pf),
- "EEC/PPS DPLLs periodic work disabled\n");
- mutex_unlock(&pf->dplls.lock);
- return;
+
+ if (pf->hw.mac_type == ICE_MAC_GENERIC_3K_E825) {
+ ice_dpll_periodic_work_e825(pf);
+ } else {
+ mutex_lock(&pf->dplls.lock);
+ d->periodic_counter++;
+ ret = ice_dpll_update_state(pf, de, false);
+ if (!ret)
+ ret = ice_dpll_update_state(pf, dp, false);
+ if (!ret && dp->phase_offset_monitor_period &&
+ d->periodic_counter % dp->phase_offset_monitor_period == 0)
+ ret = ice_dpll_pps_update_phase_offsets(pf, &ntf_mask);
+ if (ret) {
+ /* EBUSY is expected during reset recovery */
+ if (pf->hw.adminq.sq_last_status != LIBIE_AQ_RC_EBUSY)
+ d->cgu_state_acq_err_num++;
+ /* stop rescheduling this worker */
+ if (d->cgu_state_acq_err_num >
+ ICE_CGU_STATE_ACQ_ERR_THRESHOLD) {
+ dev_err(ice_pf_to_dev(pf),
+ "EEC/PPS DPLLs periodic work disabled\n");
+ mutex_unlock(&pf->dplls.lock);
+ return;
+ }
}
+ mutex_unlock(&pf->dplls.lock);
+ ice_dpll_notify_changes(de);
+ ice_dpll_notify_changes(dp);
+ if (ntf_mask)
+ ice_dpll_pins_notify_mask(d, d->inputs, d->num_inputs,
+ ntf_mask);
}
- mutex_unlock(&pf->dplls.lock);
- ice_dpll_notify_changes(de);
- ice_dpll_notify_changes(dp);
- if (phase_offset_ntf)
- ice_dpll_pins_notify_mask(d, d->inputs, d->num_inputs,
- phase_offset_ntf);
resched:
/* Run twice a second or reschedule if update failed */
@@ -3536,6 +3792,7 @@ static void ice_dpll_pin_notify_work(struct work_struct *work)
work);
struct ice_dpll_pin *pin, *parent = w->pin;
bool is_tx_synce_parent = false;
+ bool is_tspll_time_ref = false;
struct ice_pf *pf = parent->pf;
bool is_rclk_parent = false;
int ret;
@@ -3556,7 +3813,11 @@ static void ice_dpll_pin_notify_work(struct work_struct *work)
is_tx_synce_parent =
ice_dpll_fwnode_eq(parent->fwnode,
pf->dplls.txclks[E825_EXT_SYNCE_PIN_IDX].fwnode);
- if (!is_rclk_parent && !is_tx_synce_parent)
+
+ is_tspll_time_ref =
+ ice_dpll_fwnode_eq(parent->fwnode, pf->dplls.tspll_in.fwnode);
+
+ if (!is_rclk_parent && !is_tx_synce_parent && !is_tspll_time_ref)
goto out;
switch (w->action) {
@@ -3597,6 +3858,18 @@ static void ice_dpll_pin_notify_work(struct work_struct *work)
ERR_PTR(ret));
goto drop_parent_ref;
}
+ } else if (is_tspll_time_ref) {
+ /* Register TIME_REF pin directly to TSPLL DPLL */
+ ret = dpll_pin_register(pf->dplls.tspll.dpll,
+ parent->pin,
+ &ice_dpll_tspll_in_ops,
+ parent);
+ if (ret) {
+ dev_err(ice_pf_to_dev(pf),
+ "TSPLL TIME_REF pin register failed: %pe\n",
+ ERR_PTR(ret));
+ goto drop_parent_ref;
+ }
}
break;
case DPLL_PIN_DELETED:
@@ -3615,6 +3888,11 @@ static void ice_dpll_pin_notify_work(struct work_struct *work)
pin = &pf->dplls.txclks[E825_EXT_SYNCE_PIN_IDX];
dpll_pin_unregister(pf->dplls.txc.dpll, pin->pin,
&ice_dpll_txclk_ops, pin);
+ } else if (is_tspll_time_ref) {
+ /* Unregister TIME_REF pin from TSPLL DPLL */
+ dpll_pin_unregister(pf->dplls.tspll.dpll,
+ parent->pin,
+ &ice_dpll_tspll_in_ops, parent);
}
drop_parent_ref:
/* Drop fwnode pin reference */
@@ -3642,10 +3920,12 @@ static int ice_dpll_pin_notify(struct notifier_block *nb, unsigned long action,
if (pin->fwnode != info->fwnode)
return NOTIFY_DONE; /* Not this pin */
- /* Ignore notification which are the outcome of internal pin
- * registration/unregistration calls - synce pin case.
+ /* Ignore notifications that are a side effect of internal pin
+ * registration/unregistration calls. E825 uses per-device
+ * MAC-derived clock_ids for the TXC and TSPLL generic DPLLs, so
+ * info->src_clock_id may not equal pf->dplls.clock_id.
*/
- if (info->src_clock_id == pin->pf->dplls.clock_id)
+ if (ice_dpll_is_own_dpll_clock_id(pin->pf, info->src_clock_id))
return NOTIFY_DONE;
work = kzalloc_obj(*work);
@@ -3786,12 +4066,12 @@ ice_dpll_deinit_fwnode_pins(struct ice_pf *pf, struct ice_dpll_pin *pins,
destroy_workqueue(pf->dplls.wq);
}
-static int ice_dpll_deinit_txclk_pins(struct ice_pf *pf)
+static int ice_dpll_deinit_txclk_pins(struct ice_pf *pf, bool flush)
{
struct ice_dpll_pin *synce_pin = &pf->dplls.txclks[E825_EXT_SYNCE_PIN_IDX];
struct ice_dpll *dt = &pf->dplls.txc;
- ice_dpll_stop_fwnode_pin_activity(synce_pin, true);
+ ice_dpll_stop_fwnode_pin_activity(synce_pin, flush);
ice_dpll_unregister_pins(dt->dpll, pf->dplls.txclks,
&ice_dpll_txclk_ops,
ARRAY_SIZE(pf->dplls.txclks));
@@ -3806,6 +4086,25 @@ static int ice_dpll_deinit_txclk_pins(struct ice_pf *pf)
return 0;
}
+/**
+ * ice_dpll_deinit_tspll_pins - deinitialize TSPLL fwnode pin
+ * @pf: board private structure
+ *
+ * Stop notifier activity and release the TIME_REF fwnode pin, unregistering
+ * it from the TSPLL DPLL if it was registered.
+ */
+static void ice_dpll_deinit_tspll_pins(struct ice_pf *pf)
+{
+ struct ice_dpll_pin *time_ref = &pf->dplls.tspll_in;
+ struct ice_dpll *tp = &pf->dplls.tspll;
+
+ ice_dpll_stop_fwnode_pin_activity(time_ref, true);
+ if (!IS_ERR_OR_NULL(time_ref->pin))
+ dpll_pin_unregister(tp->dpll, time_ref->pin,
+ &ice_dpll_tspll_in_ops, time_ref);
+ ice_dpll_release_fwnode_pin(time_ref);
+}
+
/**
* ice_dpll_deinit_pins - deinitialize direct pins
* @pf: board private structure
@@ -3826,7 +4125,10 @@ static void ice_dpll_deinit_pins(struct ice_pf *pf, bool cgu)
ice_dpll_deinit_rclk_pin(pf);
if (pf->hw.mac_type == ICE_MAC_GENERIC_3K_E825) {
- ice_dpll_deinit_txclk_pins(pf);
+ if (ice_pf_src_tmr_owned(pf) &&
+ test_bit(ICE_FLAG_PTP_SUPPORTED, pf->flags))
+ ice_dpll_deinit_tspll_pins(pf);
+ ice_dpll_deinit_txclk_pins(pf, true);
ice_dpll_deinit_fwnode_pins(pf, pf->dplls.inputs, 0);
}
if (cgu) {
@@ -3968,10 +4270,16 @@ static int ice_dpll_init_txclk_pins(struct ice_pf *pf, int start_idx)
{
struct ice_dpll_pin *ref_pin = pf->dplls.txclks;
struct ice_dpll *txc = &pf->dplls.txc;
+ u64 clock_id;
int ret;
+ /* EXT_EREF0 is a non-fwnode pin; its clock_id must match the TX-CLK
+ * DPLL device clock_id (see dpll_pin_register()).
+ */
+ clock_id = ice_generate_dpll_clock_id(pf, txc, DPLL_TYPE_GENERIC);
+
/* Configure EXT_EREF0 pin */
- ret = ice_dpll_get_pins(pf, ref_pin, start_idx, 1, pf->dplls.clock_id);
+ ret = ice_dpll_get_pins(pf, ref_pin, start_idx, 1, clock_id);
if (ret)
return ret;
ret = dpll_pin_register(txc->dpll, ref_pin->pin, &ice_dpll_txclk_ops,
@@ -4022,6 +4330,45 @@ static int ice_dpll_init_txclk_pins(struct ice_pf *pf, int start_idx)
return ret;
}
+/**
+ * ice_dpll_init_tspll_pins - init and register TSPLL TIME_REF fwnode pin
+ * @pf: board private structure
+ *
+ * Initialize the fwnode-based TIME_REF input pin for the TSPLL DPLL on E825.
+ * If the pin is not yet available in the dpll subsystem, registration will
+ * be deferred via the notifier path.
+ *
+ * Return:
+ * * 0 - success
+ * * negative - initialization failure reason
+ */
+static int ice_dpll_init_tspll_pins(struct ice_pf *pf)
+{
+ struct ice_dpll_pin *time_ref = &pf->dplls.tspll_in;
+ struct ice_dpll *tp = &pf->dplls.tspll;
+ int ret;
+
+ time_ref->pf = pf;
+ ret = ice_dpll_init_fwnode_pin(time_ref, ice_dpll_fwnode_time_ref);
+ if (ret)
+ return ret;
+
+ if (IS_ERR_OR_NULL(time_ref->pin)) {
+ dev_dbg(ice_pf_to_dev(pf),
+ "TSPLL TIME_REF pin not registered yet\n");
+ return 0;
+ }
+
+ ret = dpll_pin_register(tp->dpll, time_ref->pin,
+ &ice_dpll_tspll_in_ops, time_ref);
+ if (ret) {
+ ice_dpll_stop_fwnode_pin_activity(time_ref, false);
+ ice_dpll_release_fwnode_pin(time_ref);
+ }
+
+ return ret;
+}
+
/**
* ice_dpll_init_pins_e825 - init pins and register pins with a dplls
* @pf: board private structure
@@ -4049,8 +4396,24 @@ static int ice_dpll_init_pins_e825(struct ice_pf *pf)
goto unregister_pins;
ret = ice_dpll_init_txclk_pins(pf, 0);
- if (ret)
+ if (ret) {
ice_dpll_deinit_rclk_pin(pf);
+ goto unregister_pins;
+ }
+
+ if (ice_pf_src_tmr_owned(pf) &&
+ test_bit(ICE_FLAG_PTP_SUPPORTED, pf->flags)) {
+ ret = ice_dpll_init_tspll_pins(pf);
+ if (ret) {
+ /* Avoid flushing pf->dplls.wq here: notifier work
+ * items block on pf->dplls.dpll_init which is
+ * completed by the unregister_pins path below.
+ * destroy_workqueue() there drains queued items.
+ */
+ ice_dpll_deinit_txclk_pins(pf, false);
+ ice_dpll_deinit_rclk_pin(pf);
+ }
+ }
unregister_pins:
if (ret) {
@@ -4194,7 +4557,7 @@ static int
ice_dpll_init_dpll(struct ice_pf *pf, struct ice_dpll *d, bool cgu,
enum dpll_type type)
{
- u64 clock_id = pf->dplls.clock_id;
+ u64 clock_id = ice_generate_dpll_clock_id(pf, d, type);
int ret;
d->dpll = dpll_device_get(clock_id, d->dpll_idx, THIS_MODULE,
@@ -4237,6 +4600,7 @@ static void ice_dpll_deinit_worker(struct ice_pf *pf)
kthread_cancel_delayed_work_sync(&d->work);
kthread_destroy_worker(d->kworker);
+ d->kworker = NULL;
}
/**
@@ -4673,6 +5037,7 @@ static void ice_dpll_deinit_info(struct ice_pf *pf)
static int ice_dpll_init_info_e825c(struct ice_pf *pf)
{
struct ice_dplls *d = &pf->dplls;
+ struct ice_dpll *tp = &d->tspll;
struct ice_dpll *dt = &d->txc;
int ret = 0;
int i;
@@ -4681,7 +5046,11 @@ static int ice_dpll_init_info_e825c(struct ice_pf *pf)
d->num_inputs = ICE_SYNCE_CLK_NUM;
dt->dpll_state = ice_txclk_lock_status(pf->ptp.port.tx_clk);
dt->mode = DPLL_MODE_MANUAL;
- dt->dpll_idx = pf->ptp.port.port_num;
+ dt->dpll_idx = E825_DPLL_TXCLK_BASE_IDX + pf->ptp.port.port_num;
+ tp->dpll_state = ice_dpll_tspll_lock_status_get(pf, false);
+ tp->prev_dpll_state = tp->dpll_state;
+ tp->mode = DPLL_MODE_MANUAL;
+ tp->dpll_idx = E825_DPLL_TSPLL_BASE_IDX;
d->inputs = kzalloc_objs(*d->inputs, d->num_inputs);
if (!d->inputs)
@@ -4824,7 +5193,8 @@ static int ice_dpll_init_info(struct ice_pf *pf, bool cgu)
* resources and unregistering the dpll, pin and all resources used for
* handling them.
*
- * Context: Destroys pf->dplls.lock mutex. Call only if ICE_FLAG_DPLL was set.
+ * Context: Call only if ICE_FLAG_DPLL was set. pf->dplls.lock lifetime is
+ * managed by ice_init_features()/ice_deinit_features().
*/
void ice_dpll_deinit(struct ice_pf *pf)
{
@@ -4848,7 +5218,7 @@ void ice_dpll_deinit(struct ice_pf *pf)
up_write(&pf->dplls.txclk_notify_rwsem);
}
- if (cgu)
+ if (pf->dplls.kworker)
ice_dpll_deinit_worker(pf);
if (pf->hw.mac_type == ICE_MAC_GENERIC_3K_E825)
@@ -4861,9 +5231,10 @@ void ice_dpll_deinit(struct ice_pf *pf)
ice_dpll_deinit_dpll(pf, &pf->dplls.eec, cgu);
if (!IS_ERR_OR_NULL(pf->dplls.txc.dpll))
ice_dpll_deinit_dpll(pf, &pf->dplls.txc, false);
+ if (!IS_ERR_OR_NULL(pf->dplls.tspll.dpll))
+ ice_dpll_deinit_dpll(pf, &pf->dplls.tspll, false);
ice_dpll_deinit_info(pf);
- mutex_destroy(&pf->dplls.lock);
}
/**
@@ -4873,8 +5244,6 @@ void ice_dpll_deinit(struct ice_pf *pf)
* Set up the device dplls, register them and pins connected within Linux dpll
* subsystem. Allow userspace to obtain state of DPLL and handling of DPLL
* configuration requests.
- *
- * Context: Initializes pf->dplls.lock mutex.
*/
static void ice_dpll_init_e825(struct ice_pf *pf)
{
@@ -4892,7 +5261,6 @@ static void ice_dpll_init_e825(struct ice_pf *pf)
pf->ptp.port.port_num = pf->hw.lane_num;
}
- mutex_init(&d->lock);
/* Initialize the txclk worker and its notification rwsem before any
* code path can fail: ice_dpll_deinit() runs unconditionally on
* failure and calls cancel_work_sync() / down_write() on these.
@@ -4904,9 +5272,30 @@ static void ice_dpll_init_e825(struct ice_pf *pf)
err = ice_dpll_init_info_e825c(pf);
if (err)
goto err_exit;
+ if (ice_pf_src_tmr_owned(pf) &&
+ test_bit(ICE_FLAG_PTP_SUPPORTED, pf->flags)) {
+ err = ice_dpll_init_dpll(pf, &pf->dplls.tspll, false,
+ DPLL_TYPE_GENERIC);
+ if (err)
+ goto deinit_info;
+ /* Start the periodic worker before registering fwnode pins. The
+ * fwnode notifier path (ice_dpll_pin_notify_work()) blocks on
+ * pf->dplls.dpll_init, which is only signalled on the success
+ * return below. Starting the worker before any fwnode notifier
+ * is registered means a subsequent init failure cannot leave
+ * notifier work items queued on pf->dplls.wq, so the deinit
+ * flush_workqueue() paths in ice_dpll_deinit_pins() cannot
+ * deadlock. The E825 periodic worker only touches
+ * pf->dplls.tspll (already registered above) and pf->ptp state,
+ * so it is safe to run before pins.
+ */
+ err = ice_dpll_init_worker(pf);
+ if (err)
+ goto deinit_tspll;
+ }
err = ice_dpll_init_dpll(pf, &pf->dplls.txc, false, DPLL_TYPE_GENERIC);
if (err)
- goto deinit_info;
+ goto deinit_worker;
err = ice_dpll_init_pins_e825(pf);
if (err)
goto deinit_txclk;
@@ -4917,10 +5306,15 @@ static void ice_dpll_init_e825(struct ice_pf *pf)
deinit_txclk:
ice_dpll_deinit_dpll(pf, &pf->dplls.txc, false);
+deinit_worker:
+ if (pf->dplls.kworker)
+ ice_dpll_deinit_worker(pf);
+deinit_tspll:
+ if (!IS_ERR_OR_NULL(pf->dplls.tspll.dpll))
+ ice_dpll_deinit_dpll(pf, &pf->dplls.tspll, false);
deinit_info:
ice_dpll_deinit_info(pf);
err_exit:
- mutex_destroy(&d->lock);
dev_warn(ice_pf_to_dev(pf), "DPLLs init failure err:%d\n", err);
}
@@ -4931,16 +5325,12 @@ static void ice_dpll_init_e825(struct ice_pf *pf)
* Set up the device dplls, register them and pins connected within Linux dpll
* subsystem. Allow userspace to obtain state of DPLL and handling of DPLL
* configuration requests.
- *
- * Context: Initializes pf->dplls.lock mutex.
*/
static void ice_dpll_init_e810(struct ice_pf *pf)
{
bool cgu = ice_is_feature_supported(pf, ICE_F_CGU);
- struct ice_dplls *d = &pf->dplls;
int err = 0;
- mutex_init(&d->lock);
err = ice_dpll_init_info(pf, cgu);
if (err)
goto err_exit;
@@ -4971,7 +5361,6 @@ static void ice_dpll_init_e810(struct ice_pf *pf)
deinit_info:
ice_dpll_deinit_info(pf);
err_exit:
- mutex_destroy(&d->lock);
dev_warn(ice_pf_to_dev(pf), "DPLLs init failure err:%d\n", err);
}
diff --git a/drivers/net/ethernet/intel/ice/ice_dpll.h b/drivers/net/ethernet/intel/ice/ice_dpll.h
index 103ba3e490682..bce0bea9a664b 100644
--- a/drivers/net/ethernet/intel/ice/ice_dpll.h
+++ b/drivers/net/ethernet/intel/ice/ice_dpll.h
@@ -133,10 +133,12 @@ struct ice_dpll {
* @eec: pointer to EEC dpll dev
* @pps: pointer to PPS dpll dev
* @txc: pointer to TXC dpll dev
+ * @tspll: pointer to TSPLL dpll dev (E825 only)
* @inputs: input pins pointer
* @outputs: output pins pointer
* @rclk: recovered pins pointer
* @txclks: TX clock reference pins pointer
+ * @tspll_in: TSPLL TIME_REF fwnode input pin (E825 only)
* @num_inputs: number of input pins available on dpll
* @num_outputs: number of output pins available on dpll
* @cgu_state_acq_err_num: number of errors returned during periodic work
@@ -177,12 +179,14 @@ struct ice_dplls {
struct ice_dpll eec;
struct ice_dpll pps;
struct ice_dpll txc;
+ struct ice_dpll tspll;
struct ice_dpll_pin *inputs;
struct ice_dpll_pin *outputs;
struct ice_dpll_pin sma[ICE_DPLL_PIN_SW_NUM];
struct ice_dpll_pin ufl[ICE_DPLL_PIN_SW_NUM];
struct ice_dpll_pin rclk;
struct ice_dpll_pin txclks[ICE_DPLL_TXCLK_NUM_MAX];
+ struct ice_dpll_pin tspll_in;
u8 num_inputs;
u8 num_outputs;
u8 sma_data;
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index d88835482d3aa..2f372dd37b534 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -4725,6 +4725,14 @@ static void ice_init_features(struct ice_pf *pf)
if (ice_is_safe_mode(pf))
return;
+ /* pf->dplls.lock guards TSPLL/CGU access shared between the DPLL
+ * subsystem callbacks and the PTP periodic worker's TSPLL monitor.
+ * Initialize it before ice_ptp_init() so the PTP kworker never sees
+ * an uninitialized mutex, and destroy it in ice_deinit_features()
+ * only after ice_ptp_release() has drained the kworker.
+ */
+ mutex_init(&pf->dplls.lock);
+
/* initialize DDP driven features */
if (test_bit(ICE_FLAG_PTP_SUPPORTED, pf->flags))
ice_ptp_init(pf);
@@ -4769,6 +4777,7 @@ static void ice_deinit_features(struct ice_pf *pf)
ice_ptp_release(pf);
if (test_bit(ICE_FLAG_DPLL, pf->flags))
ice_dpll_deinit(pf);
+ mutex_destroy(&pf->dplls.lock);
if (pf->eswitch_mode == DEVLINK_ESWITCH_MODE_SWITCHDEV)
xa_destroy(&pf->eswitch.reprs);
ice_hwmon_exit(pf);
diff --git a/drivers/net/ethernet/intel/ice/ice_ptp.c b/drivers/net/ethernet/intel/ice/ice_ptp.c
index eaec36ab6ae3f..e54a98a0bdd08 100644
--- a/drivers/net/ethernet/intel/ice/ice_ptp.c
+++ b/drivers/net/ethernet/intel/ice/ice_ptp.c
@@ -4,8 +4,11 @@
#include "ice.h"
#include "ice_lib.h"
#include "ice_trace.h"
+#include "ice_tspll.h"
#include "ice_txclk.h"
+#define ICE_TSPLL_LOG_INTERVAL 120
+
static const char ice_pin_names[][64] = {
"SDP0",
"SDP1",
@@ -2849,6 +2852,79 @@ static void ice_ptp_maybe_trigger_tx_interrupt(struct ice_pf *pf)
}
}
+/**
+ * ice_ptp_tspll_monitor - poll and recover TSPLL lock on E825 owner PFs
+ * @pf: Board private structure
+ *
+ * Called from the PTP periodic worker. On E825 devices that own the source
+ * timer, poll the TSPLL lock status via CGU registers and trigger a restart
+ * if the lock has been lost. The result is cached in @pf->ptp.tspll_locked
+ * so it can be consumed by the DPLL periodic worker via READ_ONCE().
+ *
+ * TSPLL lock is critical for PHC operation and must be monitored regardless
+ * of whether DPLL init succeeded or CONFIG_DPLL is enabled. Placing the
+ * monitor here makes recovery independent of the dpll subsystem.
+ *
+ * AQ read errors are rate-limited and do not stop monitoring. Lock-lost
+ * events are logged every 120 retries (~60 s at normal poll rate) to
+ * surface persistent failures without flooding the log.
+ */
+static void ice_ptp_tspll_monitor(struct ice_pf *pf)
+{
+ bool lock_lost;
+ int err;
+
+ if (pf->hw.mac_type != ICE_MAC_GENERIC_3K_E825 ||
+ !ice_pf_src_tmr_owned(pf))
+ return;
+
+ /* Serialize the entire monitor tick against TSPLL userspace reconfig
+ * (ice_dpll_tspll_state_on_dpll_set()). Both paths read HW state and
+ * write pf->ptp.tspll_locked; without holding pf->dplls.lock across
+ * the HW read here, a preempted monitor could observe stale HW state
+ * and then overwrite an accurate cache update from the DPLL callback.
+ * pf->dplls.lock is initialized in ice_init_features() before the PTP
+ * kworker starts and destroyed in ice_deinit_features() only after
+ * ice_ptp_release() has drained the kworker, so it is always valid.
+ */
+ mutex_lock(&pf->dplls.lock);
+ err = ice_tspll_lost_lock_e825c(&pf->hw, &lock_lost);
+ if (err) {
+ mutex_unlock(&pf->dplls.lock);
+ dev_err_ratelimited(ice_pf_to_dev(pf),
+ "Failed reading TimeSync PLL lock status (err: %d). Retrying.\n",
+ err);
+ return;
+ }
+
+ if (lock_lost) {
+ WRITE_ONCE(pf->ptp.tspll_locked, false);
+ if (!(pf->ptp.tspll_lock_retries % ICE_TSPLL_LOG_INTERVAL))
+ dev_warn(ice_pf_to_dev(pf),
+ "TimeSync PLL lock lost. Retrying to acquire lock.\n");
+ err = ice_tspll_restart_e825c(&pf->hw);
+ if (err)
+ dev_err_ratelimited(ice_pf_to_dev(pf),
+ "Failed to restart TimeSync PLL (err: %d).\n",
+ err);
+ pf->ptp.tspll_lock_retries++;
+ } else {
+ if (pf->ptp.tspll_lock_retries) {
+ const char *src_str = "unknown";
+ enum ice_clk_src clk_src;
+
+ if (!ice_tspll_get_clk_src(&pf->hw, &clk_src))
+ src_str = ice_tspll_clk_src_str(clk_src);
+ dev_info(ice_pf_to_dev(pf),
+ "TimeSync PLL lock acquired with %s clock source after %u retries.\n",
+ src_str, pf->ptp.tspll_lock_retries);
+ }
+ WRITE_ONCE(pf->ptp.tspll_locked, true);
+ pf->ptp.tspll_lock_retries = 0;
+ }
+ mutex_unlock(&pf->dplls.lock);
+}
+
static void ice_ptp_periodic_work(struct kthread_work *work)
{
struct ice_ptp *ptp = container_of(work, struct ice_ptp, work.work);
@@ -2858,6 +2934,8 @@ static void ice_ptp_periodic_work(struct kthread_work *work)
if (pf->ptp.state != ICE_PTP_READY)
return;
+ ice_ptp_tspll_monitor(pf);
+
err = ice_ptp_update_cached_phctime(pf);
ice_ptp_maybe_trigger_tx_interrupt(pf);
@@ -2975,6 +3053,9 @@ static int ice_ptp_rebuild_owner(struct ice_pf *pf)
err = ice_tspll_init(hw);
if (err)
return err;
+ /* Rebuild reinitialized TSPLL, so reset monitor retry state. */
+ WRITE_ONCE(ptp->tspll_locked, true);
+ ptp->tspll_lock_retries = 0;
/* Acquire the global hardware lock */
if (!ice_ptp_lock(hw)) {
@@ -3319,6 +3400,7 @@ void ice_ptp_init(struct ice_pf *pf)
}
ptp->port.port_num = hw->lane_num;
+ ptp->tspll_locked = true;
ice_ptp_init_hw(hw);
ice_ptp_init_tx_interrupt_mode(pf);
diff --git a/drivers/net/ethernet/intel/ice/ice_ptp.h b/drivers/net/ethernet/intel/ice/ice_ptp.h
index c4b0da7ce20ed..0e40fef3b4e8a 100644
--- a/drivers/net/ethernet/intel/ice/ice_ptp.h
+++ b/drivers/net/ethernet/intel/ice/ice_ptp.h
@@ -249,6 +249,15 @@ struct ice_ptp_pin_desc {
* @tx_hwtstamp_discarded: number of Tx skbs discarded due to cached PHC time
* being too old to correctly extend timestamp
* @late_cached_phc_updates: number of times cached PHC update is late
+ * @tspll_locked: last observed TSPLL lock state on E825 owner PFs.
+ * Written by the PTP periodic worker after polling the TSPLL and
+ * intended to be read (without pf->dplls.lock) by the DPLL periodic
+ * worker in a follow-up change. Access via READ_ONCE()/WRITE_ONCE();
+ * precise synchronization is not required because both workers
+ * converge on the same value within one poll period.
+ * @tspll_lock_retries: counts consecutive poll cycles in which the TSPLL
+ * was found unlocked. Reset to zero when lock is re-acquired. Used to
+ * rate-limit the lock-lost log message (~every 120 retries / ~60 s).
*/
struct ice_ptp {
enum ice_ptp_state state;
@@ -274,6 +283,8 @@ struct ice_ptp {
u32 tx_hwtstamp_flushed;
u32 tx_hwtstamp_discarded;
u32 late_cached_phc_updates;
+ bool tspll_locked;
+ u32 tspll_lock_retries;
};
#define __ptp_port_to_ptp(p) \
diff --git a/drivers/net/ethernet/intel/ice/ice_tspll.c b/drivers/net/ethernet/intel/ice/ice_tspll.c
index fd4b58eb9bc00..85bacb7c3a790 100644
--- a/drivers/net/ethernet/intel/ice/ice_tspll.c
+++ b/drivers/net/ethernet/intel/ice/ice_tspll.c
@@ -129,7 +129,7 @@ static bool ice_tspll_check_params(struct ice_hw *hw,
*
* Return: specified clock source converted to its string name
*/
-static const char *ice_tspll_clk_src_str(enum ice_clk_src clk_src)
+const char *ice_tspll_clk_src_str(enum ice_clk_src clk_src)
{
switch (clk_src) {
case ICE_CLK_SRC_TCXO:
@@ -334,8 +334,9 @@ static int ice_tspll_dis_sticky_bits_e82x(struct ice_hw *hw)
* Return:
* * %0 - success
* * %-EINVAL - input parameters are incorrect
- * * %-EBUSY - failed to lock TSPLL
- * * %other - CGU read/write failure
+ * * %-EAGAIN - TSPLL configuration succeeded but lock is not acquired yet
+ * * %-EBUSY - CGU access is busy (for example during reset)
+ * * %other - other CGU read/write failures
*/
static int ice_tspll_cfg_e825c(struct ice_hw *hw, enum ice_tspll_freq clk_freq,
enum ice_clk_src clk_src)
@@ -467,7 +468,7 @@ static int ice_tspll_cfg_e825c(struct ice_hw *hw, enum ice_tspll_freq clk_freq,
if (!(val & ICE_CGU_RO_LOCK_TRUE_LOCK)) {
dev_warn(ice_hw_to_dev(hw), "CGU PLL failed to lock\n");
- return -EBUSY;
+ return -EAGAIN;
}
err = ice_read_cgu_reg(hw, ICE_CGU_R9, &r9);
@@ -531,6 +532,62 @@ int ice_tspll_cfg_pps_out_e825c(struct ice_hw *hw, bool enable)
return ice_write_cgu_reg(hw, ICE_CGU_R9, val);
}
+/**
+ * ice_tspll_lost_lock_e825c - check if TSPLL lost lock
+ * @hw: Pointer to the HW struct
+ * @lost_lock: Output flag for reporting lost lock
+ *
+ * Get E825 device TSPLL DPLL lock status.
+ *
+ * Return:
+ * * 0 - OK
+ * * negative - error
+ */
+int ice_tspll_lost_lock_e825c(struct ice_hw *hw, bool *lost_lock)
+{
+ u32 val;
+ int err;
+
+ err = ice_read_cgu_reg(hw, ICE_CGU_RO_LOCK, &val);
+ if (err)
+ return err;
+
+ *lost_lock = !FIELD_GET(ICE_CGU_RO_LOCK_TRUE_LOCK, val);
+
+ return 0;
+}
+
+/**
+ * ice_tspll_restart_e825c - trigger TSPLL restart
+ * @hw: Pointer to the HW struct
+ *
+ * Re-enable TSPLL for E825 device.
+ *
+ * Return:
+ * * 0 - OK
+ * * negative - error
+ */
+int ice_tspll_restart_e825c(struct ice_hw *hw)
+{
+ u32 val;
+ int err;
+
+ /* Read the initial values of r23 and disable the PLL */
+ err = ice_read_cgu_reg(hw, ICE_CGU_R23, &val);
+ if (err)
+ return err;
+
+ val &= ~ICE_CGU_R23_R24_TSPLL_ENABLE;
+ err = ice_write_cgu_reg(hw, ICE_CGU_R23, val);
+ if (err)
+ return err;
+
+ /* Wait at least 1 ms before reenabling PLL */
+ usleep_range(USEC_PER_MSEC, 2 * USEC_PER_MSEC);
+ val |= ICE_CGU_R23_R24_TSPLL_ENABLE;
+ return ice_write_cgu_reg(hw, ICE_CGU_R23, val);
+}
+
/**
* ice_tspll_cfg - Configure the Clock Generation Unit TSPLL
* @hw: Pointer to the HW struct
@@ -577,6 +634,61 @@ static int ice_tspll_dis_sticky_bits(struct ice_hw *hw)
}
}
+/**
+ * ice_tspll_get_clk_src - get current TSPLL clock source
+ * @hw: board private hw structure
+ * @clk_src: pointer to store clk_src value
+ *
+ * Get current TSPLL clock source settings.
+ *
+ * Return:
+ * * 0 - OK
+ * * negative - error
+ */
+int ice_tspll_get_clk_src(struct ice_hw *hw, enum ice_clk_src *clk_src)
+{
+ u32 val;
+ int err;
+
+ err = (hw->mac_type == ICE_MAC_GENERIC_3K_E825) ?
+ ice_read_cgu_reg(hw, ICE_CGU_R23, &val) :
+ ice_read_cgu_reg(hw, ICE_CGU_R24, &val);
+ if (err)
+ return err;
+
+ *clk_src = (enum ice_clk_src)FIELD_GET(ICE_CGU_R23_R24_TIME_REF_SEL,
+ val);
+
+ return 0;
+}
+
+/**
+ * ice_tspll_set_cfg - configure TS PLL with new settings
+ * @hw: board private hw structure
+ * @clk_freq: clock frequency to program
+ * @clk_src: clock source to select (TIME_REF, or TCXO)
+ *
+ * Configure CGU with new clock source and clock frequency settings.
+ *
+ * Return:
+ * * 0 - OK
+ * * negative - error
+ */
+int ice_tspll_set_cfg(struct ice_hw *hw, enum ice_tspll_freq clk_freq,
+ enum ice_clk_src clk_src)
+{
+ int ret;
+
+ if (!ice_tspll_check_params(hw, clk_freq, clk_src))
+ return -EINVAL;
+
+ ret = ice_tspll_dis_sticky_bits(hw);
+ if (ret)
+ return ret;
+
+ return ice_tspll_cfg(hw, clk_freq, clk_src);
+}
+
/**
* ice_tspll_init - Initialize TSPLL with settings from firmware
* @hw: Pointer to the HW structure
diff --git a/drivers/net/ethernet/intel/ice/ice_tspll.h b/drivers/net/ethernet/intel/ice/ice_tspll.h
index d650867004d1f..832c049e686cc 100644
--- a/drivers/net/ethernet/intel/ice/ice_tspll.h
+++ b/drivers/net/ethernet/intel/ice/ice_tspll.h
@@ -32,6 +32,11 @@ struct ice_tspll_params_e82x {
#define ICE_TSPLL_FBDIV_INTGR_E825 256
int ice_tspll_cfg_pps_out_e825c(struct ice_hw *hw, bool enable);
+int ice_tspll_lost_lock_e825c(struct ice_hw *hw, bool *lost_lock);
+int ice_tspll_restart_e825c(struct ice_hw *hw);
+int ice_tspll_get_clk_src(struct ice_hw *hw, enum ice_clk_src *clk_src);
+int ice_tspll_set_cfg(struct ice_hw *hw, enum ice_tspll_freq clk_freq,
+ enum ice_clk_src clk_src);
int ice_tspll_init(struct ice_hw *hw);
int ice_tspll_bypass_mux_active_e825c(struct ice_hw *hw, u8 port, bool *active,
enum ice_synce_clk output);
@@ -39,4 +44,5 @@ int ice_tspll_cfg_bypass_mux_e825c(struct ice_hw *hw, bool ena, u32 port_num,
enum ice_synce_clk output);
int ice_tspll_cfg_synce_ethdiv_e825c(struct ice_hw *hw,
enum ice_synce_clk output);
+const char *ice_tspll_clk_src_str(enum ice_clk_src clk_src);
#endif /* _ICE_TSPLL_H_ */
|
| 3/2 | 2026/09/08 23:25 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 19373 output: 43 thoughts: 615 Thoughts: **My Initial Assessment of the Patch Series** Okay, let's dive into this patch set. My initial thought is to break down the changes and figure out the implications. First, I need to see exactly where this touches. I'm seeing modifications to `drivers/net/ethernet/intel/ice/` with the specific files: `ice_dpll.c`, `ice_dpll.h`, `ice_main.c`, `ice_ptp.c`, `ice_ptp.h`, `ice_tspll.c`, and `ice_tspll.h`. Right, this is Intel's `ice` driver, the one for their E800 series Ethernet controllers. That's good to know. It's for physical PCIe hardware – E810, E825, and the 800 Series. Now, let's think about this from a fuzzing perspective. I need to apply the triage philosophy. Specifically, I need to know if this is going to be a WorthFuzzing=false situation. The negative criteria section is key here. I'm looking at "Structurally unreachable hardware" – things like vendor-specific PCIe switches, or SmartNICs, or GPU drivers, that require physical ASICs or PCIe cards *not* emulated in standard QEMU. And then the flip side, "Reachable Drivers and Protocols" – things accessible via virtio, USB gadget, loopback, netlink, or sockets, etc. Here's the problem. Intel `ice` is the driver for the E800 series. QEMU does *not* emulate those. It does the e1000, e1000e, igb, and the others, but not `ice`. So it seems unlikely that I can reach this driver through standard virtualization. Wait, are there any virtual netdevs or mock devices? Or, anything through a netlink interface? That might be the only chance. Hmm, and looking closer, these DPLL subsystem interfaces (`dpll_device_get`, `dpll_pin_register`, etc.) are callbacks registered by `ice` for *its* device. But, if the `ice` device doesn't probe (because of no hardware), then these callbacks never get registered, so the driver never fully initializes and binds these pieces together. The bottom line: I need to quickly determine if `ice` can even *load* or probe in a standard syzkaller / QEMU / GCE environment. I'm going to run a `grepper` and see how this driver is initialized. That's the first step. |
| 4/2 | 2026/09/08 23:26 | tool | grepper |
0mArgs:{
"Expression": "module_pci_driver|pci_register_driver",
"PathPrefix": "drivers/net/ethernet/intel/ice"
}Results: {
"Output": "drivers/net/ethernet/intel/ice/ice_main.c=5877=static int __init ice_module_init(void)\n--\ndrivers/net/ethernet/intel/ice/ice_main.c-5899-\ndrivers/net/ethernet/intel/ice/ice_main.c:5900:\tstatus = pci_register_driver(\u0026ice_driver);\ndrivers/net/ethernet/intel/ice/ice_main.c-5901-\tif (status) {\n"
} |
| 5/2 | 2026/09/08 23:26 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 20738 output: 38 thoughts: 14 Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience: **Debugging Ice Driver and PCI Device IDs** Okay, so I need to get a handle on what's going on with this `ice_driver` right now. My first instinct, as always, is to dive into the low-level details. Let's start by verifying the PCI device IDs. Knowing those will give me a solid foundation for troubleshooting; I can quickly rule out obvious driver misconfigurations or hardware mismatches. That'll inform my next step whether I need to verify PCI driver assignment, check for interrupts, or if there's an issue with the device itself. A deep dive is in order. |
| 6/2 | 2026/09/08 23:26 | tool | grepper |
0mArgs:{
"Expression": "struct pci_driver ice_driver",
"PathPrefix": "drivers/net/ethernet/intel/ice"
}Results: {
"Output": "drivers/net/ethernet/intel/ice/ice_main.c=5850=static const struct pci_error_handlers ice_pci_err_handler = {\n--\ndrivers/net/ethernet/intel/ice/ice_main.c-5857-\ndrivers/net/ethernet/intel/ice/ice_main.c:5858:static struct pci_driver ice_driver = {\ndrivers/net/ethernet/intel/ice/ice_main.c-5859-\t.name = KBUILD_MODNAME,\n"
} |
| 7/2 | 2026/09/08 23:26 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 21082 output: 32 thoughts: 39 Thoughts: Okay, here's my take on those thoughts, tailored for an expert audience: **Analyzing the Intel Ethernet Connection E800 Series Driver** Alright, so we're looking at the `ice` driver, which, as I recall, is the Intel Ethernet Connection E800 series PCIe NIC driver. My first instinct, whenever I'm digging into a driver's configuration, is to head straight to the `Kconfig` file. That's where all the interesting options and dependencies are defined. So, let's dive into `drivers/net/ethernet/intel/ice/Kconfig`. I need to understand what features are built-in, what's modular, what the prerequisites are for certain functionalities. Time to see what kind of configuration options are available and start the analysis. |
| 8/2 | 2026/09/08 23:26 | tool | grepper |
0mError:no matches Args: {
"Expression": "config ICE",
"PathPrefix": "drivers/net/ethernet/intel/ice"
}Results: {
"error": "no matches"
} |
| 9/2 | 2026/09/08 23:26 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 21336 output: 30 thoughts: 17 Thoughts: Here's a summary of my thought process, as if I were considering that Kconfig file: **Investigating Network Driver Configuration** Okay, time to dive in. My immediate thought is, "Let's check `drivers/net/ethernet/intel/Kconfig`." That's the logical starting point. I need to understand how the configuration options are set up for Intel Ethernet drivers within the kernel. The Kconfig file is where all the build-time configuration options are defined. It describes which features can be enabled or disabled, and how they relate to each other. I'll be looking for things like: * **Overall driver selection:** Is there a top-level symbol for enabling the Intel Ethernet drivers in the first place? * **Specific driver modules:** Are there separate symbols for different Intel NIC models, or is it a more generic driver? * **Feature flags:** What options are available for things like jumbo frames, VLAN offload, checksum offload, hardware timestamping, and any specific acceleration features? Are there dependencies between these options? * **Default values and dependencies:** What are the default settings for the various options? Are there any dependencies or constraints that dictate which features can be selected together? For instance, if hardware checksum offload is enabled, does that also pull in support for a specific offload engine? * **Help text:** What does the documentation say about each option? The help text will be crucial for understanding what each configuration variable actually *does*. I'll also likely be looking for any conditional configurations, using `depends on`, `select`, or `if` statements, to see how the code is structured in relation to underlying hardware. I'll need to understand how the Kconfig file controls the build process for these drivers and, ultimately, how those drivers are configured within the kernel. Time to dig in and understand this bit of configuration. |
| 10/2 | 2026/09/08 23:26 | tool | grepper |
0mArgs:{
"Expression": "config ICE",
"PathPrefix": "drivers/net/ethernet/intel"
}Results: {
"Output": "drivers/net/ethernet/intel/Kconfig=268=config I40EVF\n--\ndrivers/net/ethernet/intel/Kconfig-290-\ndrivers/net/ethernet/intel/Kconfig:291:config ICE\ndrivers/net/ethernet/intel/Kconfig-292-\ttristate \"Intel(R) Ethernet Connection E800 Series Support\"\n--\ndrivers/net/ethernet/intel/Kconfig-319-\ndrivers/net/ethernet/intel/Kconfig:320:config ICE_HWMON\ndrivers/net/ethernet/intel/Kconfig-321-\tbool \"Intel(R) Ethernet Connection E800 Series Support HWMON support\"\n--\ndrivers/net/ethernet/intel/Kconfig-330-\ndrivers/net/ethernet/intel/Kconfig:331:config ICE_SWITCHDEV\ndrivers/net/ethernet/intel/Kconfig-332-\tbool \"Switchdev Support\"\n--\ndrivers/net/ethernet/intel/Kconfig-344-\ndrivers/net/ethernet/intel/Kconfig:345:config ICE_HWTS\ndrivers/net/ethernet/intel/Kconfig-346-\tbool \"Support HW cross-timestamp on platforms with PTM support\"\n"
} |
| 11/2 | 2026/09/08 23:26 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 22105 output: 120 thoughts: 476 Thoughts: **My Assessment: Not Worth Fuzzing** Okay, let's carefully review the negative criteria specified in Section 2 of the instructions. The key here is determining when to set `WorthFuzzing` to false. The guidelines explicitly state that we should return `WorthFuzzing=false` ONLY if *all* modified code fits strictly into one or more of the specified categories: non-kernel and non-executable changes, structurally unreachable hardware, and unreachable execution paths. Alright, let's break down this patch. All the code modifications are exclusively within `drivers/net/ethernet/intel/ice/`: `ice_dpll.c`, `ice_dpll.h`, `ice_main.c`, `ice_ptp.c`, `ice_ptp.h`, `ice_tspll.c`, `ice_tspll.h`. This is all about implementing DPLL / TimeSync PLL (TSPLL) support and monitoring for Intel E825 / E800 series PCIe network adapters. The critical point is that this hardware, as far as I understand, *requires* physical Intel E800 / E825 series PCIe ASICs. Crucially, that hardware is *not* emulated in standard QEMU or any typical virtualized fuzzing environment. Therefore, given the explicit criteria in the instructions, this modified code falls squarely into the "structurally unreachable hardware" category. There's no way to reach this code without the physical hardware, which renders this code path, for all intents and purposes, dead code in our fuzzing environment. So, based on that analysis: - `WorthFuzzing` is set to `false`. - `FocusSymbols` is an empty list, as expected. - `EnableConfigs` will be an empty list as well. - And I'll record a concise explanation: All changes are contained within the Intel Ethernet Connection E800 series driver (`drivers/net/ethernet/intel/ice`) specifically addressing TSPLL DPLL clock source handling and monitoring for E825 hardware. That, in turn, requires physical Intel E800/E825 series PCIe hardware which is not emulated in standard QEMU or in a virtualized fuzzing environment, making the modified code structurally unreachable. Now, let's call `set-results` with these findings. |
| 12/2 | 2026/09/08 23:26 | tool | set-results |
0mArgs:{
"EnableConfigs": [],
"FocusSymbols": [],
"Reasoning": "The patch modifies the Intel Ethernet Connection E800 series driver (drivers/net/ethernet/intel/ice) to add TSPLL (TimeSync PLL) handling and monitoring for Intel E825 devices. This requires physical Intel E800/E825 series PCIe network hardware that is not emulated in standard virtualized fuzzing environments (QEMU/GCE), making the modified code structurally unreachable.",
"WorthFuzzing": false
}Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies the Intel Ethernet Connection E800 series driver (drivers/net/ethernet/intel/ice) to add TSPLL (TimeSync PLL) handling and monitoring for Intel E825 devices. This requires physical Intel E800/E825 series PCIe network hardware that is not emulated in standard virtualized fuzzing environments (QEMU/GCE), making the modified code structurally unreachable.",
"WorthFuzzing": false
} |
| 13/1 | 2026/09/08 23:26 | action | If |
0mArgs:{
"WorthFuzzing": false
}Results: null |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|