mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Re-attach usb device to kernel while usb_host_open fails
Signed-off-by: Lin Ma <lma@suse.com> Reviewed-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
@@ -889,6 +889,9 @@ static int usb_host_open(USBHostDevice *s, libusb_device *dev)
|
||||
fail:
|
||||
trace_usb_host_open_failure(bus_num, addr);
|
||||
if (s->dh != NULL) {
|
||||
usb_host_release_interfaces(s);
|
||||
libusb_reset_device(s->dh);
|
||||
usb_host_attach_kernel(s);
|
||||
libusb_close(s->dh);
|
||||
s->dh = NULL;
|
||||
s->dev = NULL;
|
||||
|
||||
Reference in New Issue
Block a user