mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-04 05:26:58 +00:00
Do not invalidate the probe for emulated devices
If the device does not replug, and we change the GUsbDevice because the phase changed we don't want reprobe the hardware. If we reprobe then the emulated device will request extra data compared to the real device, which will cause emulation to fail.
This commit is contained in:
parent
b44ee4cf54
commit
654dd756b7
@ -664,7 +664,8 @@ fu_usb_device_set_dev(FuUsbDevice *device, GUsbDevice *usb_device)
|
||||
g_return_if_fail(FU_IS_USB_DEVICE(device));
|
||||
|
||||
/* need to re-probe hardware */
|
||||
fu_device_probe_invalidate(FU_DEVICE(device));
|
||||
if (!fu_device_has_flag(FU_DEVICE(device), FWUPD_DEVICE_FLAG_EMULATED))
|
||||
fu_device_probe_invalidate(FU_DEVICE(device));
|
||||
|
||||
/* allow replacement */
|
||||
g_set_object(&priv->usb_device, usb_device);
|
||||
|
@ -7480,7 +7480,8 @@ fu_engine_backend_device_changed_cb(FuBackend *backend, FuDevice *device, FuEngi
|
||||
continue;
|
||||
if (g_strcmp0(fu_usb_device_get_platform_id(FU_USB_DEVICE(device_tmp)),
|
||||
fu_usb_device_get_platform_id(FU_USB_DEVICE(device))) == 0) {
|
||||
g_debug("incorporating new GUsbDevice for %s", fu_device_get_id(device));
|
||||
g_debug("incorporating new GUsbDevice for %s",
|
||||
fu_device_get_id(device_tmp));
|
||||
fu_device_incorporate(device_tmp, device);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user