[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH V2] Re-attach usb device to kernel while usb_host_op
From: |
Lin Ma |
Subject: |
[Qemu-devel] [PATCH V2] Re-attach usb device to kernel while usb_host_open fails |
Date: |
Wed, 24 Jun 2015 13:40:11 +0800 |
Signed-off-by: Lin Ma <address@hidden>
Reviewed-by: Gonglei <address@hidden>
---
Changes in V2:
* For avoiding regression issue, Dont remove the usb device from global
hostdevs list while
usb speed mismatch occurs.
* Add missing R-by information.
hw/usb/host-libusb.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
index bc2944c..11429f5 100644
--- a/hw/usb/host-libusb.c
+++ b/hw/usb/host-libusb.c
@@ -889,6 +889,9 @@ static int usb_host_open(USBHostDevice *s, libusb_device
*dev)
fail:
trace_usb_host_open_failure(bus_num, addr);
if (s->dh != NULL) {
+ usb_host_release_interfaces(s);
+ libusb_reset_device(s->dh);
+ usb_host_attach_kernel(s);
libusb_close(s->dh);
s->dh = NULL;
s->dev = NULL;
--
2.1.4
- [Qemu-devel] [PATCH V2] Re-attach usb device to kernel while usb_host_open fails,
Lin Ma <=