From 48ee4d3012232316d7a580ef26f08133ba1d5ed5 Mon Sep 17 00:00:00 2001 From: Madhav Date: Thu, 19 Oct 2023 19:59:48 +0000 Subject: mm-port-probe: Invoke the mm_port_mbim_open function with a GCancellable object After the modem recovers, the ports are up but not yet responsive. When MM tries to probe the ports, they do not respond. As a result, the probing tasks are left ongoing, waiting for a response from the modem. If the modem drops off the bus for any reason, the cdc-wdm port probing task is not immediately canceled. This patch fixes this issue by passing a cancellable object to mm_port_mbim_open(). In other words, the patch ensures that the cdc-wdm port probing task is canceled if the modem drops off the bus before the task completes. This prevents the task from preventing other port probing tasks from starting. --- src/mm-port-probe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mm-port-probe.c b/src/mm-port-probe.c index 85f30e60..26e6a4ee 100644 --- a/src/mm-port-probe.c +++ b/src/mm-port-probe.c @@ -595,7 +595,7 @@ wdm_probe_mbim (MMPortProbe *self) #if defined WITH_QMI && QMI_MBIM_QMUX_SUPPORTED FALSE, /* Don't check QMI over MBIM support at this stage */ #endif - NULL, + g_task_get_cancellable (self->priv->task), (GAsyncReadyCallback) mbim_port_open_ready, self); #else -- cgit v1.2.3-70-g09d2