diff --git a/plugins/unifying/fu-plugin-unifying.c b/plugins/unifying/fu-plugin-unifying.c index 10e227906..f30812197 100644 --- a/plugins/unifying/fu-plugin-unifying.c +++ b/plugins/unifying/fu-plugin-unifying.c @@ -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 { diff --git a/plugins/unifying/lu-device.h b/plugins/unifying/lu-device.h index 449c69429..775750e54 100644 --- a/plugins/unifying/lu-device.h +++ b/plugins/unifying/lu-device.h @@ -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, diff --git a/plugins/unifying/lu-tool.c b/plugins/unifying/lu-tool.c index 41a8ff517..7b8690102 100644 --- a/plugins/unifying/lu-tool.c +++ b/plugins/unifying/lu-tool.c @@ -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);