[RFC PATCH] thunderbolt: icm: report switch runtime resume timeout

From: Pengpeng Hou

Date: Tue Jun 23 2026 - 02:18:56 EST


icm_runtime_resume_switch() waits for firmware to signal switch runtime-
resume completion. If the wait expires, it only prints a debug message
and still returns success to the runtime PM path.

Return -ETIMEDOUT when the completion does not arrive so runtime PM
callers can observe the failed switch resume instead of using the device
as if resume had completed.

Signed-off-by: Pengpeng Hou <pengpeng@xxxxxxxxxxx>
---
drivers/thunderbolt/icm.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/thunderbolt/icm.c b/drivers/thunderbolt/icm.c
index 10fefac3b1d9..46d491627970 100644
--- a/drivers/thunderbolt/icm.c
+++ b/drivers/thunderbolt/icm.c
@@ -2179,6 +2179,7 @@ static int icm_runtime_resume_switch(struct tb_switch *sw)
if (!wait_for_completion_timeout(&sw->rpm_complete,
msecs_to_jiffies(500))) {
dev_dbg(&sw->dev, "runtime resuming timed out\n");
+ return -ETIMEDOUT;
}
}
return 0;
--
2.50.1 (Apple Git-155)