modem-manager: uninhibit modem after upgrade

When fastboot is used, the modem is rediscovered through udev
after upgrading. However, the modem-manager plugin did not mark
the modem as unhibited with ModemManager. This resulted into
ModemManager not exposing the modem without restarting ModemManager or
rebooting the device.

Mark the modem as uninhibited and do not take ownership over the
plugin data as this caused segfaults.
This commit is contained in:
Dylan Van Assche 2021-12-18 16:44:21 +01:00 committed by Richard Hughes
parent 73f6767d87
commit e3b62e643b

View File

@ -128,6 +128,10 @@ fu_plugin_mm_udev_device_port_added(FuPlugin *plugin,
fu_plugin_mm_udev_device_ports_timeout_reset(plugin);
return;
}
/* device is being created, update is complete, uninhibit */
fu_plugin_mm_uninhibit_device(plugin);
/* create device and add to cache */
dev = fu_mm_device_udev_new(fu_plugin_get_context(plugin), priv->manager, priv->inhibited);
fu_mm_device_udev_add_port(dev, subsystem, path, ifnum);