unifying: Use the daemon replug timeouts

This commit is contained in:
Richard Hughes 2017-12-14 18:09:04 +00:00
parent 650dadebe6
commit d8a175ee90
3 changed files with 3 additions and 6 deletions

View File

@ -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 {

View File

@ -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,

View File

@ -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);