qcacld-3.0: Skip recovering check if host assert target

In cds_trigger_recovery_handler, Host driver first set flag recovering
before cds_force_assert_target. For Rome, ol_target_failure run when
FW crash, Self-Recovery stop when detect flag recoverying be set

Add CDS_DRIVER_STATE_ASSERTING_TARGET to record Host asserting in
cds_force_assert_target. Skip recovering check in ol_target_failure
if detect this flag.

Change-Id: I290e2f21bd0bca6dc6d76de43de4f8dd801d7ff5
This commit is contained in:
Baowei Liu
2020-03-18 19:34:50 +08:00
committed by nshrivas
parent 09431aa329
commit 78aa7bdfc1
3 changed files with 43 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2014-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -726,6 +726,7 @@ void ol_target_failure(void *instance, QDF_STATUS status)
struct ol_config_info *ini_cfg = ol_get_ini_handle(ol_ctx);
qdf_device_t qdf_dev = ol_ctx->qdf_dev;
int ret;
bool skip_recovering_check = false;
enum hif_target_status target_status = hif_get_target_status(scn);
if (hif_get_bus_type(scn) == QDF_BUS_TYPE_SNOC) {
@@ -733,6 +734,10 @@ void ol_target_failure(void *instance, QDF_STATUS status)
return;
}
/* If Host driver trigger target failure, skip recovering check */
if (cds_is_target_asserting())
skip_recovering_check = true;
qdf_event_set(&wma->recovery_event);
if (TARGET_STATUS_RESET == target_status) {
@@ -748,11 +753,16 @@ void ol_target_failure(void *instance, QDF_STATUS status)
return;
}
if (cds_is_driver_recovering() || cds_is_driver_in_bad_state()) {
if (!skip_recovering_check && cds_is_driver_recovering()) {
BMI_ERR("%s: Recovery in progress, ignore!\n", __func__);
return;
}
if (cds_is_driver_in_bad_state()) {
BMI_ERR("%s: Driver in bad state, ignore!\n", __func__);
return;
}
if (cds_is_load_or_unload_in_progress()) {
BMI_ERR("%s: Loading/Unloading is in progress, ignore!",
__func__);