Re: [MM] [PATCH] sim: retry SIM operations during initialization

> The timeout + retries really tries to address flaky SIM operations on
> some modems. We could limit the retries to certain error codes, but
> that won't address flakiness, unfortunately :(
> We could let individual plugins to configure whether it should retry
> on failed SIM operations. For a modem that does not support reading
> IMSI (AT+CIMI), the plugin would set load_imsi / load_imsi_finish to

That is not the only reason in this case. We try to load IMSI and other
SIM-related stuff before and after PIN unlocking. Loading IMSI may fail
before SIM unlock, and succeed after SIM unlock (got that case here with
a Gobi modem) [*]. So, before unlocking the PIN, we're sending AT+CIMI
three times and in all we get an error. It is probably a good idea to
retry these commands under certain circumstances, but not sure if they
should be retried always, for every error. I fear that if we add those
unconditional retries now they'll end up being there forever and we'll
never know if they were always needed or not. Can we initially retry
only if we get some expected error, and add more cases as we see them?

Also, setting load_imsi/load_imsi_finish to NULL should only be done if
all modems handled by the given plugin are known to have IMSI loading

[*] Probably we shouldn't try to load IMSI before PIN unlocking.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]