qcacld-3.0: request runtime sync resume while removing driver
When __hdd_soc_remove is called from platform driver, for removing the driver, request runtime sync resume before setting unload_in_progress flag, such that runtime resume can happen. Also, remove wlan_hdd_validate_context to skip unload_in_progress flag check and have only SSR check during resume callback. Change-Id: I545c6e10f9c18ff44c05a5d284aa9b82c7ec5ed5 CRs-Fixed: 2750981
This commit is contained in:

gecommit door
snandini

bovenliggende
1073423cdd
commit
d33b74f869
@@ -676,6 +676,7 @@ static int hdd_soc_recovery_reinit(struct device *dev,
|
||||
static void __hdd_soc_remove(struct device *dev)
|
||||
{
|
||||
struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
|
||||
void *hif_ctx;
|
||||
|
||||
QDF_BUG(hdd_ctx);
|
||||
if (!hdd_ctx)
|
||||
@@ -684,6 +685,15 @@ static void __hdd_soc_remove(struct device *dev)
|
||||
pr_info("%s: Removing driver v%s\n", WLAN_MODULE_NAME,
|
||||
QWLAN_VERSIONSTR);
|
||||
|
||||
hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
|
||||
if (hif_ctx) {
|
||||
/*
|
||||
* Trigger runtime sync resume before setting unload in progress
|
||||
* such that resume can happen successfully
|
||||
*/
|
||||
hif_pm_runtime_sync_resume(hif_ctx);
|
||||
}
|
||||
|
||||
cds_set_driver_loaded(false);
|
||||
cds_set_unload_in_progress(true);
|
||||
if (!hdd_wait_for_debugfs_threads_completion())
|
||||
@@ -1517,8 +1527,12 @@ static int wlan_hdd_runtime_resume(struct device *dev)
|
||||
hdd_debug("Starting runtime resume");
|
||||
|
||||
hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
|
||||
if (wlan_hdd_validate_context(hdd_ctx))
|
||||
|
||||
if (cds_is_driver_recovering()) {
|
||||
hdd_debug("Recovery in progress, state:0x%x",
|
||||
cds_get_driver_state());
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (hdd_ctx->driver_status != DRIVER_MODULES_ENABLED) {
|
||||
hdd_debug("Driver module closed skipping runtime resume");
|
||||
|
Verwijs in nieuw issue
Block a user