summaryrefslogtreecommitdiff
path: root/include/linux/workqueue_api.h
diff options
context:
space:
mode:
authorKarol Kolacinski <karol.kolacinski@intel.com>2026-10-27 17:05:39 -0700
committerJakub Kicinski <kuba@kernel.org>2026-10-28 18:08:58 -0700
commit56af436b90acce7eaa7531189c827773983f7d07 (patch)
tree4ab8ce608c55bc28408dcf69878e496f2e0c325e /include/linux/workqueue_api.h
parent50870d62116038e6f1e17a6aedcf2a95cec37ec7 (diff)
ice: E822: keep Tx timestamps disabled during offset calibration
Do not clear the tx.calibrating flag immediately after starting the PHY timer in ice_ptp_port_phy_restart(). Instead, keep Tx timestamps disabled until the offset verification work (ice_ptp_wait_for_offsets) has confirmed that the Tx PHY offset is properly configured. Previously, tx.calibrating was set to true, then immediately back to false right after ice_start_phy_timer_e82x() returned. This allowed Tx timestamp requests to be served during the window where offset verification was still pending. Timestamps produced during this window should have their valid bit cleared, but it is better to prevent requests until the driver has confirmed calibration is complete. Rename the tx.calibrating field to tx.disabled, and change where it is cleared. Only clear it in ice_ptp_wait_for_offsets(), and only after Tx offset configuration has completed successfully. This ensures that new Tx timestamp requests are only accepted after the PHY has properly calibrated the Tx offset. If ice_start_phy_timer_e82x() fails, do not restore disabled to false. The device is in a state where timestamps cannot succeed properly anyways. A dev_err message is already logged on failure to start the timer at the end of the function. Renaming the field improves clarity and will better reflect the nature of the flag in a future change that also applies disabling Tx timestamps in software in a following commit. Log a debug message while offset calibration is still pending, including the specific Tx/Rx error codes to aid debugging stalled calibration. This path is expected on every routine link-up: ov_work is first queued with no delay and the vernier offset cannot be computed until at least one packet has been transmitted, so the first several invocations normally land here. Use dev_dbg() rather than a rate-limited warning to avoid emitting KERN_WARNING on every link-up during normal operation. Log a debug message when calibration completes successfully. Note that sashiko review has previously complained that leaving the disabled flag set "permanently" disables Tx timestamps if vernier calibration never completes. This is true, but its important to realize that timestamps would still fail regardless of whether the flag is set. Until vernier calibration completes the device will not report valid timestamps regardless. Thus, keeping the calibrating flag set simply prevents new timestamp requests from software while it is known that the hardware will not complete them. Fixes: 3a7496234d17 ("ice: implement basic E822 PTP support") Signed-off-by: Karol Kolacinski <karol.kolacinski@intel.com> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com> Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com> Signed-off-by: Przemyslaw Korba <przemyslaw.korba@intel.com> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://patch.msgid.link/20261027-reduction-v1-3-81237c67a361@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/workqueue_api.h')
0 files changed, 0 insertions, 0 deletions