[PATCH] telit: lock/unlock CSIM operations by default

Aleksander Morgado aleksander at aleksander.es
Wed Mar 15 17:04:29 UTC 2017


On Wed, Mar 15, 2017 at 4:09 PM, Dan Williams <dcbw at redhat.com> wrote:
>> > > Can you guys review and test this patch? It looks like it solved
>> > > the
>> > > issue I saw myself.
>> > >
>> > > The AT command reference for the Telit LE866 does say that the
>> > > AT+CSIM commands need to be enclosed within lock/unlock
>> > > operations
>> > > like these.
>> >
>> > If the LOCK succeeds, then don't we need to UNLOCK if some
>> > intermediate
>> > step fails?  It looks like we'll just leave it in locked state if
>> > any
>> > step like say PIN or PIN2 calls
>> > load_unlock_retries_context_complete_and_free().
>>
>> But all the other intermediate steps never fail; i.e.
>> csim_query_ready() always goes to the next step, never completes the
>> GSimpleAsyncResult. So effectively, if any intermediate AT command
>> fails, we just go on to the next one, and after the last one we have
>> the CSIM=0 to unlock.
>
> Ok then :)  I didn't look at the actual code, so I thought this could
> be the case, but looking at the code you're entirely correct.  But
> could we put a comment that the unlock behavior depends on all
> intermediate steps not erroring out?  Otherwise later if anything there
> does get changed, it'll be easy to screw up the lock balancing.
>
> Otherwise LGTM.

Sure, let me update the patch.

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list