On 2015/6/23 12:24, Lin Ma wrote:
Signed-off-by: Lin Ma <address@hidden>
---
hw/usb/host-libusb.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
index 10f4735..7258c4d 100644
--- a/hw/usb/host-libusb.c
+++ b/hw/usb/host-libusb.c
@@ -888,6 +888,11 @@ static int usb_host_open(USBHostDevice *s, libusb_device
*dev)
fail:
trace_usb_host_open_failure(bus_num, addr);
if (s->dh != NULL) {
+ qemu_remove_exit_notifier(&s->exit);
+ QTAILQ_REMOVE(&hostdevs, s, next);
This change will cause a regression. For example, if an usb device's
(assume that it's usb1.0 device) speed does not match the ehci adapter,
then then invoking usb_host_open failed. if somebody changes the usb
device to an usb 2.0 device, it will not auto check because the device has
removed from the global hostdevs list.
So I think we don't need do the above operations.