UPSTREAM: 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.

(cherry picked from commit 48ee4d3012232316d7a580ef26f08133ba1d5ed5)

BUG=b:302199106
TEST=emerge-nissa modemmanager-next && cros deploy
TEST=Switch to esim slot && plug/unplug pSIM

Change-Id: I99e42717fe8780841a00a8662202cd5f4b0284a7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/modemmanager-next/+/4973549
Tested-by: Madhav <madhavadas@google.com>
Commit-Queue: Aleksander Morgado <aleksandermj@google.com>
Auto-Submit: Madhav <madhavadas@google.com>
Reviewed-by: Aleksander Morgado <aleksandermj@google.com>
1 file changed