ソースを参照

qcacmn: Handle gracefully if scheduler cb is not registered

Currently when firmware crashes during driver load,
message queue handlers for scheduler context are not
registered. While handling the FW down event, driver
posts the message to scheduler queue. Since the queue
handler is not registered, it results in crash.

To address this issue, handle the msg gracefully and
return error in case callback is not registered.

CRs-Fixed: 3251983
Change-Id: I5dd55e701cf332153dca1f6678271506b9690f6e
Asutosh Mohapatra 2 年 前
コミット
d0c0584583
1 ファイル変更2 行追加1 行削除
  1. 2 1
      scheduler/src/scheduler_api.c

+ 2 - 1
scheduler/src/scheduler_api.c

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022 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
@@ -289,7 +290,7 @@ QDF_STATUS scheduler_post_msg_by_priority(uint32_t qid,
 	}
 
 	if (!sched_ctx->queue_ctx.scheduler_msg_process_fn[qidx]) {
-		QDF_DEBUG_PANIC("callback not registered for qid[%d]", que_id);
+		sched_err("callback not registered for qid[%d]", que_id);
 		return QDF_STATUS_E_FAILURE;
 	}