diff options
author | linzhecheng <linzhecheng@huawei.com> | 2018-11-30 14:47:00 +0800 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2018-12-10 14:39:54 +0100 |
commit | 5621d0453c60ce4fc104a9795791d6402386c3b3 (patch) | |
tree | d18cc56acc1acef88c3eeacd5a28419bb85003ab | |
parent | f8224fb0faec9f4184b29b8158534536e6580748 (diff) |
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 <linzhecheng@huawei.com>
Message-id: 20181130064700.5984-1-linzhecheng@huawei.com
[ kraxel: whitespace fixup ]
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r-- | hw/usb/host-libusb.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); } } |