Statistics
| Branch: | Revision:

root / hw / usb-hid.c @ d15fda63

History | View | Annotate | Download (31.2 kB)

# Date Author Comment
d8dfad9c 04/15/2011 09:25 pm Blue Swirl

Use qemu-common.h or qemu-timer.h in place of sysemu.h

In some cases qemu-common.h or qemu-timer.h can be used in place
of sysemu.h.

Signed-off-by: Blue Swirl <>

74475455 03/21/2011 10:23 am Paolo Bonzini

change all other clock references to use nanosecond resolution accessors

This was done with:

sed -i 's/qemu_get_clock\>/qemu_get_clock_ns/' \
$(git grep -l 'qemu_get_clock\>' )
sed -i 's/qemu_new_timer\>/qemu_new_timer_ns/' \
$(git grep -l 'qemu_new_timer\>' )...
13f8b97a 01/24/2011 06:21 pm Paolo Bonzini

add event queueing to USB HID

The polling nature of the USB HID device makes it very hard to double
click or drag while on a high-latency VNC connection. This patch,
based on work done in the Xen qemu-dm tree by Ian Jackson, fixes this
bug by adding an event queue to the device. The event queue associates...

5fae51a9 01/24/2011 06:21 pm Gerd Hoffmann

usb keyboard: add event event queue

This patch adds a event queue to the usb keyboard. This makes sure the
guest will see all key events even if they come in bursts. With this
patch applied sending Ctrl-Alt-Del using vncviewer's F8 menu works.
Also with autosuspend enabled the first keypress on a suspended keyboard...

42292d4e 01/24/2011 06:21 pm Gerd Hoffmann

usb hid: move head+n to common struct

This patch moves the 'head' and 'n' fields from USBMouseState and
USBKeyboardState to the common USBHIDState struct.

Signed-off-by: Gerd Hoffmann <>

ee59e6b3 01/24/2011 06:21 pm Gerd Hoffmann

usb hid: add migration support

Signed-off-by: Gerd Hoffmann <>

b947c12c 01/21/2011 06:56 pm Aurelien Jarno

Merge branch 'usb.4' of git://anongit.freedesktop.org/spice/qemu

  • 'usb.4' of git://anongit.freedesktop.org/spice/qemu: (32 commits)
    usb: zap pdev from usbport
    usb: rewrite fw path, fix numbering
    usb: add port property.
    usb: keep track of physical port address....
373dfc44 01/20/2011 01:37 pm Aurelien Jarno

usb-hid: modifiers should generate an event

When a modifier key is pressed or released, the USB HID keyboard still
answers NAK, unless another key is also pressed or released.

The patch fixes that by calling usb_hid_changed() when a modifier key
is pressed or released....

a8fb7ff3 01/16/2011 08:52 pm Michael Tokarev

USB keyboard emulation key mapping error

The USB keyboard emulation's translation table in hw/usb-hid.c doesn't
match the codes actually sent for the Logo (a.k.a. "Windows") or Menu
keys. This results in the guest OS not being able to receive these keys
at all when the USB keyboard emulation is being used....

ac57bbb6 01/11/2011 06:01 pm Gerd Hoffmann

usb: hid: remote wakeup support.

Add usb_wakeup() call to the hid driver so remote wakeup actually works.

Signed-off-by: Gerd Hoffmann <>

7b074a22 01/11/2011 06:01 pm Gerd Hoffmann

usb: hid: change serial number to "42".

It would be nice to have some way to signal our hid devices support
remote wakeup. There is a descriptor bit for that of course. Problem
with using is one is that older qemu versions used to set the bit even
though they did not support remote wakeup. Bummer....

41c6abbd 01/11/2011 04:56 pm Gerd Hoffmann

usb: move USB_REQ_SET_ADDRESS handling to common code

USB_REQ_SET_ADDRESS handling is identical in all emulated devices.
Move it to common code.

Signed-off-by: Gerd Hoffmann <>

a980a065 01/11/2011 04:56 pm Gerd Hoffmann

usb: move USB_REQ_{GET,SET}_CONFIGURATION handling to common code

This patch adds fields to the USBDevice struct for the current
speed (hard-wired to full speed for now) and current device
configuration. Also a init function is added which inializes
these fields. This allows USB_REQ_{GET,SET}_CONFIGURATION...

