Re: [MM 07] Huawei plugin: "Failed to find primary port"
- From: Aleksander Morgado <aleksander lanedo com>
- To: Bjørn Mork <bjorn mork no>
- Cc: networkmanager-list gnome org
- Subject: Re: [MM 07] Huawei plugin: "Failed to find primary port"
- Date: Mon, 03 Sep 2012 17:21:31 +0200
Hey Bjørn
On 09/03/2012 05:13 PM, Aleksander Morgado wrote:
> On 09/03/2012 03:52 PM, Bjørn Mork wrote:
>> ModemManager[13706]: <warn> [1346679919.021922] [mm-plugin-manager.c:283] plugin_supports_port_ready(): (Huawei): (tty/ttyUSB4) error when checking support: 'Defer needed'
>> ModemManager[13706]: <debug> [1346679919.022013] [mm-plugin-manager.c:320] plugin_supports_port_ready(): (tty/ttyUSB4): ignoring port unsupported by physical modem's plugin
>> ModemManager[13706]: <debug> [1346679919.022067] [mm-plugin-manager.c:140] port_probe_context_finished(): (tty/ttyUSB4): not supported by any plugin
>
> Something wrong in the logic to defer port probings; will take a look at
> that.
>
Are you able to test the attached patch, to see if it solves your issue?
--
Aleksander
>From c4ba7f0798058081e51777c2674a64cd6c8eb111 Mon Sep 17 00:00:00 2001
From: Aleksander Morgado <aleksander lanedo com>
Date: Mon, 3 Sep 2012 17:20:29 +0200
Subject: [PATCH] plugin: defer task if supports check tells us to retry
Huawei modems will probe interface 0 always first; if we try to probe another
interface meanwhile the supports check will give us a MM_CORE_ERROR_RETRY error,
indicating that we need to defer the probing of the port.
---
src/mm-plugin.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/mm-plugin.c b/src/mm-plugin.c
index a800997..8db4c04 100644
--- a/src/mm-plugin.c
+++ b/src/mm-plugin.c
@@ -477,8 +477,18 @@ port_probe_run_ready (MMPortProbe *probe,
g_simple_async_result_set_op_res_gpointer (ctx->result,
GUINT_TO_POINTER (MM_PLUGIN_SUPPORTS_PORT_UNSUPPORTED),
NULL);
- } else {
- /* For remaining errors, just propagate them */
+ }
+ /* Probing failed but the plugin tells us to retry; so we'll defer the
+ * probing a bit */
+ else if (g_error_matches (error,
+ MM_CORE_ERROR,
+ MM_CORE_ERROR_RETRY)) {
+ g_simple_async_result_set_op_res_gpointer (ctx->result,
+ GUINT_TO_POINTER (MM_PLUGIN_SUPPORTS_PORT_DEFER),
+ NULL);
+ }
+ /* For remaining errors, just propagate them */
+ else {
g_simple_async_result_take_error (ctx->result, error);
}
} else {
--
1.7.11.4
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]