From 935a684aa670e253487856b5ee01acb6515d62c1 Mon Sep 17 00:00:00 2001 From: Yuanyuan Liu Date: Wed, 15 Nov 2017 11:23:45 -0800 Subject: [PATCH] icnss: Remove MSA0 permission only when modem is crashed For modem restart and device power off cases, there's no need to remove MSA0 permission and collect ramdump as these are normal behavior. Hence only collecting ramdump when modem is crashed. CRs-Fixed: 2141678 Change-Id: I42b44da3f08e62c8e375ae1749563d918e68be9d Signed-off-by: Yuanyuan Liu --- drivers/soc/qcom/icnss.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/soc/qcom/icnss.c b/drivers/soc/qcom/icnss.c index 83efbbe25e6b..60a44baa313d 100644 --- a/drivers/soc/qcom/icnss.c +++ b/drivers/soc/qcom/icnss.c @@ -2493,7 +2493,8 @@ static int icnss_modem_notifier_nb(struct notifier_block *nb, icnss_pr_vdbg("Modem-Notify: event %lu\n", code); - if (code == SUBSYS_AFTER_SHUTDOWN) { + if (code == SUBSYS_AFTER_SHUTDOWN && + notif->crashed == CRASH_STATUS_ERR_FATAL) { ret = icnss_assign_msa_perm_all(priv, ICNSS_MSA_PERM_DUMP_COLLECT); if (!ret) {