drivers: esoc: Honor BOOT_FAIL_ACTION_DEF value

* This value is supposed to be used to choose what to do when
   the modem restart fails, so let's actually make things behave
   that way.

Change-Id: I4a206694c8c056abf89ec89a42b99d4da4d5aabf
This commit is contained in:
Davide Garberi
2023-08-05 03:10:29 +02:00
committed by Sebastiano Barezzi
parent b093c43eff
commit 80ebe765e9

View File

@@ -71,6 +71,9 @@ int esoc_set_boot_fail_action(struct esoc_clink *esoc_clink, u32 action)
return -EINVAL;
}
if (action == BOOT_FAIL_ACTION_PANIC)
action = BOOT_FAIL_ACTION_DEF;
if (!mdm_drv) {
esoc_mdm_log("esoc-mdm driver not present\n");
return -EAGAIN;
@@ -389,7 +392,7 @@ static int mdm_handle_boot_fail(struct esoc_clink *esoc_clink, u8 *pon_trial)
if (*pon_trial == atomic_read(&mdm_drv->n_pon_tries)) {
esoc_mdm_log("Reached max. number of boot trials\n");
atomic_set(&mdm_drv->boot_fail_action,
BOOT_FAIL_ACTION_PANIC);
BOOT_FAIL_ACTION_DEF);
}
switch (atomic_read(&mdm_drv->boot_fail_action)) {