diff options
| author | Kabilan Kannan <kabilank@codeaurora.org> | 2018-01-03 10:28:50 -0800 |
|---|---|---|
| committer | snandini <snandini@codeaurora.org> | 2018-01-03 15:40:06 -0800 |
| commit | e1a802fec6a9f10c3bcff768ea8e96649f3efcee (patch) | |
| tree | a52d92b4d035890fe48945c8fa96357a2b004747 | |
| parent | ee4274049a8361a8364d578c9046d6d669b8fce7 (diff) | |
qcacld-3.0: Do not BUG_ON, when recovery is started by FW assert
Host driver should avoid BUG_ON, when recovery is
in progress due to firmware assert.
Change the sequence in cds trigger recovery
function to avoid BUG_ON
Change-Id: Ibcce592caf4c4099a9cf3e124c5d2b70134116a3
CRs-Fixed: 2165972
| -rw-r--r-- | core/cds/src/cds_api.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/core/cds/src/cds_api.c b/core/cds/src/cds_api.c index 3a56b7f19fc7..a0b173bd57cd 100644 --- a/core/cds/src/cds_api.c +++ b/core/cds/src/cds_api.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -1874,14 +1874,24 @@ static void cds_trigger_recovery_work(void *param) struct qdf_runtime_lock recovery_lock; qdf_device_t qdf_ctx; - if (!cds_is_self_recovery_enabled()) { - cds_err("Recovery is not enabled"); - QDF_BUG(0); + if (cds_is_driver_recovering()) { + cds_err("Recovery in progress; ignoring recovery trigger"); return; } - if (cds_is_driver_recovering() || cds_is_driver_in_bad_state()) { - cds_err("Recovery in progress; ignoring recovery trigger"); + if (cds_is_driver_in_bad_state()) { + cds_err("Driver is in bad state; ignoring recovery trigger"); + return; + } + + if (cds_is_fw_down()) { + cds_err("firmware is down; ignoring recovery trigger"); + return; + } + + if (!cds_is_self_recovery_enabled()) { + cds_err("Recovery is not enabled"); + QDF_BUG(0); return; } |
