summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2013-04-24 14:44:57 -0500
committerDan Williams <dcbw@redhat.com>2013-04-25 09:18:53 -0500
commitcabf53179eb0c660ff3bdfb765645a3d0f88530d (patch)
tree2a3188a0894e6a9afde6f5da9b9768e3f788431d
parentcebe828f7fb62585614b756efb80799286f35261 (diff)
downloadModemManager-cabf53179eb0c660ff3bdfb765645a3d0f88530d.tar.gz
sierra: handle probing ERROR response better
The USB305 (Icera-based) apparently has a port that replies to everything with ERROR, and that port is unusable. Make sure it's ignored, otherwise MM may claim it as the primary AT port since it technically speaks AT.
-rw-r--r--plugins/sierra/mm-plugin-sierra.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/sierra/mm-plugin-sierra.c b/plugins/sierra/mm-plugin-sierra.c
index fc39b76e9..76ae323e3 100644
--- a/plugins/sierra/mm-plugin-sierra.c
+++ b/plugins/sierra/mm-plugin-sierra.c
@@ -96,6 +96,13 @@ gcap_ready (MMAtSerialPort *port,
mm_port_probe_set_result_at (ctx->probe, FALSE);
ctx->retries = 0;
}
+ /* Some Icera-based devices (eg, USB305) have an AT-style port that
+ * replies to everything with ERROR, so tag as unsupported; sometimes
+ * the real AT ports do this too, so let a retry tag the port as
+ * supported if it responds correctly later. */
+ else if (g_error_matches (error, MM_MOBILE_EQUIPMENT_ERROR, MM_MOBILE_EQUIPMENT_ERROR_UNKNOWN)) {
+ mm_port_probe_set_result_at (ctx->probe, FALSE);
+ }
/* Just retry... */
sierra_custom_init_step (ctx);