Issues with modem reset

Piotr Figiel figiel at gmail.com
Wed Jun 28 14:42:44 UTC 2017


Hi Carlo, Aleksander,

2017-06-28 15:10 GMT+02:00 Carlo Lobrano <c.lobrano at gmail.com>:

> (...)
>


> Not really sure what's happening here, but I do remember a similar issue
> where adding some new debug logs, it appeared that the reply sent to
> PORTCFG? parser was an empty string, the thread in this mailing list is
> "[PATCH] Hardening PORTCFG parse reply" dated mid July 2016.
>

Thanks for this hint, yes indeed this looks very similar. There is an
interesting question from Aleksander in that thread:

>* A long shot maybe, but did you see this issue while you were testing the SIM hotplug thing? Remember that there's an extra port open reference in that case.
*

It looks to me that the ports are being used to support bearer disconnect,
at least in this case I have logs for. The bearer object holds reference to
the modem and the ports and disconnection process survives physical modem
re-appearence. I.e. reopening the port in data_reopen_3gpp at
1719500205.410219 succeeds at 1719500206.509531. Despite original ports
disappearing in the middle (e.g. at 1719500205.440044).

I'm now testing following patch, Aleksander, could you take a look at this?
This prevents disconnect to continue (and to reopen the port) if PDP
context deactivation failed. Is this acceptable way to sort this out? Or
should the disconnect somehow be cancelled upon device removal? I wonder
why this error wasn't fatal, is there a case where it's important for this
process to continue?

So far my test is ongoing for some time without errors with this, I'll keep
it running over the night.

diff --git a/plugins/telit/mm-broadband-modem-telit.c
b/plugins/telit/mm-broadband-modem-telit.c
index 5c4a6c5..af11fa3 100644
--- a/plugins/telit/mm-broadband-modem-telit.c
+++ b/plugins/telit/mm-broadband-modem-telit.c
@@ -566,7 +566,7 @@ modem_reset (MMIfaceModem *self,
 {
     mm_base_modem_at_command (MM_BASE_MODEM (self),
                               "AT#REBOOT",
-                              3,
+                              8,
                               FALSE,
                               callback,
                               user_data);
diff --git a/src/mm-broadband-bearer.c b/src/mm-broadband-bearer.c
index aeff2ef..db38970 100644
--- a/src/mm-broadband-bearer.c
+++ b/src/mm-broadband-bearer.c
@@ -1586,8 +1586,10 @@ cgact_ready (MMBaseModem *modem,
     if (!error)
         ctx->cgact_sent = TRUE;
     else {
-        mm_dbg ("PDP context deactivation failed (not fatal): %s",
error->message);
-        g_error_free (error);
+        mm_dbg ("PDP context deactivation failed: %s", error->message);
+        g_simple_async_result_take_error (ctx->result, error);
+        detailed_disconnect_context_complete_and_free (ctx);
+        return;
     }

     data_reopen_3gpp (ctx);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20170628/31c2469e/attachment-0001.html>


More information about the ModemManager-devel mailing list