aboutsummaryrefslogtreecommitdiff
path: root/hw/usb/hcd-uhci.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2012-10-24 18:31:17 +0200
committerGerd Hoffmann <kraxel@redhat.com>2012-10-25 09:08:12 +0200
commit420ca987d5d14fabacdec86c568832d6b0056ca3 (patch)
tree8aeee63b577a453b99c94c70af5543f0ae381cc8 /hw/usb/hcd-uhci.c
parent8c75a899f85dda9f8305d25f0cc453a79115fd90 (diff)
downloadqemu-420ca987d5d14fabacdec86c568832d6b0056ca3.zip
qemu-420ca987d5d14fabacdec86c568832d6b0056ca3.tar.gz
qemu-420ca987d5d14fabacdec86c568832d6b0056ca3.tar.bz2
uhci: When the guest marks a pending td non-active, cancel the queue
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb/hcd-uhci.c')
-rw-r--r--hw/usb/hcd-uhci.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c
index c4f2f98..592ad8d 100644
--- a/hw/usb/hcd-uhci.c
+++ b/hw/usb/hcd-uhci.c
@@ -821,6 +821,10 @@ static int uhci_handle_td(UHCIState *s, UHCIQueue *q, uint32_t qh_addr,
/* Is active ? */
if (!(td->ctrl & TD_CTRL_ACTIVE)) {
+ if (async) {
+ /* Guest marked a pending td non-active, cancel the queue */
+ uhci_queue_free(async->queue, "pending td non-active");
+ }
/*
* ehci11d spec page 22: "Even if the Active bit in the TD is already
* cleared when the TD is fetched ... an IOC interrupt is generated"