]> git.proxmox.com Git - qemu.git/blobdiff - hw/usb/hcd-uhci.c
uhci: Raise interrupt when requested even for non active tds
[qemu.git] / hw / usb / hcd-uhci.c
index cdc8bc3fbaa1366dcb0a680b7855de883bf47120..c2f08e3735ad4f276eeff48a337c6ce64598c75a 100644 (file)
@@ -826,8 +826,16 @@ static int uhci_handle_td(UHCIState *s, uint32_t addr, UHCI_TD *td,
     USBEndpoint *ep;
 
     /* Is active ? */
-    if (!(td->ctrl & TD_CTRL_ACTIVE))
+    if (!(td->ctrl & TD_CTRL_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"
+         */
+        if (td->ctrl & TD_CTRL_IOC) {
+                *int_mask |= 0x01;
+        }
         return TD_RESULT_NEXT_QH;
+    }
 
     async = uhci_async_find_td(s, addr, td);
     if (async) {