diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2013-02-26 20:57:37 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2013-02-26 21:02:12 +0100 |
commit | 3f3950bd12e4e09bf6505e7a3f96acdee924ad1c (patch) | |
tree | 3a82629283d22cc7f4695c911f620dac66877890 | |
parent | 8d74b11bd3a5627490a25c52ffddae0843c2ee49 (diff) | |
download | ModemManager-3f3950bd12e4e09bf6505e7a3f96acdee924ad1c.tar.gz |
plugins: log about all port type hints received from udev
-rw-r--r-- | plugins/longcheer/mm-plugin-longcheer.c | 12 | ||||
-rw-r--r-- | plugins/nokia/mm-plugin-nokia-icera.c | 11 | ||||
-rw-r--r-- | plugins/simtech/mm-plugin-simtech.c | 12 | ||||
-rw-r--r-- | plugins/x22x/mm-plugin-x22x.c | 12 | ||||
-rw-r--r-- | plugins/zte/mm-plugin-zte.c | 13 |
5 files changed, 47 insertions, 13 deletions
diff --git a/plugins/longcheer/mm-plugin-longcheer.c b/plugins/longcheer/mm-plugin-longcheer.c index 6f79d9f5d..4d9596d88 100644 --- a/plugins/longcheer/mm-plugin-longcheer.c +++ b/plugins/longcheer/mm-plugin-longcheer.c @@ -213,11 +213,17 @@ grab_port (MMPlugin *self, * be the data/primary port on these devices. We have to tag them based on * what the Windows .INF files say the port layout should be. */ - if (g_udev_device_get_property_as_boolean (port, "ID_MM_LONGCHEER_PORT_TYPE_MODEM")) + if (g_udev_device_get_property_as_boolean (port, "ID_MM_LONGCHEER_PORT_TYPE_MODEM")) { + mm_dbg ("longcheer: AT port '%s/%s' flagged as primary", + mm_port_probe_get_port_subsys (probe), + mm_port_probe_get_port_name (probe)); pflags = MM_AT_PORT_FLAG_PRIMARY; - else if (g_udev_device_get_property_as_boolean (port, "ID_MM_LONGCHEER_PORT_TYPE_AUX")) + } else if (g_udev_device_get_property_as_boolean (port, "ID_MM_LONGCHEER_PORT_TYPE_AUX")) { + mm_dbg ("longcheer: AT port '%s/%s' flagged as secondary", + mm_port_probe_get_port_subsys (probe), + mm_port_probe_get_port_name (probe)); pflags = MM_AT_PORT_FLAG_SECONDARY; - else { + } else { /* If the port was tagged by the udev rules but isn't a primary or secondary, * then ignore it to guard against race conditions if a device just happens * to show up with more than two AT-capable ports. diff --git a/plugins/nokia/mm-plugin-nokia-icera.c b/plugins/nokia/mm-plugin-nokia-icera.c index d0b25f613..cca34e0c0 100644 --- a/plugins/nokia/mm-plugin-nokia-icera.c +++ b/plugins/nokia/mm-plugin-nokia-icera.c @@ -70,10 +70,17 @@ grab_port (MMPlugin *self, /* Look for port type hints */ if (mm_port_probe_is_at (probe)) { - if (g_udev_device_get_property_as_boolean (port, "ID_MM_NOKIA_PORT_TYPE_MODEM")) + if (g_udev_device_get_property_as_boolean (port, "ID_MM_NOKIA_PORT_TYPE_MODEM")) { + mm_dbg ("Nokia: AT port '%s/%s' flagged as primary", + mm_port_probe_get_port_subsys (probe), + mm_port_probe_get_port_name (probe)); pflags = MM_AT_PORT_FLAG_PRIMARY; - else if (g_udev_device_get_property_as_boolean (port, "ID_MM_NOKIA_PORT_TYPE_AUX")) + } else if (g_udev_device_get_property_as_boolean (port, "ID_MM_NOKIA_PORT_TYPE_AUX")) { + mm_dbg ("Nokia: AT port '%s/%s' flagged as secondary", + mm_port_probe_get_port_subsys (probe), + mm_port_probe_get_port_name (probe)); pflags = MM_AT_PORT_FLAG_SECONDARY; + } } return mm_base_modem_grab_port (modem, diff --git a/plugins/simtech/mm-plugin-simtech.c b/plugins/simtech/mm-plugin-simtech.c index 80eca362b..9923cb7da 100644 --- a/plugins/simtech/mm-plugin-simtech.c +++ b/plugins/simtech/mm-plugin-simtech.c @@ -21,6 +21,7 @@ #define _LIBMM_INSIDE_MM #include <libmm-glib.h> +#include "mm-log.h" #include "mm-plugin-simtech.h" #include "mm-broadband-modem-simtech.h" @@ -73,10 +74,17 @@ grab_port (MMPlugin *self, * be the data/primary port on these devices. We have to tag them based on * what the Windows .INF files say the port layout should be. */ - if (g_udev_device_get_property_as_boolean (port, "ID_MM_SIMTECH_PORT_TYPE_MODEM")) + if (g_udev_device_get_property_as_boolean (port, "ID_MM_SIMTECH_PORT_TYPE_MODEM")) { + mm_dbg ("Simtech: AT port '%s/%s' flagged as primary", + mm_port_probe_get_port_subsys (probe), + mm_port_probe_get_port_name (probe)); pflags = MM_AT_PORT_FLAG_PRIMARY; - else if (g_udev_device_get_property_as_boolean (port, "ID_MM_SIMTECH_PORT_TYPE_AUX")) + } else if (g_udev_device_get_property_as_boolean (port, "ID_MM_SIMTECH_PORT_TYPE_AUX")) { + mm_dbg ("Simtech: AT port '%s/%s' flagged as secondary", + mm_port_probe_get_port_subsys (probe), + mm_port_probe_get_port_name (probe)); pflags = MM_AT_PORT_FLAG_SECONDARY; + } /* If the port was tagged by the udev rules but isn't a primary or secondary, * then ignore it to guard against race conditions if a device just happens diff --git a/plugins/x22x/mm-plugin-x22x.c b/plugins/x22x/mm-plugin-x22x.c index 096069071..53440d140 100644 --- a/plugins/x22x/mm-plugin-x22x.c +++ b/plugins/x22x/mm-plugin-x22x.c @@ -212,11 +212,17 @@ grab_port (MMPlugin *self, * be the data/primary port on these devices. We have to tag them based on * what the Windows .INF files say the port layout should be. */ - if (g_udev_device_get_property_as_boolean (port, "ID_MM_X22X_PORT_TYPE_MODEM")) + if (g_udev_device_get_property_as_boolean (port, "ID_MM_X22X_PORT_TYPE_MODEM")) { + mm_dbg ("x22x: AT port '%s/%s' flagged as primary", + mm_port_probe_get_port_subsys (probe), + mm_port_probe_get_port_name (probe)); pflags = MM_AT_PORT_FLAG_PRIMARY; - else if (g_udev_device_get_property_as_boolean (port, "ID_MM_X22X_PORT_TYPE_AUX")) + } else if (g_udev_device_get_property_as_boolean (port, "ID_MM_X22X_PORT_TYPE_AUX")) { + mm_dbg ("x22x: AT port '%s/%s' flagged as secondary", + mm_port_probe_get_port_subsys (probe), + mm_port_probe_get_port_name (probe)); pflags = MM_AT_PORT_FLAG_SECONDARY; - else { + } else { /* If the port was tagged by the udev rules but isn't a primary or secondary, * then ignore it to guard against race conditions if a device just happens * to show up with more than two AT-capable ports. diff --git a/plugins/zte/mm-plugin-zte.c b/plugins/zte/mm-plugin-zte.c index da3cc06a9..59d4380d2 100644 --- a/plugins/zte/mm-plugin-zte.c +++ b/plugins/zte/mm-plugin-zte.c @@ -98,14 +98,21 @@ grab_port (MMPlugin *self, if (mm_port_probe_is_at (probe)) { /* Look for port type hints */ - if (g_udev_device_get_property_as_boolean (port, "ID_MM_ZTE_PORT_TYPE_MODEM")) + if (g_udev_device_get_property_as_boolean (port, "ID_MM_ZTE_PORT_TYPE_MODEM")) { + mm_dbg ("ZTE: AT port '%s/%s' flagged as primary", + mm_port_probe_get_port_subsys (probe), + mm_port_probe_get_port_name (probe)); pflags = MM_AT_PORT_FLAG_PRIMARY; - else if (g_udev_device_get_property_as_boolean (port, "ID_MM_ZTE_PORT_TYPE_AUX")) + } else if (g_udev_device_get_property_as_boolean (port, "ID_MM_ZTE_PORT_TYPE_AUX")) { + mm_dbg ("ZTE: AT port '%s/%s' flagged as secondary", + mm_port_probe_get_port_subsys (probe), + mm_port_probe_get_port_name (probe)); pflags = MM_AT_PORT_FLAG_SECONDARY; + } } if (g_udev_device_get_property_as_boolean (port, "ID_MM_ZTE_ICERA_DHCP")) { - mm_dbg ("Icera-based ZTE modem will use DHCP"); + mm_dbg ("ZTE: Icera-based modem will use DHCP"); g_object_set (modem, MM_BROADBAND_MODEM_ICERA_DEFAULT_IP_METHOD, MM_BEARER_IP_METHOD_DHCP, NULL); |