ed5a83dd 01/11/2011 04:56 pm Gerd Hoffmann

usb: move remote wakeup handling to common code

This patch moves setting and clearing the remote_wakeup feature
bit (via USB_REQ_{SET,CLEAR}_FEATURE) to common code. Also
USB_REQ_GET_STATUS handling is moved to common code.

Signed-off-by: Gerd Hoffmann <>

0e4e9695 01/11/2011 04:56 pm Gerd Hoffmann

usb hid: use new descriptor infrastructure.

Switch the usb hid drivers (keyboard, mouse, tablet) over to the
new descriptor infrastructure.

Signed-off-by: Gerd Hoffmann <>

46aaebff 06/14/2010 11:46 pm Jes Sorensen

un-register kbd driver in case of USB kbd unplug.

If a USB keyboard is unplugged, the keyboard eventhandler is never
removed, and events will continue to be passed through to the device,
causing crashes or memory corruption.

Signed-off-by: Jes Sorensen <>...

666daa68 06/04/2010 04:20 pm Markus Armbruster

blockdev: Collect block device code in new blockdev.c

Anything that moves hundreds of lines out of vl.c can't be all bad.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

6fef28ee 03/19/2010 10:27 pm Anthony Liguori

Rewrite mouse handlers to use QTAILQ and to have an activation function

And convert usb-hid to use it (to avoid regression with bisection)

Right now, when we do info mice and we've added a usb tablet, we don't see it
until the guest starts using the tablet. We implement this behavior in order...

bd87813e 03/09/2010 04:47 pm Gerd Hoffmann

kbd leds: usb kbd

Add led status notification support to the usb kbd driver.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

68735b6c 02/19/2010 11:32 pm Kevin O'Connor

USB HID does not support Set_Idle

I found that the QEMU USB keyboard support does not work properly with
the Set_Idle command. Once a non-zero value is given to Set_Idle,
then the keyboard reports an event on every poll - not based on the
time issued in the Set_Idle command....

659139d7 12/19/2009 12:23 am Riku Voipio

Make USB hid devices self-powered

Simplifies power budget negotiation.

Signed-off-by: Riku Voipio <>
Signed-off-by: Aurelien Jarno <>

0fe6d12e 12/12/2009 03:59 pm Markus Armbruster

qdev: Rename USBDevice member devname to product_desc

It's not a device name, it's the USB product description string.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Anthony Liguori <>

06384698 12/12/2009 03:59 pm Markus Armbruster

qdev: Separate USB product description from qdev name

Using the qdev name for the product description makes for inconvenient
qdev names.

Put the product description in new USBDeviceInfo member product_desc.
Make usb_qdev_init() use it. No user or guest visible change, since...

556cd098 12/12/2009 03:59 pm Markus Armbruster

qdev: Replace device names containing whitespace

Device names with whitespace require quoting in the shell and in the
monitor. Some of the offenders are also overly long. Some have a
more convenient alias, some don't.

The place for verbose device names is DeviceInfo member desc. The...

fa7c70c3 10/30/2009 03:39 pm Gerd Hoffmann

usb-hid: use qdev for -usbdevice

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

a8e662b5 10/05/2009 05:32 pm Gerd Hoffmann

usb: hook unplug into qdev, cleanups + fixes.

Hook into DeviceInfo->exit().

handle_destroy() must not free the state struct, this is handled
by the new usb_qdev_exit() function now.

qdev_free(usb_device) works now.

Fix usb hub to qdev_free() all connected devices on unplug....

274945b6 09/09/2009 10:55 pm Gerd Hoffmann

qdev/usb: add some convinience aliases.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

806b6024 09/09/2009 10:55 pm Gerd Hoffmann

qdev/usb: add usb bus support to qdev, convert drivers.

  • Add USBBus. * Add USBDeviceInfo, move device callbacks here. * Add usb-qdev helper functions. * Switch drivers to qdev.

TODO: * make the rest of qemu aware of usb busses and kill the FIXMEs
added by this patch....

a5d2f727 09/09/2009 10:55 pm Gerd Hoffmann

qdev/usb: make qemu aware of usb busses.

Move usb code from vl.c to usb-bus.c and make it use the new data
structures added by qdev conversion. qemu usb core should be able
to handle multiple USB busses just fine now (untested though).

