File mm-huawei-port-detection.patch of Package ModemManager
Index: ModemManager-0.1/plugins/mm-plugin-huawei.c
===================================================================
--- ModemManager-0.1.orig/plugins/mm-plugin-huawei.c
+++ ModemManager-0.1/plugins/mm-plugin-huawei.c
@@ -130,15 +130,13 @@ find_second_port (LibHalContext *ctx, co
int num_children = 0;
int i;
- children = libhal_manager_find_device_string_match (ctx, "info.parent", parent, &num_children, NULL);
- for (i = 0; i < num_children && second_port == NULL; i++) {
- const char *child = children[i];
-
- if (libhal_device_property_exists (ctx, child, "serial.port", NULL) &&
- libhal_device_get_property_int (ctx, child, "serial.port", NULL) == 1)
+ if (!libhal_device_property_exists (ctx, parent, "usb.interface.number", NULL) ||
+ libhal_device_get_property_int (ctx, parent, "usb.interface.number", NULL) != 1)
+ return NULL;
- second_port = libhal_device_get_property_string (ctx, child, "serial.device", NULL);
- }
+ children = libhal_manager_find_device_string_match (ctx, "info.parent", parent, &num_children, NULL);
+ for (i = 0; i < num_children && second_port == NULL; i++)
+ second_port = libhal_device_get_property_string (ctx, children[i], "serial.device", NULL);
libhal_free_string_array (children);
Index: ModemManager-0.1/plugins/mm-modem-huawei.c
===================================================================
--- ModemManager-0.1.orig/plugins/mm-modem-huawei.c
+++ ModemManager-0.1/plugins/mm-modem-huawei.c
@@ -32,6 +32,7 @@ mm_modem_huawei_new (const char *data_de
return MM_MODEM (g_object_new (MM_TYPE_MODEM_HUAWEI,
MM_SERIAL_DEVICE, monitor_device,
+ MM_SERIAL_CARRIER_DETECT, FALSE,
MM_MODEM_DATA_DEVICE, data_device,
MM_MODEM_DRIVER, driver,
NULL));