소스 검색

qcacmn: Add caller/line info to recovery log

To speed up recovery trigger debugging, pass the caller's function name
and line number, such that the group needing to do the initial triage
can be easily identified via the panic message.

Change-Id: I64f62ec30de657deeff037ee99610e716cfc4377
CRs-Fixed: 2298195
Dustin Brown 6 년 전
부모
커밋
ed22a65b66
2개의 변경된 파일12개의 추가작업 그리고 5개의 파일을 삭제
  1. 9 2
      qdf/inc/qdf_platform.h
  2. 3 3
      qdf/src/qdf_platform.c

+ 9 - 2
qdf/inc/qdf_platform.h

@@ -26,10 +26,15 @@
 
 /**
  * qdf_self_recovery_callback() - callback for self recovery
+ * @reason: the reason for the recovery request
+ * @func: the caller's function name
+ * @line: the line number of the callsite
  *
  * Return: none
  */
-typedef void (*qdf_self_recovery_callback)(enum qdf_hang_reason);
+typedef void (*qdf_self_recovery_callback)(enum qdf_hang_reason reason,
+					   const char *func,
+					   const uint32_t line);
 
 /**
  * qdf_ssr_callback() - callback for ssr
@@ -81,7 +86,9 @@ void qdf_register_self_recovery_callback(qdf_self_recovery_callback callback);
  *
  * Return: None
  */
-void qdf_trigger_self_recovery(void);
+#define qdf_trigger_self_recovery() \
+	__qdf_trigger_self_recovery(__func__, __LINE__)
+void __qdf_trigger_self_recovery(const char *func, const uint32_t line);
 
 /**
  * qdf_register_ssr_protect_callbacks() - register [un]protect callbacks

+ 3 - 3
qdf/src/qdf_platform.c

@@ -57,13 +57,13 @@ void qdf_register_self_recovery_callback(qdf_self_recovery_callback callback)
 
 qdf_export_symbol(qdf_register_self_recovery_callback);
 
-void qdf_trigger_self_recovery(void)
+void __qdf_trigger_self_recovery(const char *func, const uint32_t line)
 {
 	if (self_recovery_cb)
-		self_recovery_cb(QDF_REASON_UNSPECIFIED);
+		self_recovery_cb(QDF_REASON_UNSPECIFIED, func, line);
 }
 
-qdf_export_symbol(qdf_trigger_self_recovery);
+qdf_export_symbol(__qdf_trigger_self_recovery);
 
 void qdf_register_ssr_protect_callbacks(qdf_ssr_callback protect,
 					qdf_ssr_callback unprotect)