diff -Nru modemmanager-0.6.0.0.really/debian/changelog modemmanager-0.6.0.0.really/debian/changelog --- modemmanager-0.6.0.0.really/debian/changelog 2013-04-01 17:07:41.000000000 +0200 +++ modemmanager-0.6.0.0.really/debian/changelog 2013-04-10 14:38:44.000000000 +0200 @@ -1,3 +1,12 @@ +modemmanager (0.6.0.0.really-0ubuntu5) raring; urgency=low + + * debian/patches/git_remove_connection_attempt_check_poll_explicitly_when_connected_1652019.patch, + debian/patches/git_gsm_always_try_plus_csq_if_plus_cind_fails_fix_bugs_5d854a3.patch: + Avoid modem-manager hanging or crashing on built-in Ericsson modem in + Lenovo Thinkpad Twist (LP: #1164023). + + -- Till Kamppeter Thu, 04 Apr 2013 21:05:06 +0200 + modemmanager (0.6.0.0.really-0ubuntu4) raring; urgency=low * debian/patches/git_cdma_double_free_05a4226.patch: cdma: avoid double free diff -Nru modemmanager-0.6.0.0.really/debian/patches/git_gsm_always_try_plus_csq_if_plus_cind_fails_fix_bugs_5d854a3.patch modemmanager-0.6.0.0.really/debian/patches/git_gsm_always_try_plus_csq_if_plus_cind_fails_fix_bugs_5d854a3.patch --- modemmanager-0.6.0.0.really/debian/patches/git_gsm_always_try_plus_csq_if_plus_cind_fails_fix_bugs_5d854a3.patch 1970-01-01 01:00:00.000000000 +0100 +++ modemmanager-0.6.0.0.really/debian/patches/git_gsm_always_try_plus_csq_if_plus_cind_fails_fix_bugs_5d854a3.patch 2013-04-10 14:38:05.000000000 +0200 @@ -0,0 +1,71 @@ +--- a/src/mm-generic-gsm.c ++++ b/src/mm-generic-gsm.c +@@ -4510,39 +4510,45 @@ + MMGenericGsmPrivate *priv; + GByteArray *indicators; + guint quality = 0; ++ GError *local = NULL; + + /* If the modem has already been removed, return without + * scheduling callback */ + if (mm_callback_info_check_modem_removed (info)) + return; + +- if (error) { +- info->error = g_error_copy (error); +- mm_callback_info_schedule (info); +- } +- +- priv = MM_GENERIC_GSM_GET_PRIVATE (info->modem); ++ if (!error) { ++ indicators = mm_parse_cind_query_response (response->str, &local); ++ if (indicators) { ++ priv = MM_GENERIC_GSM_GET_PRIVATE (info->modem); ++ ++ if (indicators->len >= priv->signal_ind) { ++ quality = g_array_index (indicators, guint8, priv->signal_ind); ++ quality = CLAMP (quality, 0, 5) * 20; ++ } else { ++ mm_dbg ("(%s): +CIND respose didn't include signal", ++ mm_port_get_device (MM_PORT (port))); ++ } ++ g_byte_array_free (indicators, TRUE); ++ } else if (local) { ++ mm_dbg ("(%s): %s", mm_port_get_device (MM_PORT (port)), local->message); ++ g_error_free (local); ++ } + +- indicators = mm_parse_cind_query_response (response->str, &info->error); +- if (indicators) { +- if (indicators->len >= priv->signal_ind) { +- quality = g_array_index (indicators, guint8, priv->signal_ind); +- quality = CLAMP (quality, 0, 5) * 20; ++ if (quality > 0) { ++ mm_generic_gsm_update_signal_quality (MM_GENERIC_GSM (info->modem), quality); ++ mm_callback_info_set_result (info, GUINT_TO_POINTER (quality), NULL); ++ mm_callback_info_schedule (info); ++ return; + } +- g_byte_array_free (indicators, TRUE); + } + +- if (quality > 0) { +- mm_generic_gsm_update_signal_quality (MM_GENERIC_GSM (info->modem), quality); +- mm_callback_info_set_result (info, GUINT_TO_POINTER (quality), NULL); +- mm_callback_info_schedule (info); +- } else { +- /* Some QMI-based devices say they support signal via CIND, +- * but always report zero even though they have signal. So +- * if we get zero signal, try CSQ too. (bgo #636040) +- */ +- mm_at_serial_port_queue_command (port, "+CSQ", 3, get_csq_done, info); +- } ++ /* Always fall back to +CSQ if for whatever reason +CIND failed. Also, ++ * some QMI-based devices say they support signal via CIND, but always ++ * report zero even though they have signal. So if we get zero signal ++ * from +CIND, try CSQ too. (bgo #636040) ++ */ ++ mm_at_serial_port_queue_command (port, "+CSQ", 3, get_csq_done, info); + } + + static void diff -Nru modemmanager-0.6.0.0.really/debian/patches/git_remove_connection_attempt_check_poll_explicitly_when_connected_1652019.patch modemmanager-0.6.0.0.really/debian/patches/git_remove_connection_attempt_check_poll_explicitly_when_connected_1652019.patch --- modemmanager-0.6.0.0.really/debian/patches/git_remove_connection_attempt_check_poll_explicitly_when_connected_1652019.patch 1970-01-01 01:00:00.000000000 +0100 +++ modemmanager-0.6.0.0.really/debian/patches/git_remove_connection_attempt_check_poll_explicitly_when_connected_1652019.patch 2013-04-04 21:01:24.000000000 +0200 @@ -0,0 +1,18 @@ +--- a/plugins/mm-modem-mbm.c ++++ b/plugins/mm-modem-mbm.c +@@ -671,9 +671,13 @@ + if (!priv->pending_connect_info) + return; + +- if (success) ++ if (success) { ++ /* Explicitly remove the AT*ENAP? callback, or we may end up scheduling ++ * it with an already disposed MMCallbackInfo. */ ++ mm_dbg ("disabled periodic connect attempt polling"); ++ mm_callback_info_set_data (priv->pending_connect_info, "mbm-enap-poll-id", NULL, NULL); + mm_generic_gsm_connect_complete (MM_GENERIC_GSM (self), NULL, priv->pending_connect_info); +- else { ++ } else { + GError *connect_error; + + connect_error = mm_modem_connect_error_for_code (MM_MODEM_CONNECT_ERROR_BUSY); diff -Nru modemmanager-0.6.0.0.really/debian/patches/series modemmanager-0.6.0.0.really/debian/patches/series --- modemmanager-0.6.0.0.really/debian/patches/series 2013-04-01 17:07:41.000000000 +0200 +++ modemmanager-0.6.0.0.really/debian/patches/series 2013-04-10 14:37:30.000000000 +0200 @@ -14,3 +14,5 @@ ericsson_h5321gw_usbids.patch handle_data07_capabilities_probing.patch linux-default-usb-id.patch +git_remove_connection_attempt_check_poll_explicitly_when_connected_1652019.patch +git_gsm_always_try_plus_csq_if_plus_cind_fails_fix_bugs_5d854a3.patch