From d7a8f53012dbf4cb911686d28f745dcfff7e77e2 Mon Sep 17 00:00:00 2001 From: Visweswara Tanuku Date: Mon, 10 Jun 2024 21:35:25 -0700 Subject: [PATCH] slimbus: qcom-ngd-ctrl: Free txn tid in delayed interrupt scenario When the interrupts are delayed slim_do_transfer returns timeout, but the txn tid is not freed. Due to which later invalid tid is processed in the rx path resulting in crash. Free tid in slim_do_transfer upon timeout due to delayed interrupt to avoid crash. Change-Id: Iae07e5c8366a333f39e57882f9cff240132c457f Signed-off-by: Visweswara Tanuku --- drivers/slimbus/messaging.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/slimbus/messaging.c b/drivers/slimbus/messaging.c index 249e8714b9eb..51558f882ddb 100644 --- a/drivers/slimbus/messaging.c +++ b/drivers/slimbus/messaging.c @@ -171,6 +171,9 @@ int slim_do_transfer(struct slim_controller *ctrl, struct slim_msg_txn *txn) ret = ctrl->xfer_msg(ctrl, txn); + if (ret == -ETIMEDOUT) + slim_free_txn_tid(ctrl, txn); + if (!ret && need_tid && !txn->msg->comp) { unsigned long ms = txn->rl + HZ;