Bug 100783 - Parallel enables occurring (when SIM PIN enabled)
Summary: Parallel enables occurring (when SIM PIN enabled)
Status: RESOLVED MOVED
Alias: None
Product: ModemManager
Classification: Unclassified
Component: general (show other bugs)
Version: git master
Hardware: Other Linux (All)
: medium normal
Assignee: ModemManager bug user
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-25 08:51 UTC by colin.helliwell
Modified: 2018-06-10 09:05 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
MM+NM logs (105.28 KB, text/plain)
2017-04-25 08:51 UTC, colin.helliwell
Details
Patch highlighting the issue (2.56 KB, patch)
2017-04-25 08:55 UTC, colin.helliwell
Details | Splinter Review

Description colin.helliwell 2017-04-25 08:51:04 UTC
Created attachment 131016 [details]
MM+NM logs

I have NM setup with ModemManager and GSM modem, and can bring up the
connection. But when I enable a SIM PIN lock, the first 'nmcli conn
up' from reboot fails.
I can see that the modem is being unlocked ok, and is indeed
registered afterwards. And a retry of the 'conn up' also works.
Comment 1 colin.helliwell 2017-04-25 08:55:05 UTC
Created attachment 131018 [details] [review]
Patch highlighting the issue

The attached patch - based on one from Dan - both highlights the issue (printing "######## parallel enables!" when it occurs) and resolves it. Whether it is the most effective solution, I don't know.
Comment 2 Aleksander Morgado 2017-04-25 09:01:41 UTC
Comment on attachment 131018 [details] [review]
Patch highlighting the issue

Review of attachment 131018 [details] [review]:
-----------------------------------------------------------------

::: src/mm-broadband-modem.c
@@ +9461,5 @@
> +    g_object_get (self,
> +                  MM_IFACE_MODEM_STATE, &state,
> +                  NULL);
> +
> +    if ((state < MM_MODEM_STATE_ENABLED) || (state > MM_MODEM_STATE_REGISTERED)) {

Why would it be an error if the final state is > REGISTERED? If it got connected while we were waiting for a final state, I'd say the modem is at least in the "enabled" state, which wouldn't be an error.
Comment 3 colin.helliwell 2017-04-25 09:24:34 UTC
(In reply to Aleksander Morgado from comment #2)
> Comment on attachment 131018 [details] [review] [review]
> Patch highlighting the issue
> 
> Review of attachment 131018 [details] [review] [review]:
> -----------------------------------------------------------------
> 
> ::: src/mm-broadband-modem.c
> @@ +9461,5 @@
> > +    g_object_get (self,
> > +                  MM_IFACE_MODEM_STATE, &state,
> > +                  NULL);
> > +
> > +    if ((state < MM_MODEM_STATE_ENABLED) || (state > MM_MODEM_STATE_REGISTERED)) {
> 
> Why would it be an error if the final state is > REGISTERED? If it got
> connected while we were waiting for a final state, I'd say the modem is at
> least in the "enabled" state, which wouldn't be an error.

Just caution on my part. Dan originally suggested 'if (state != MM_MODEM_STATE_ENABLED)' , but I found this wasn't passing because state had got to REGISTERED. So, to be on the safe side (unsure of possible bad effects e.g. on DISCONNECTING), I just 'widened' it slightly.
As I say, the patch isn't necessarily *the* proposed solution - but does at least help illustrate the issue.
Comment 4 Aleksander Morgado 2017-04-26 08:53:14 UTC
(In reply to colin.helliwell from comment #3)
> (In reply to Aleksander Morgado from comment #2)
> > Comment on attachment 131018 [details] [review] [review] [review]
> > Patch highlighting the issue
> > 
> > Review of attachment 131018 [details] [review] [review] [review]:
> > -----------------------------------------------------------------
> > 
> > ::: src/mm-broadband-modem.c
> > @@ +9461,5 @@
> > > +    g_object_get (self,
> > > +                  MM_IFACE_MODEM_STATE, &state,
> > > +                  NULL);
> > > +
> > > +    if ((state < MM_MODEM_STATE_ENABLED) || (state > MM_MODEM_STATE_REGISTERED)) {
> > 
> > Why would it be an error if the final state is > REGISTERED? If it got
> > connected while we were waiting for a final state, I'd say the modem is at
> > least in the "enabled" state, which wouldn't be an error.
> 
> Just caution on my part. Dan originally suggested 'if (state !=
> MM_MODEM_STATE_ENABLED)' , but I found this wasn't passing because state had
> got to REGISTERED. So, to be on the safe side (unsure of possible bad
> effects e.g. on DISCONNECTING), I just 'widened' it slightly.
> As I say, the patch isn't necessarily *the* proposed solution - but does at
> least help illustrate the issue.

A modem in REGISTERED state is already ENABLED, so I wouldn't consider that an error, especially since the ENABLED->REGISTERED transition is automatic.
Comment 5 GitLab Migration User 2018-06-10 09:05:22 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/65.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.