power: reset: qcom-dload-mode: perform a warm nodump reboot only if in panic

Change-Id: Iabace0d05dd8ea47fef346ed91dac71a17878f19
This commit is contained in:
Cosmin Tanislav 2022-01-27 00:02:14 +02:00 committed by Davide Garberi
parent f1ac27fd6d
commit a7b520c3da

View File

@ -259,8 +259,7 @@ static int qcom_dload_reboot(struct notifier_block *this, unsigned long event,
reboot_nb);
/* Clean shutdown, disable dump mode to allow normal restart */
if (!poweroff->in_panic)
set_download_mode(QCOM_DOWNLOAD_NODUMP);
set_download_mode(QCOM_DOWNLOAD_NODUMP);
if (cmd) {
if (!strcmp(cmd, "edl")) {
@ -271,7 +270,7 @@ static int qcom_dload_reboot(struct notifier_block *this, unsigned long event,
msm_enable_dump_mode(true);
}
if (current_download_mode != QCOM_DOWNLOAD_NODUMP)
if (poweroff->in_panic)
reboot_mode = REBOOT_WARM;
return NOTIFY_OK;