Browse Source

qcacmn: Enable firmware dump when kernel panic for Rome

Firmware dump is necessary to debug host panic issues because
host and firmware are out of sync.
MACRO DEBUG is undefined by default, after remove it,
hif_crash_shutdown->ol_copy_ramdump is called to collect firmware
dump.
Since dump depend on functions in bmi, add MACRO
WLAN_FEATURE_BMI check.

TargetFailure event wont't be received after inject assert due to
irqs disabled, so can't set target RESET state which is checked
when dump IRAM

Change-Id: Ia75f5032a2817e35e4c7e777857b137ba3998ebd
CRs-Fixed: 2682677
Jianmin Zhu 7 years ago
parent
commit
0818b326b1
1 changed files with 2 additions and 2 deletions
  1. 2 2
      hif/src/hif_main.c

+ 2 - 2
hif/src/hif_main.c

@@ -955,8 +955,7 @@ void hif_clear_stats(struct hif_opaque_softc *hif_ctx)
  *
  * Return: n/a
  */
-#if defined(TARGET_RAMDUMP_AFTER_KERNEL_PANIC) \
-&& defined(DEBUG)
+#if defined(TARGET_RAMDUMP_AFTER_KERNEL_PANIC) && defined(WLAN_FEATURE_BMI)
 
 static void hif_crash_shutdown_dump_bus_register(void *hif_ctx)
 {
@@ -1003,6 +1002,7 @@ void hif_crash_shutdown(struct hif_opaque_softc *hif_ctx)
 	}
 
 	hif_crash_shutdown_dump_bus_register(hif_ctx);
+	hif_set_target_status(hif_ctx, TARGET_STATUS_RESET);
 
 	if (ol_copy_ramdump(hif_ctx))
 		goto out;