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

Dan Williams dcbw at redhat.com
Wed Mar 15 15:09:51 UTC 2017


On Wed, 2017-03-15 at 10:28 +0100, Aleksander Morgado wrote:
> On Wed, Mar 15, 2017 at 2:40 AM, 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.

Dan


More information about the ModemManager-devel mailing list