aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2011-07-08 17:28:11 +0200
committerGerd Hoffmann <kraxel@redhat.com>2011-07-22 13:36:31 +0200
commit0070f095d9aa216ebe4c06c43d0072275f23c8af (patch)
tree30f703b99acb582e02c00b029e9daca8a720df9a /hw
parente7e73892a66dd3850eb723ee2ef9ef3f4569529f (diff)
usb-uhci: fix irq handling on error.
Spec on UHCI_STS_USBERR: "If the TD on which the error interrupt occurred also had its IOC bit set, both this bit and Bit 0 are set." Make UHCI emulation do that. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/usb-uhci.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c
index 2ef4c5b747..da74c57c62 100644
--- a/hw/usb-uhci.c
+++ b/hw/usb-uhci.c
@@ -730,6 +730,9 @@ out:
td->ctrl |= TD_CTRL_STALL;
td->ctrl &= ~TD_CTRL_ACTIVE;
s->status |= UHCI_STS_USBERR;
+ if (td->ctrl & TD_CTRL_IOC) {
+ *int_mask |= 0x01;
+ }
uhci_update_irq(s);
return 1;
@@ -737,6 +740,9 @@ out:
td->ctrl |= TD_CTRL_BABBLE | TD_CTRL_STALL;
td->ctrl &= ~TD_CTRL_ACTIVE;
s->status |= UHCI_STS_USBERR;
+ if (td->ctrl & TD_CTRL_IOC) {
+ *int_mask |= 0x01;
+ }
uhci_update_irq(s);
/* frame interrupted */
return -1;