From: Ivan Priest Date: Thu, 21 Feb 2019 10:23:26 +0000 (+0000) Subject: [RAMEN9610-12615][Common] wlbt: Sable firmware SCSC_LOG_FW_PANIC collection must... X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f323fac2480b465b42fe1f737bbc75876374e17e;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [RAMEN9610-12615][Common] wlbt: Sable firmware SCSC_LOG_FW_PANIC collection must be synchronous 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 --- diff --git a/drivers/misc/samsung/scsc/scsc_log_collector.c b/drivers/misc/samsung/scsc/scsc_log_collector.c index 08d51e0faf17..a6a79ce37034 100644 --- a/drivers/misc/samsung/scsc/scsc_log_collector.c +++ b/drivers/misc/samsung/scsc/scsc_log_collector.c @@ -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 {