diff options
author | Nagi Marupaka <nmarupaka@google.com> | 2023-05-11 03:30:26 +0000 |
---|---|---|
committer | Aleksander Morgado <aleksandermj@chromium.org> | 2023-05-12 11:46:17 +0000 |
commit | eeba2ff32b83f96a2f8889962689b47870f6f8a6 (patch) | |
tree | 4601192f1349dbe333b8bc1b94d326fdbb0da041 /src/mm-iface-modem.c | |
parent | af44e8c1d8abe7f3f913dec7fa385d1dcbbb676b (diff) | |
download | ModemManager-eeba2ff32b83f96a2f8889962689b47870f6f8a6.tar.gz |
broadband-modem-mbim: account for race condition in quick hot swap case
On MBIM modems, when the SIM is ejected and re-inserted in a quick manner,
the state machine logic encounters a race condition and eventually, the
modem response for subscriber status is ignored. This change accounts
for that state transition without erroring out.
Fixes #672.
Diffstat (limited to 'src/mm-iface-modem.c')
-rw-r--r-- | src/mm-iface-modem.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c index b30f710e9..12f262234 100644 --- a/src/mm-iface-modem.c +++ b/src/mm-iface-modem.c @@ -604,6 +604,12 @@ load_unlock_required_ready (MMIfaceModem *self, return; } + /* If the error indicates that retry logic needs to be reset... reset the retry count to 0 */ + if (g_error_matches (error, MM_CORE_ERROR, MM_CORE_ERROR_RESET_AND_RETRY)) { + ctx->retries = 0; + mm_obj_info (self, "restarting unlock required check"); + } + /* For the remaining ones, retry if possible */ if (ctx->retries < ctx->max_retries) { ctx->retries++; |