Kill some usb_*_init() legacy functions, use usb_create_simple()...

487414f1 02/06/2009 12:06 am aliguori

hw: remove error handling from qemu_malloc() callers (Avi Kivity)

Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6529 c046a42c-6fe2-441c-8c8c-71466251a162

181a29c5 01/07/2009 06:41 pm aliguori

fix usb-hid SET_IDLE behaviour (Stefano Stabellini)

the usb-hid spec states that the SET_IDLE request has a 16bit value,
where the upper byte specifies the idle rate (currently unimplemented,
we handle only the 0 case, meaning infinite duration) and the lower...

47e699dc 09/29/2008 03:25 am balrog

Bluetooth HIDP emulation on top of usb-hid.c and L2CAP and SDP.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5347 c046a42c-6fe2-441c-8c8c-71466251a162

de5c2d0a 09/16/2008 01:26 am balrog

Fix range in the hid report descriptor for USB tablet.

Should prevent the ugly wrapping due to a typo in an earlier commit.
Fix by Gregor ().

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5232 c046a42c-6fe2-441c-8c8c-71466251a162

976f8eef 05/17/2008 10:55 pm balrog

Try to fix USB HID and make the HID reports readable.

Decode HID report Items in the comments.
Invert mouse wheel direction as per Alexander Graf's report and as we already do in the tablet.
Clamp the Relative values to -127:127 as we claimed in the HID descriptors....

c21c583a 04/26/2008 04:43 am balrog

Fix USB and HID report descriptors for mouse and tablet.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4253 c046a42c-6fe2-441c-8c8c-71466251a162

14512990 01/14/2008 04:25 am balrog

Add mouse wheel in the usb-mouse HID Report (by Daniel Godás).

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3906 c046a42c-6fe2-441c-8c8c-71466251a162

87ecb68b 11/17/2007 07:14 pm pbrook

Break up vl.h.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162

926acf8f 09/17/2007 08:27 pm balrog

Pass correct pointer to HID keyboard event handler, fixes regression from IDLE mode introduction.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3180 c046a42c-6fe2-441c-8c8c-71466251a162

3b46e624 09/17/2007 11:09 am ths

find -type f | xargs sed -i 's/[\t ]*$//g' # Yes, again. Note the star in the regex.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3177 c046a42c-6fe2-441c-8c8c-71466251a162

5fafdf24 09/17/2007 12:08 am ths

find -type f | xargs sed -i 's/[\t ]$//g' # on most files

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162

117b3ae6 09/10/2007 12:16 am pbrook

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

47b2d338 06/22/2007 11:16 am balrog

Add USB HID keyboard.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2996 c046a42c-6fe2-441c-8c8c-71466251a162

e126cf13 03/31/2007 09:23 pm ths

Fix usb hid and mass-storage protocol revision, by Juergen Keil.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2558 c046a42c-6fe2-441c-8c8c-71466251a162

f2f1ac82 02/11/2007 09:01 pm bellard

increase USB table poll interval

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2422 c046a42c-6fe2-441c-8c8c-71466251a162

455204eb 01/05/2007 06:42 pm ths

Dynamic handling of guest mice, by Lonnie Mendez.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2290 c046a42c-6fe2-441c-8c8c-71466251a162

4d611c9a 08/12/2006 04:04 am pbrook

SCSI and USB async IO support.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2107 c046a42c-6fe2-441c-8c8c-71466251a162

059809e4 07/19/2006 09:06 pm bellard

usb destroy API change (Lonnie Mendez)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2066 c046a42c-6fe2-441c-8c8c-71466251a162

1f6e24e7 06/27/2006 12:00 am bellard

display device identifier string for user with info usb (Lonnie Mendez)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2029 c046a42c-6fe2-441c-8c8c-71466251a162

2e5d83bb 05/26/2006 02:58 am pbrook

Rearrange SCSI disk emulation code.
Add USB mass storage device emulation.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1940 c046a42c-6fe2-441c-8c8c-71466251a162

09b26c5e 04/13/2006 12:09 am bellard

USB tablet support (Brad Campbell, Anthony Liguori)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1810 c046a42c-6fe2-441c-8c8c-71466251a162

59ae540c 11/05/2005 06:57 pm bellard

added virtual USB mouse support

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1599 c046a42c-6fe2-441c-8c8c-71466251a162