Re: [PATCH v1] slimbus: qcom-ngd-ctrl: Add timeout for wait operation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 3/6/2024 2:49 AM, Konrad Dybcio wrote:


On 3/4/24 14:42, Viken Dadhaniya wrote:
In current driver qcom_slim_ngd_up_worker() indefinitely
waiting for ctrl->qmi_up completion object. This is
resulting in workqueue lockup on Kthread.

Added wait_for_completion_interruptible_timeout to
allow the thread to wait for specific timeout period and
bail out instead waiting infinitely.

Signed-off-by: Viken Dadhaniya <quic_vdadhani@xxxxxxxxxxx>
---

Fixes: a899d324863a ("slimbus: qcom-ngd-ctrl: add Sub System Restart support")
Cc: stable@xxxxxxxxxxxxxxx

Reviewed-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxx>

  drivers/slimbus/qcom-ngd-ctrl.c | 7 ++++++-
  1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c
index efeba8275a66..c27076d8b7db 100644
--- a/drivers/slimbus/qcom-ngd-ctrl.c
+++ b/drivers/slimbus/qcom-ngd-ctrl.c
@@ -83,6 +83,7 @@
  #define QCOM_SLIM_NGD_AUTOSUSPEND    MSEC_PER_SEC
  #define SLIM_RX_MSGQ_TIMEOUT_VAL    0x10000
+#define SLIM_QMI_TIMEOUT_MS        1000

This could be inlined instead

Updated in v2.


Konrad




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux