3
0
Fork 0
forked from mirrors/linux
kernel/drivers/firmware/arm_scmi
Cristian Marussi c23c03bf1f firmware: arm_scmi: Fix timeout checks on polling path
Polling mode transactions wait for a reply busy-looping without holding a
spinlock, but currently the timeout checks are based only on elapsed time:
as a result we could hit a false positive whenever our busy-looping thread
is pre-empted and scheduled out for a time greater than the polling
timeout.

Change the checks at the end of the busy-loop to make sure that the polling
wasn't indeed successful or an out-of-order reply caused the polling to be
forcibly terminated.

Fixes: 31d2f803c1 ("firmware: arm_scmi: Add sync_cmds_completed_on_ret transport flag")
Reported-by: Huangjie <huangjie1663@phytium.com.cn>
Closes: https://lore.kernel.org/arm-scmi/20250123083323.2363749-1-jackhuang021@gmail.com/
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Cc: stable@vger.kernel.org # 5.18.x
Message-Id: <20250310175800.1444293-1-cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2025-04-08 10:31:59 +01:00
..
transports firmware: arm_scmi: Add aliases to transport modules 2024-12-10 10:30:45 +00:00
vendors/imx firmware: arm_scmi: imx: Correct tx size of scmi_imx_misc_ctrl_set 2025-02-13 14:27:37 +00:00
base.c firmware: arm_scmi: Replace comma with the semicolon 2024-08-28 17:16:25 +01:00
bus.c firmware: arm_scmi: Balance device refcount when destroying devices 2025-04-08 10:31:59 +01:00
clock.c firmware: arm_scmi: Fix trivial whitespace/coding style issues 2024-08-28 17:16:25 +01:00
common.h firmware: arm_scmi: Allow transport properties for multiple instances 2024-12-09 10:00:06 +00:00
driver.c firmware: arm_scmi: Fix timeout checks on polling path 2025-04-08 10:31:59 +01:00
Kconfig firmware: arm_scmi: Add initial support for i.MX BBM protocol 2024-08-28 21:54:03 +01:00
Makefile firmware: arm_scmi: Add initial support for i.MX BBM protocol 2024-08-28 21:54:03 +01:00
msg.c firmware: arm_scmi: Remove legacy transport-layer code 2024-08-16 10:26:58 +01:00
notify.c firmware: arm_scmi: Simplify scmi_devm_notifier_unregister 2024-03-26 11:33:33 +00:00
notify.h firmware: arm_scmi: Check for notification support 2024-02-20 06:35:55 +00:00
perf.c firmware: arm_scmi: Report duplicate opps as firmware bugs 2024-11-12 19:45:25 +01:00
pinctrl.c firmware: arm_scmi: Fix trivial whitespace/coding style issues 2024-08-28 17:16:25 +01:00
power.c firmware: arm_scmi: Update various protocols versions 2024-08-16 10:26:58 +01:00
powercap.c firmware: arm_scmi: Fix wrong fastchannel initialization 2024-03-25 10:14:28 +00:00
protocols.h move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
raw_mode.c arm_scmi: don't mess with ->d_parent->d_name 2025-01-15 13:14:37 +01:00
raw_mode.h firmware: arm_scmi: Add per-channel raw injection support 2023-01-20 11:41:37 +00:00
reset.c firmware: arm_scmi: Update various protocols versions 2024-08-16 10:26:58 +01:00
scmi_power_control.c firmware: arm_scmi: Add support for system suspend in power control driver 2024-06-14 09:48:35 +01:00
sensors.c firmware: arm_scmi: Update various protocols versions 2024-08-16 10:26:58 +01:00
shmem.c firmware: arm_scmi: Account for SHMEM memory overhead 2024-10-28 14:51:10 +00:00
system.c firmware: arm_scmi: Update various protocols versions 2024-08-16 10:26:58 +01:00
voltage.c firmware: arm_scmi: Update various protocols versions 2024-08-16 10:26:58 +01:00