[RAMEN9610-12615][Common] wlbt: Sable firmware SCSC_LOG_FW_PANIC collection must...
authorIvan Priest <i.priest@samsung.com>
Thu, 21 Feb 2019 10:23:26 +0000 (10:23 +0000)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:23:18 +0000 (20:23 +0300)
The mxman_failure_work must wait for wlbtd to collect and archive moredump
before allowing recovery to proceed. The scsc_log_collector_schedule_collection()
must block until it is done.

Change-Id: Ic89b1a0df532782f99ed261306b6a82e1f77db44
SCSC-Bug-Id: SSB-49743
Signed-off-by: Ivan Priest <i.priest@samsung.com>
drivers/misc/samsung/scsc/scsc_log_collector.c

index 08d51e0faf17a9164304fa3577e4bb447b02399a..a6a79ce37034ce7a13c14a388f467448159e18ae 100644 (file)
@@ -506,6 +506,13 @@ void scsc_log_collector_schedule_collection(enum scsc_log_reason reason, u16 rea
                }
                atomic_set(&in_collection, 1);
                pr_info("Log collection Scheduled");
+
+               /* If dumping a FW panic (i.e. collecting a moredump), we need
+                * to wait for the collection to finish before returning.
+                */
+               if (reason == SCSC_LOG_FW_PANIC)
+                       flush_work(&log_status.collect_work);
+
                mutex_unlock(&log_status.collection_serial);
 
        } else {