qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v2] usb-host: reset and close libusb_device_handle b


From: linzhecheng
Subject: [Qemu-devel] [PATCH v2] usb-host: reset and close libusb_device_handle before qemu exit
Date: Tue, 11 Dec 2018 09:06:56 +0800

we should perform these actions as same as usb_host_close.

Signed-off-by: linzhecheng <address@hidden>

diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
index b6602ded4e..833250a886 100644
--- a/hw/usb/host-libusb.c
+++ b/hw/usb/host-libusb.c
@@ -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);
     }
 }
 
-- 
2.12.2.windows.2





reply via email to

[Prev in Thread] Current Thread [Next in Thread]