diff options
| author | Anthony Liguori <aliguori@us.ibm.com> | 2013-01-08 10:36:20 -0600 |
|---|---|---|
| committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-01-08 10:36:20 -0600 |
| commit | 560c30b1db1d40fe45c5104185367c4de43399d3 (patch) | |
| tree | d3fff38fd167ad08c8d45136c4095263f5d6d1da /hw/usb/dev-hid.c | |
| parent | c3dd94b129e222e00a4ed00689e11afdd85c740f (diff) | |
| parent | 89eb147c2cfd2c797d3662aa2f55254441f0595a (diff) | |
| download | focaccia-qemu-560c30b1db1d40fe45c5104185367c4de43399d3.tar.gz focaccia-qemu-560c30b1db1d40fe45c5104185367c4de43399d3.zip | |
Merge remote-tracking branch 'kraxel/usb.75' into staging
* kraxel/usb.75: (32 commits) uhci: stop using portio lists usbredir: Add support for buffered bulk input (v2) exynos4210: Add EHCI support usb/ehci: Add SysBus EHCI device for Exynos4210 usb/ehci: Move capsbase and opregbase into SysBus EHCI class usb/ehci: Clean up SysBus and PCI EHCI split xhci: call set-address with dummy usbpacket usb-redir: Add debugging to bufpq save / restore usbredir: Add usbredir_init_endpoints() helper usbredir: Verify we have 32 bits bulk length cap when redirecting to xhci usbredir: Add ep_stopped USBDevice method usbredir: Add USBEP2I and I2USBEP helper macros usbredir: Add an usbredir_stop_ep helper function usb: Add an usb_device_ep_stopped USBDevice method usb: Fix usb_ep_find_packet_by_id hid: Change idle handling to use a timer uhci: Maximize how many frames we catch up when behind uhci: Limit amount of frames processed in one go uhci: Add a QH_VALID define uhci: Fix pending interrupts getting lost on migration ... Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/usb/dev-hid.c')
| -rw-r--r-- | hw/usb/dev-hid.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/hw/usb/dev-hid.c b/hw/usb/dev-hid.c index ce38fef9f6..b4ace04eef 100644 --- a/hw/usb/dev-hid.c +++ b/hw/usb/dev-hid.c @@ -501,7 +501,7 @@ static void usb_hid_handle_control(USBDevice *dev, USBPacket *p, break; case SET_IDLE: hs->idle = (uint8_t) (value >> 8); - hid_set_next_idle(hs, qemu_get_clock_ns(vm_clock)); + hid_set_next_idle(hs); if (hs->kind == HID_MOUSE || hs->kind == HID_TABLET) { hid_pointer_activate(hs); } @@ -523,16 +523,14 @@ static void usb_hid_handle_data(USBDevice *dev, USBPacket *p) switch (p->pid) { case USB_TOKEN_IN: if (p->ep->nr == 1) { - int64_t curtime = qemu_get_clock_ns(vm_clock); if (hs->kind == HID_MOUSE || hs->kind == HID_TABLET) { hid_pointer_activate(hs); } - if (!hid_has_events(hs) && - (!hs->idle || hs->next_idle_clock - curtime > 0)) { + if (!hid_has_events(hs)) { p->status = USB_RET_NAK; return; } - hid_set_next_idle(hs, curtime); + hid_set_next_idle(hs); if (hs->kind == HID_MOUSE || hs->kind == HID_TABLET) { len = hid_pointer_poll(hs, buf, p->iov.size); } else if (hs->kind == HID_KEYBOARD) { |