]> git.proxmox.com Git - mirror_qemu.git/commitdiff
usb-ehci: Any packet completion except for NAK should set the interrupt
authorHans de Goede <hdegoede@redhat.com>
Fri, 2 Mar 2012 20:27:14 +0000 (21:27 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 7 Mar 2012 11:28:03 +0000 (12:28 +0100)
As clearly stated in the 2.3.2 of the EHCI spec, any time USBERRINT get
sets then if the td has its IOC bit set USBINT should be set as well.

This means that for any status except for USB_RET_NAK we should set
USBINT if the IOC bit is set.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb-ehci.c

index d386b8407ddf35082488ce354f66fa793010f664..507e4a814887e02c290939727cae1ea3e9f958b9 100644 (file)
@@ -1360,7 +1360,7 @@ err:
     q->qh.token ^= QTD_TOKEN_DTOGGLE;
     q->qh.token &= ~QTD_TOKEN_ACTIVE;
 
-    if ((q->usb_status >= 0) && (q->qh.token & QTD_TOKEN_IOC)) {
+    if ((q->usb_status != USB_RET_NAK) && (q->qh.token & QTD_TOKEN_IOC)) {
         ehci_record_interrupt(q->ehci, USBSTS_INT);
     }
 }