qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Erik Rull <erik.rull@rdsoftware.de>
Cc: jan.kiszka@siemens.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] usb: selective endpoint initialization
Date: Thu, 09 Aug 2012 10:59:06 +0200	[thread overview]
Message-ID: <50237BDA.8030906@redhat.com> (raw)
In-Reply-To: <4FFC7B12.8000307@rdsoftware.de>

[-- Attachment #1: Type: text/plain, Size: 394 bytes --]

> Hi Gerd,
> 
> sorry for the delays, I tested the latest pulled patch queue and it's
> now fine on my Intel board, too. The dongle gets detected again without
> assertions. Thanks for your work.
> 
> Still remaining are the multiple usb resets on host side before the
> dongle gets finally detected / usable on the guest.

Can you try if the attached patch makes a difference?

thanks,
  Gerd

[-- Attachment #2: 0001-async-control-xfer-fixup.patch --]
[-- Type: text/plain, Size: 1195 bytes --]

>From d51ea0d80009eb58a09e8e571a7eca5da562becc Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kraxel@redhat.com>
Date: Thu, 9 Aug 2012 10:57:32 +0200
Subject: [PATCH] async control xfer fixup

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/usb/core.c       |    1 +
 hw/usb/host-linux.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/hw/usb/core.c b/hw/usb/core.c
index 01a7622..c7e5bc0 100644
--- a/hw/usb/core.c
+++ b/hw/usb/core.c
@@ -107,6 +107,7 @@ static int do_token_setup(USBDevice *s, USBPacket *p)
     }
 
     usb_packet_copy(p, s->setup_buf, p->iov.size);
+    p->result = 0;
     s->setup_len   = (s->setup_buf[7] << 8) | s->setup_buf[6];
     s->setup_index = 0;
 
diff --git a/hw/usb/host-linux.c b/hw/usb/host-linux.c
index d55be87..8df9207 100644
--- a/hw/usb/host-linux.c
+++ b/hw/usb/host-linux.c
@@ -1045,6 +1045,7 @@ static int usb_host_handle_control(USBDevice *dev, USBPacket *p,
 
     /* Note request is (bRequestType << 8) | bRequest */
     trace_usb_host_req_control(s->bus_num, s->addr, p, request, value, index);
+    assert(p->result == 0);
 
     switch (request) {
     case DeviceOutRequest | USB_REQ_SET_ADDRESS:
-- 
1.7.1


  reply	other threads:[~2012-08-09  8:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-02 16:16 [Qemu-devel] [PATCH] usb: selective endpoint initialization Gerd Hoffmann
2012-07-03  7:47 ` Jan Kiszka
2012-07-03  8:21   ` Gerd Hoffmann
2012-07-03  8:43     ` Jan Kiszka
2012-07-03  8:51       ` Jan Kiszka
2012-07-03  9:17         ` Gerd Hoffmann
2012-07-03 11:39           ` Jan Kiszka
2012-07-03 11:55             ` Gerd Hoffmann
2012-07-04  8:09 ` Erik Rull
2012-07-10 18:57   ` Erik Rull
2012-08-09  8:59     ` Gerd Hoffmann [this message]
2012-08-13 13:36       ` Erik Rull
2012-08-24 10:11       ` Erik Rull

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=50237BDA.8030906@redhat.com \
    --to=kraxel@redhat.com \
    --cc=erik.rull@rdsoftware.de \
    --cc=jan.kiszka@siemens.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).