Browse Source

qcacmn: Trigger recovery incase of scheduler watchdog timeout

Trigger recovery instead of the apps panic incase of scheduler
watchdog timeout, so that the current logs are captured to
analyze the issue.

Change-Id: I44a61bc5630c4866b9d9b18f7a7ba6221ca6e355
CRs-Fixed: 3312328
Asutosh Mohapatra 2 years ago
parent
commit
8cfe6b1005
2 changed files with 5 additions and 2 deletions
  1. 2 0
      qdf/inc/qdf_types.h
  2. 3 2
      scheduler/src/scheduler_api.c

+ 2 - 0
qdf/inc/qdf_types.h

@@ -1557,6 +1557,7 @@ enum qdf_suspend_type {
  * @QDF_STATS_REQ_TIMEDOUT: Stats request timedout
  * @QDF_TX_DESC_LEAK: tx desc leak
  * @QDF_HOST_WAKEUP_REASON_PAGEFAULT: Host wakeup because of pagefault
+ * @QDF_SCHED_TIMEOUT: Scheduler watchdog timedout
  */
 enum qdf_hang_reason {
 	QDF_REASON_UNSPECIFIED,
@@ -1589,6 +1590,7 @@ enum qdf_hang_reason {
 	QDF_STATS_REQ_TIMEDOUT,
 	QDF_TX_DESC_LEAK,
 	QDF_HOST_WAKEUP_REASON_PAGEFAULT,
+	QDF_SCHED_TIMEOUT,
 };
 
 /**

+ 3 - 2
scheduler/src/scheduler_api.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -89,7 +89,8 @@ static void scheduler_watchdog_timeout(void *arg)
 	if (qdf_atomic_test_bit(MC_SHUTDOWN_EVENT_MASK, &sched->sch_event_flag))
 		return;
 
-	SCHED_DEBUG_PANIC("Going down for Scheduler Watchdog Bite!");
+	sched_err("Triggering self recovery on sheduler timeout");
+	qdf_trigger_self_recovery(NULL, QDF_SCHED_TIMEOUT);
 }
 
 QDF_STATUS scheduler_enable(void)