Skip to contentSkip to conversation

usb-host: reset and close libusb_device_handle before qemu exit

PATCH New linzhecheng 1 participant 1 message Dec 11, 2018

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 usb-host: reset and close libusb_device_handle before qemu exit

we should perform these actions as same as usb_host_close.

hw/usb/host-libusb.c +2 -0
index b6602ded4e..833250a886 100644
@@ -988,7 +988,9 @@ static void usb_host_exit_notifier(struct Notifier *n, void *data)
 
     if (s->dh) {
         usb_host_release_interfaces(s);
+        libusb_reset_device(s->dh);
         usb_host_attach_kernel(s);
+        libusb_close(s->dh);
     }
 }
 
Signature · 1 line
2.12.2.windows.2