From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>, Lin Ma <lma@suse.com>
Subject: [Qemu-devel] [PULL 1/4] Re-attach usb device to kernel while usb_host_open fails
Date: Fri, 17 Jul 2015 13:29:50 +0200 [thread overview]
Message-ID: <1437132593-6611-2-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1437132593-6611-1-git-send-email-kraxel@redhat.com>
From: Lin Ma <lma@suse.com>
Signed-off-by: Lin Ma <lma@suse.com>
Reviewed-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
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;
--
1.8.3.1
next prev parent reply other threads:[~2015-07-17 11:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-17 11:29 [Qemu-devel] [PULL for-2.4 0/4] usb: fixes for 2.4 (ccid, xhci and usb-host) Gerd Hoffmann
2015-07-17 11:29 ` Gerd Hoffmann [this message]
2015-07-17 11:29 ` [Qemu-devel] [PULL 2/4] usb-ccid: fix 61b4887b41b270bc837ead57bc502d904af023bb Gerd Hoffmann
2015-07-17 11:29 ` [Qemu-devel] [PULL 3/4] usb-ccid: add missing wakeup calls Gerd Hoffmann
2015-07-17 11:29 ` [Qemu-devel] [PULL 4/4] Revert "xhci: set timer to retry xfers" Gerd Hoffmann
2015-07-17 12:51 ` [Qemu-devel] [PULL for-2.4 0/4] usb: fixes for 2.4 (ccid, xhci and usb-host) Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1437132593-6611-2-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=lma@suse.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).