mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-06 04:57:59 +00:00
unifying: Use the daemon replug timeouts
This commit is contained in:
parent
650dadebe6
commit
d8a175ee90
@ -118,7 +118,7 @@ fu_plugin_update_detach (FuPlugin *plugin, FuDevice *dev, GError **error)
|
||||
(GDestroyNotify) g_object_unref);
|
||||
if (!lu_context_wait_for_replug (data->ctx,
|
||||
device,
|
||||
FU_DEVICE_TIMEOUT_REPLUG,
|
||||
FU_DEVICE_REMOVE_DELAY_RE_ENUMERATE,
|
||||
error))
|
||||
return FALSE;
|
||||
} else {
|
||||
@ -153,7 +153,7 @@ fu_plugin_update_attach (FuPlugin *plugin, FuDevice *dev, GError **error)
|
||||
(GDestroyNotify) g_object_unref);
|
||||
if (!lu_context_wait_for_replug (data->ctx,
|
||||
device,
|
||||
FU_DEVICE_TIMEOUT_REPLUG,
|
||||
FU_DEVICE_REMOVE_DELAY_RE_ENUMERATE,
|
||||
error))
|
||||
return FALSE;
|
||||
} else {
|
||||
|
@ -66,9 +66,6 @@ struct _LuDeviceClass
|
||||
#define LU_DEVICE_EP3 0x83
|
||||
#define LU_DEVICE_TIMEOUT_MS 2500
|
||||
|
||||
/* some USB hubs take a looong time to re-connect the device */
|
||||
#define FU_DEVICE_TIMEOUT_REPLUG 10000 /* ms */
|
||||
|
||||
typedef enum {
|
||||
LU_DEVICE_KIND_UNKNOWN,
|
||||
LU_DEVICE_KIND_RUNTIME,
|
||||
|
@ -315,7 +315,7 @@ lu_tool_write (FuLuToolPrivate *priv, gchar **values, GError **error)
|
||||
if (lu_device_has_flag (device, LU_DEVICE_FLAG_DETACH_WILL_REPLUG)) {
|
||||
if (!lu_context_wait_for_replug (priv->ctx,
|
||||
device,
|
||||
FU_DEVICE_TIMEOUT_REPLUG,
|
||||
FU_DEVICE_REMOVE_DELAY_RE_ENUMERATE,
|
||||
error))
|
||||
return FALSE;
|
||||
g_usleep (G_USEC_PER_SEC);
|
||||
|
Loading…
Reference in New Issue
Block a user