* [Qemu-devel] [PULL 1.1] usb patch queue @ 2012-05-14 8:29 Gerd Hoffmann 2012-05-14 8:29 ` [Qemu-devel] [PATCH 1.1] usb-host: handle guest-issued clear halt Gerd Hoffmann 2012-05-14 20:08 ` [Qemu-devel] [PULL 1.1] usb patch queue Anthony Liguori 0 siblings, 2 replies; 3+ messages in thread From: Gerd Hoffmann @ 2012-05-14 8:29 UTC (permalink / raw) To: qemu-devel; +Cc: Gerd Hoffmann Hi, One little usb bugfix for 1.1 ... please pull, Gerd Gerd Hoffmann (1): usb-host: handle guest-issued clear halt hw/usb/host-linux.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) The following changes since commit 94d1991445fa3582c042ee4e5b72606e2fc39cc2: sun4u: implement interrupt clearing registers (2012-05-12 09:49:19 +0000) are available in the git repository at: git://git.kraxel.org/qemu usb.50 Gerd Hoffmann (1): usb-host: handle guest-issued clear halt hw/usb/host-linux.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) ^ permalink raw reply [flat|nested] 3+ messages in thread
* [Qemu-devel] [PATCH 1.1] usb-host: handle guest-issued clear halt 2012-05-14 8:29 [Qemu-devel] [PULL 1.1] usb patch queue Gerd Hoffmann @ 2012-05-14 8:29 ` Gerd Hoffmann 2012-05-14 20:08 ` [Qemu-devel] [PULL 1.1] usb patch queue Anthony Liguori 1 sibling, 0 replies; 3+ messages in thread From: Gerd Hoffmann @ 2012-05-14 8:29 UTC (permalink / raw) To: qemu-devel; +Cc: Gerd Hoffmann Most important here is to update our internal endpoint state so we know the endpoint isn't in halted state any more. Without this usb-host tries to clear halt again with the next data transfer submitted. Doing this twice is (a) not correct and (b) confuses some usb devices, rendering them non-functional in the guest. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- hw/usb/host-linux.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/hw/usb/host-linux.c b/hw/usb/host-linux.c index 048f8ff..a95b0ed 100644 --- a/hw/usb/host-linux.c +++ b/hw/usb/host-linux.c @@ -1058,6 +1058,15 @@ static int usb_host_handle_control(USBDevice *dev, USBPacket *p, ret = usb_host_set_interface(s, index, value); trace_usb_host_req_emulated(s->bus_num, s->addr, p, ret); return ret; + + case EndpointOutRequest | USB_REQ_CLEAR_FEATURE: + if (value == 0) { /* clear halt */ + int pid = (index & USB_DIR_IN) ? USB_TOKEN_IN : USB_TOKEN_OUT; + ioctl(s->fd, USBDEVFS_CLEAR_HALT, &index); + clear_halt(s, pid, index & 0x0f); + trace_usb_host_req_emulated(s->bus_num, s->addr, p, 0); + return 0; + } } /* The rest are asynchronous */ -- 1.7.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PULL 1.1] usb patch queue 2012-05-14 8:29 [Qemu-devel] [PULL 1.1] usb patch queue Gerd Hoffmann 2012-05-14 8:29 ` [Qemu-devel] [PATCH 1.1] usb-host: handle guest-issued clear halt Gerd Hoffmann @ 2012-05-14 20:08 ` Anthony Liguori 1 sibling, 0 replies; 3+ messages in thread From: Anthony Liguori @ 2012-05-14 20:08 UTC (permalink / raw) To: Gerd Hoffmann; +Cc: qemu-devel On 05/14/2012 03:29 AM, Gerd Hoffmann wrote: > Hi, > > One little usb bugfix for 1.1 ... > > please pull, > Gerd Pulled. Thanks. Regards, Anthony Liguori > > Gerd Hoffmann (1): > usb-host: handle guest-issued clear halt > > hw/usb/host-linux.c | 9 +++++++++ > 1 files changed, 9 insertions(+), 0 deletions(-) > > The following changes since commit 94d1991445fa3582c042ee4e5b72606e2fc39cc2: > > sun4u: implement interrupt clearing registers (2012-05-12 09:49:19 +0000) > > are available in the git repository at: > git://git.kraxel.org/qemu usb.50 > > Gerd Hoffmann (1): > usb-host: handle guest-issued clear halt > > hw/usb/host-linux.c | 9 +++++++++ > 1 files changed, 9 insertions(+), 0 deletions(-) > > ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-14 20:08 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-05-14 8:29 [Qemu-devel] [PULL 1.1] usb patch queue Gerd Hoffmann 2012-05-14 8:29 ` [Qemu-devel] [PATCH 1.1] usb-host: handle guest-issued clear halt Gerd Hoffmann 2012-05-14 20:08 ` [Qemu-devel] [PULL 1.1] usb patch queue Anthony Liguori
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).