summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2010-04-04 21:48:31 +0100
committerPaul Brook <paul@codesourcery.com>2010-04-04 21:48:31 +0100
commit5bd2c0d7a6778542827ac7f897eed3fb5cf7ff5a (patch)
tree91347eb5293bdb63e62be2a6ae8050b1443d78fb
parenta67ba3b6f88acaca5ee19e583dcdcd9d9288b072 (diff)
downloadhqemu-5bd2c0d7a6778542827ac7f897eed3fb5cf7ff5a.zip
hqemu-5bd2c0d7a6778542827ac7f897eed3fb5cf7ff5a.tar.gz
UHCI spurious interrut fix
Only raise an interrupt if the TD has actually completed. Signed-off-by: Paul Brook <paul@codesourcery.com>
-rw-r--r--hw/usb-uhci.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c
index 335b668..7c45d7f 100644
--- a/hw/usb-uhci.c
+++ b/hw/usb-uhci.c
@@ -680,9 +680,6 @@ static int uhci_complete_td(UHCIState *s, UHCI_TD *td, UHCIAsync *async, uint32_
ret = async->packet.len;
- if (td->ctrl & TD_CTRL_IOC)
- *int_mask |= 0x01;
-
if (td->ctrl & TD_CTRL_IOS)
td->ctrl &= ~TD_CTRL_ACTIVE;
@@ -696,6 +693,8 @@ static int uhci_complete_td(UHCIState *s, UHCI_TD *td, UHCIAsync *async, uint32_
here. The docs are somewhat unclear, but win2k relies on this
behavior. */
td->ctrl &= ~(TD_CTRL_ACTIVE | TD_CTRL_NAK);
+ if (td->ctrl & TD_CTRL_IOC)
+ *int_mask |= 0x01;
if (pid == USB_TOKEN_IN) {
if (len > max_len) {
@@ -753,6 +752,8 @@ out:
if (err == 0) {
td->ctrl &= ~TD_CTRL_ACTIVE;
s->status |= UHCI_STS_USBERR;
+ if (td->ctrl & TD_CTRL_IOC)
+ *int_mask |= 0x01;
uhci_update_irq(s);
}
}
OpenPOWER on IntegriCloud