udev: cancel reset if modem is already back

Cancel reset if modem is back before reset sequence is started.
When upgrading the modem through fwupd, it will enter fastboot.
Therefore, it disappears from the USB bus for a few ms.
However, the eg25-manager considers this as an issue and
resets the modem a bit later during the upgrade process.
To avoid this, cancel the reset sequence if the modem is already
back before the reset sequence is started. This will take less than 3
seconds.
This commit is contained in:
Dylan Van Assche
2021-12-20 14:07:15 +01:00
committed by Arnaud Ferraris
parent 9cf51b9529
commit 61c89a003a
3 changed files with 25 additions and 12 deletions

View File

@@ -70,7 +70,8 @@ enum EG25Config {
struct EG25Manager {
GMainLoop *loop;
guint reset_timer;
guint complete_reset_timer;
guint schedule_reset_timer;
gboolean use_libusb;
guint usb_vid;
guint usb_pid;