qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH V2] Re-attach usb device to kernel while usb_host_open fails
@ 2015-06-24  5:40 Lin Ma
  2015-06-25  6:29 ` Gerd Hoffmann
  0 siblings, 1 reply; 2+ messages in thread
From: Lin Ma @ 2015-06-24  5:40 UTC (permalink / raw)
  To: arei.gonglei, qemu-devel, kraxel; +Cc: Lin Ma


Signed-off-by: Lin Ma <lma@suse.com>
Reviewed-by: Gonglei <arei.gonglei@huawei.com>
---
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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-25  6:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-24  5:40 [Qemu-devel] [PATCH V2] Re-attach usb device to kernel while usb_host_open fails Lin Ma
2015-06-25  6:29 ` Gerd Hoffmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).