From 5621d0453c60ce4fc104a9795791d6402386c3b3 Mon Sep 17 00:00:00 2001 From: linzhecheng Date: Fri, 30 Nov 2018 14:47:00 +0800 Subject: usb-host: reset and close libusb_device_handle before qemu exit we should perform these things as same as usb_host_close. Signed-off-by: linzhecheng Message-id: 20181130064700.5984-1-linzhecheng@huawei.com [ kraxel: whitespace fixup ] Signed-off-by: Gerd Hoffmann --- hw/usb/host-libusb.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'hw/usb') diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index b6602de..833250a 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); } } -- cgit v1.1