summaryrefslogtreecommitdiffstats
path: root/hw/usb-uhci.c
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2007-09-09 21:16:01 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2007-09-09 21:16:01 +0000
commit117b3ae6e6d27ea31e85ffe1820437d91269ed4e (patch)
tree24f4c01b9b6c9a47e2907c341e6febbf0391e301 /hw/usb-uhci.c
parentead9360e2fbcaae10a8ca3d8bfed885422205dca (diff)
downloadhqemu-117b3ae6e6d27ea31e85ffe1820437d91269ed4e.zip
hqemu-117b3ae6e6d27ea31e85ffe1820437d91269ed4e.tar.gz
Implement HID idle mode (avoids flooding guest with useless updates).
Fix UHCI NACK bug. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3157 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/usb-uhci.c')
-rw-r--r--hw/usb-uhci.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c
index 3936fe0..f4f2608 100644
--- a/hw/usb-uhci.c
+++ b/hw/usb-uhci.c
@@ -526,7 +526,10 @@ static int uhci_handle_td(UHCIState *s, UHCI_TD *td, int *int_mask)
td->ctrl &= ~TD_CTRL_ACTIVE;
if (ret >= 0) {
td->ctrl = (td->ctrl & ~0x7ff) | ((len - 1) & 0x7ff);
- td->ctrl &= ~TD_CTRL_ACTIVE;
+ /* The NAK bit may have been set by a previous frame, so clear it
+ here. The docs are somewhat unclear, but win2k relies on this
+ behavior. */
+ td->ctrl &= ~(TD_CTRL_ACTIVE | TD_CTRL_NAK);
if (pid == USB_TOKEN_IN &&
(td->ctrl & TD_CTRL_SPD) &&
len < max_len) {
OpenPOWER on IntegriCloud