Ver Fonte

qcacld-3.0: Add synchronization between unloading & SSR recovering

There is no sync between driver unloading & SSR recovering.
If SSR is in progress, need to wait when driver unloading.

Change-Id: I81b935f9d8d6336b68abd6aecbdc7d28f4762be9
CRs-Fixed: 2534890
Tiger Yu há 5 anos atrás
pai
commit
80fbbe1347
2 ficheiros alterados com 16 adições e 4 exclusões
  1. 13 1
      core/bmi/src/ol_fw.c
  2. 3 3
      core/hdd/src/wlan_hdd_main.c

+ 13 - 1
core/bmi/src/ol_fw.c

@@ -614,7 +614,7 @@ int ol_copy_ramdump(struct hif_opaque_softc *scn)
 	return ret;
 }
 
-void ramdump_work_handler(void *data)
+static void __ramdump_work_handler(void *data)
 {
 	int ret;
 	uint32_t host_interest_address;
@@ -695,6 +695,18 @@ out_fail:
 	ol_check_clean_recovery_flag(ol_ctx);
 }
 
+void ramdump_work_handler(void *data)
+{
+	struct qdf_op_sync *op_sync;
+
+	if (qdf_op_protect(&op_sync))
+		return;
+
+	__ramdump_work_handler(data);
+
+	qdf_op_unprotect(op_sync);
+}
+
 void fw_indication_work_handler(void *data)
 {
 	struct ol_context *ol_ctx = data;

+ 3 - 3
core/hdd/src/wlan_hdd_main.c

@@ -14595,6 +14595,9 @@ static void hdd_driver_unload(void)
 	pr_info("%s: Unloading driver v%s\n", WLAN_MODULE_NAME,
 		QWLAN_VERSIONSTR);
 
+	cds_set_driver_loaded(false);
+	cds_set_unload_in_progress(true);
+
 	if (hdd_ctx)
 		hdd_psoc_idle_timer_stop(hdd_ctx);
 
@@ -14611,9 +14614,6 @@ static void hdd_driver_unload(void)
 	osif_driver_sync_unregister();
 	osif_driver_sync_wait_for_ops(driver_sync);
 
-	cds_set_driver_loaded(false);
-	cds_set_unload_in_progress(true);
-
 	hdd_driver_mode_change_unregister();
 	pld_deinit();
 	wlan_hdd_state_ctrl_param_destroy();