All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] Bug #757654: UHCI fails to signal stall response patch
@ 2011-04-15 20:57 Jan Vesely
  2011-04-16  6:33 ` Brad Hards
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Jan Vesely @ 2011-04-15 20:57 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial

Hi,

I'm sending a patch for bug #757654. The bug does not really break
anything it just makes USB error detection harder.
It's a quick fix and might need some polishing but it works (I am
currently using it).

thx,
jan

PS: I guess you need this line:
Signed-off-by: Jan Vesely <jano.vesely@gmail.com>

diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c
index 346db3e..a51d89b 100644
--- a/hw/usb-uhci.c
+++ b/hw/usb-uhci.c
@@ -732,11 +732,21 @@ out:
     case USB_RET_STALL:
         td->ctrl |= TD_CTRL_STALL;
         td->ctrl &= ~TD_CTRL_ACTIVE;
+        s->status |= UHCI_STS_USBERR;
+        *int_mask |= 0x02;
+        if (td->ctrl & TD_CTRL_IOC)
+            *int_mask |= 0x01;
+        uhci_update_irq(s);
         return 1;

     case USB_RET_BABBLE:
         td->ctrl |= TD_CTRL_BABBLE | TD_CTRL_STALL;
         td->ctrl &= ~TD_CTRL_ACTIVE;
+        s->status |= UHCI_STS_USBERR;
+        *int_mask |= 0x02;
+        if (td->ctrl & TD_CTRL_IOC)
+           *int_mask |= 0x01;
+        uhci_update_irq(s);
         /* frame interrupted */
         return -1;

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

end of thread, other threads:[~2011-05-12  9:28 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-15 20:57 [Qemu-devel] Bug #757654: UHCI fails to signal stall response patch Jan Vesely
2011-04-16  6:33 ` Brad Hards
2011-04-16  7:29   ` Jan Vesely
2011-04-16  8:40 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
2011-05-05 12:05 ` [Qemu-devel] " Gerd Hoffmann
2011-05-06  8:07   ` Jan Vesely
2011-05-09  7:55     ` Gerd Hoffmann
2011-05-09 10:16       ` Jan Vesely
2011-05-09 11:43         ` Gerd Hoffmann
2011-05-11 11:33           ` Jan Vesely
2011-05-12  9:28             ` Gerd Hoffmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.