]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/commitdiff
uhci: When the guest marks a pending td non-active, cancel the queue
authorHans de Goede <hdegoede@redhat.com>
Wed, 24 Oct 2012 16:31:17 +0000 (18:31 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 25 Oct 2012 07:08:12 +0000 (09:08 +0200)
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb/hcd-uhci.c

index c4f2f98f17f774a6ef3377b87c5caeda49bf1426..592ad8d3e7079f281ca26d4b74c1b4f3e982ae88 100644 (file)
@@ -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"