diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2011-07-22 09:23:49 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-07-22 09:23:49 -0500 |
commit | cfe7bb19d2e717c4ad763879515a8b8bd1ca19c5 (patch) | |
tree | da73de15e4b762ade6b4c398b3d6c07ea681f4d9 /hw | |
parent | bf1cd9b4f54c8f630291dcd057c3aa293a510bcb (diff) | |
parent | 69354a83346da2d4d8eb9cda18b639794566c902 (diff) | |
download | qemu-cfe7bb19d2e717c4ad763879515a8b8bd1ca19c5.zip qemu-cfe7bb19d2e717c4ad763879515a8b8bd1ca19c5.tar.gz qemu-cfe7bb19d2e717c4ad763879515a8b8bd1ca19c5.tar.bz2 |
Merge remote-tracking branch 'kraxel/usb.21' into staging
Diffstat (limited to 'hw')
-rw-r--r-- | hw/usb-hid.c | 9 | ||||
-rw-r--r-- | hw/usb-uhci.c | 6 |
2 files changed, 10 insertions, 5 deletions
diff --git a/hw/usb-hid.c b/hw/usb-hid.c index d711b5c..b812da2 100644 --- a/hw/usb-hid.c +++ b/hw/usb-hid.c @@ -531,18 +531,15 @@ static void usb_keyboard_process_keycode(USBHIDState *hs) case 0xe0: if (s->modifiers & (1 << 9)) { s->modifiers ^= 3 << 8; - usb_hid_changed(hs); return; } case 0xe1 ... 0xe7: if (keycode & (1 << 7)) { s->modifiers &= ~(1 << (hid_code & 0x0f)); - usb_hid_changed(hs); return; } case 0xe8 ... 0xef: s->modifiers |= 1 << (hid_code & 0x0f); - usb_hid_changed(hs); return; } @@ -769,10 +766,12 @@ static int usb_hid_handle_control(USBDevice *dev, USBPacket *p, } break; case GET_REPORT: - if (s->kind == USB_MOUSE || s->kind == USB_TABLET) + if (s->kind == USB_MOUSE || s->kind == USB_TABLET) { ret = usb_pointer_poll(s, data, length); - else if (s->kind == USB_KEYBOARD) + } else if (s->kind == USB_KEYBOARD) { ret = usb_keyboard_poll(s, data, length); + } + s->changed = s->n > 0; break; case SET_REPORT: if (s->kind == USB_KEYBOARD) diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c index 2ef4c5b..da74c57 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; |