summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2018-07-27 12:08:27 +0200
committerDan Williams <dcbw@redhat.com>2018-08-10 04:19:13 +0000
commitcf500014b6db4ab9548d9f6fde35c21ab4c05697 (patch)
tree2c0a421c857c2be8c1e23f2dfdebcdb64b844868
parent548b7f88473827954a389d96dac298fa6b6453a6 (diff)
downloadModemManager-cf500014b6db4ab9548d9f6fde35c21ab4c05697.tar.gz
port-probe: no AT probing on possible QCDM port
Ports flagged as being QCDM will not be probed for AT. QCDM probing will be performed normally, the udev tags only give hints, we still need to know whether the TTYs are QCDM-capable or not.
-rw-r--r--src/mm-port-probe.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/mm-port-probe.c b/src/mm-port-probe.c
index e35a3ae99..1739318a8 100644
--- a/src/mm-port-probe.c
+++ b/src/mm-port-probe.c
@@ -92,6 +92,7 @@ struct _MMPortProbePrivate {
gboolean maybe_at_primary;
gboolean maybe_at_secondary;
gboolean maybe_at_ppp;
+ gboolean maybe_qcdm;
/* Current probing task. Only one can be available at a time */
GTask *task;
@@ -1070,10 +1071,13 @@ serial_probe_schedule (MMPortProbe *self)
return;
/* If we got some custom initialization setup requested, go on with it
- * first. */
+ * first. We completely ignore the custom initialization if the serial port
+ * that we receive in the context isn't an AT port (e.g. if it was flagged
+ * as not being an AT port early) */
if (!ctx->at_custom_init_run &&
ctx->at_custom_init &&
- ctx->at_custom_init_finish) {
+ ctx->at_custom_init_finish &&
+ MM_IS_PORT_SERIAL_AT (ctx->serial)) {
ctx->at_custom_init (self,
MM_PORT_SERIAL_AT (ctx->serial),
ctx->at_probing_cancellable,
@@ -1393,6 +1397,14 @@ mm_port_probe_run (MMPortProbe *self,
mm_port_probe_set_result_qcdm (self, FALSE);
}
+ /* If this is a port flagged as being a QCDM port, don't do any AT probing */
+ if (self->priv->maybe_qcdm) {
+ mm_dbg ("(%s/%s) no AT probing in possible QCDM port",
+ mm_kernel_device_get_subsystem (self->priv->port),
+ mm_kernel_device_get_name (self->priv->port));
+ mm_port_probe_set_result_at (self, FALSE);
+ }
+
/* Check if we already have the requested probing results.
* We will fix here the 'ctx->flags' so that we only request probing
* for the missing things. */
@@ -1776,6 +1788,7 @@ set_property (GObject *object,
self->priv->maybe_at_primary = mm_kernel_device_get_property_as_boolean (self->priv->port, "ID_MM_PORT_TYPE_AT_PRIMARY");
self->priv->maybe_at_secondary = mm_kernel_device_get_property_as_boolean (self->priv->port, "ID_MM_PORT_TYPE_AT_SECONDARY");
self->priv->maybe_at_ppp = mm_kernel_device_get_property_as_boolean (self->priv->port, "ID_MM_PORT_TYPE_AT_PPP");
+ self->priv->maybe_qcdm = mm_kernel_device_get_property_as_boolean (self->priv->port, "ID_MM_PORT_TYPE_QCDM");
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);