History | View | Annotate | Download (19.7 kB)
usb-hid: activate usb tablet / mouse after migration.
qemu uses the ps/2 mouse by default. The usb tablet (or mouse) isactivated as soon as qemu sees some guest activity on the device,i.e. polling for HID events. That used to work fine for both fresh...
usb/hid: add hid_pointer_activate, use it
HID reorganziation broke the usb tablet in windows xp. The reason isthat xp activates idle before it starts polling, which creates achicken-and-egg issue: We don't call hid_pointer_poll because there areno pending events. We don't get any events because the activation code...
usb-hid: use hid vmstate macro
Use new hid vmstate macro. Version stays the same, because there is noreordering of the fields.
Signed-off-by: Michael Walle <michael@walle.cc>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb-hid: remove usb_hid_datain_cb
No users left, all migrated over to hw/hid.[ch].Yea! Zap it!
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb-hid: create & use HIDState
First step in separating out the HID emulation code from usb-hid, so itcan be reused without creating a dummy usb device like bluetooth does.
This creates a HIDState struct, moves the non-usbish fields fromUSBHIDStruct there. Renames non-usbish structs, defines and functions...
usb-hid: add event callback
Add callback for event notification, which allows to un-usbify morefunctions. Also split separate hid_* functions for reset and release.
usb-hid: add hid_has_events()
Add hid_has_events function, use it to figure whenever there are pendingevents instead of checking and updating USBHIDState->changed.
Setting ->changed to 1 on init is removed, that should have absolutelyno effect as the initial state of ->idle is 0 so we report hid state...
usb-hid: split hid code to hw/hid.[ch]
Almost pure code motion. Unstatic hid interface functions and addthem to the header file. Some renames. Some code style cleanups.
hid: move idle+protocol from usb-hid to hid too.
usb: use iovecs in USBPacket
Zap data pointer from USBPacket, add a QEMUIOVector instead.Add a bunch of helper functions to manage USBPacket data.Switch over users to the new interface.
Note that USBPacket->len was used for two purposes: First topass in the buffer size and second to return the number of...
usb-hid: Fix 0/0 position for Windows in tablet mode
For unknown reasons, Windows drivers (tested with XP and Win7) ignoreusb-tablet events that move the pointer to 0/0. So always report 0/0 as1/0.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
usb-hid: fixup changed tracking.
Remove leftover calls to usb_hid_changed().
Take care to update the changed flag after delivering a event viaGET_REPORT like we do when sending events via interrupt endpoint.
Fix USB mouse Set_Protocol behavior
The QEMU USB mouse claims to support the "boot" protocol(bInterfaceSubClass is 1). However, the mouse rejects theSet_Protocol command.
The qemu mouse does support the "boot" protocol specification, so asimple fix is to enable the Set_Protocol request....
The USB tablet should not claim boot protocol support.
The USB tablet advertises that it supports the "boot" protocol.However, its reports aren't "boot" protocol compatible. So, itshouldn't claim that.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>...
usb: update config descriptors to identify number of interfaces
Previously we relied on the .bNumInterfaces, but that won't always beaccurate after the introduction of grouped interfaces.
Signed-off-by: Brad Hards <bradh@frogmouth.net>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb: Pass the packet to the device's handle_control callback
This allows using the generic usb_generic_handle_packet function fromdevice code which does ASYNC control requests (such as the linux hostpass through code).
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
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 placeof sysemu.h.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
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\>' )...
add event queueing to USB HID
The polling nature of the USB HID device makes it very hard to doubleclick 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 thisbug by adding an event queue to the device. The event queue associates...
usb keyboard: add event event queue
This patch adds a event queue to the usb keyboard. This makes sure theguest will see all key events even if they come in bursts. With thispatch applied sending Ctrl-Alt-Del using vncviewer's F8 menu works.Also with autosuspend enabled the first keypress on a suspended keyboard...
usb hid: move head+n to common struct
This patch moves the 'head' and 'n' fields from USBMouseState andUSBKeyboardState to the common USBHIDState struct.
usb hid: add migration support
Merge branch 'usb.4' of git://anongit.freedesktop.org/spice/qemu
usb-hid: modifiers should generate an event
When a modifier key is pressed or released, the USB HID keyboard stillanswers NAK, unless another key is also pressed or released.
The patch fixes that by calling usb_hid_changed() when a modifier keyis pressed or released....
USB keyboard emulation key mapping error
The USB keyboard emulation's translation table in hw/usb-hid.c doesn'tmatch the codes actually sent for the Logo (a.k.a. "Windows") or Menukeys. This results in the guest OS not being able to receive these keysat all when the USB keyboard emulation is being used....
usb: hid: remote wakeup support.
Add usb_wakeup() call to the hid driver so remote wakeup actually works.
usb: hid: change serial number to "42".
It would be nice to have some way to signal our hid devices supportremote wakeup. There is a descriptor bit for that of course. Problemwith using is one is that older qemu versions used to set the bit eventhough they did not support remote wakeup. Bummer....
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.
usb: move USB_REQ_{GET,SET}_CONFIGURATION handling to common code
This patch adds fields to the USBDevice struct for the currentspeed (hard-wired to full speed for now) and current deviceconfiguration. Also a init function is added which inializesthese fields. This allows USB_REQ_{GET,SET}_CONFIGURATION...
usb: move remote wakeup handling to common code
This patch moves setting and clearing the remote_wakeup featurebit (via USB_REQ_{SET,CLEAR}_FEATURE) to common code. AlsoUSB_REQ_GET_STATUS handling is moved to common code.
usb hid: use new descriptor infrastructure.
Switch the usb hid drivers (keyboard, mouse, tablet) over to thenew descriptor infrastructure.
un-register kbd driver in case of USB kbd unplug.
If a USB keyboard is unplugged, the keyboard eventhandler is neverremoved, and events will continue to be passed through to the device,causing crashes or memory corruption.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>...
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 <armbru@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
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 ituntil the guest starts using the tablet. We implement this behavior in order...
kbd leds: usb kbd
Add led status notification support to the usb kbd driver.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
USB HID does not support Set_Idle
I found that the QEMU USB keyboard support does not work properly withthe 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 thetime issued in the Set_Idle command....
Make USB hid devices self-powered
Simplifies power budget negotiation.
Signed-off-by: Riku Voipio <riku.voipio@nokia.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
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 <armbru@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qdev: Separate USB product description from qdev name
Using the qdev name for the product description makes for inconvenientqdev names.
Put the product description in new USBDeviceInfo member product_desc.Make usb_qdev_init() use it. No user or guest visible change, since...
qdev: Replace device names containing whitespace
Device names with whitespace require quoting in the shell and in themonitor. Some of the offenders are also overly long. Some have amore convenient alias, some don't.
The place for verbose device names is DeviceInfo member desc. The...
usb-hid: use qdev for -usbdevice
usb: hook unplug into qdev, cleanups + fixes.
Hook into DeviceInfo->exit().
handle_destroy() must not free the state struct, this is handledby the new usb_qdev_exit() function now.
qdev_free(usb_device) works now.
Fix usb hub to qdev_free() all connected devices on unplug....
qdev/usb: add some convinience aliases.
qdev/usb: add usb bus support to qdev, convert drivers.
TODO: * make the rest of qemu aware of usb busses and kill the FIXMEs added by this patch....
qdev/usb: make qemu aware of usb busses.
Move usb code from vl.c to usb-bus.c and make it use the new datastructures added by qdev conversion. qemu usb core should be ableto handle multiple USB busses just fine now (untested though).
Kill some usb_*_init() legacy functions, use usb_create_simple()...
hw: remove error handling from qemu_malloc() callers (Avi Kivity)
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6529 c046a42c-6fe2-441c-8c8c-71466251a162
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...
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
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 (gg@seh.de).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5232 c046a42c-6fe2-441c-8c8c-71466251a162
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....
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
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
Break up vl.h.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162
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
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
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
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
Add USB HID keyboard.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2996 c046a42c-6fe2-441c-8c8c-71466251a162
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
increase USB table poll interval
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2422 c046a42c-6fe2-441c-8c8c-71466251a162
Dynamic handling of guest mice, by Lonnie Mendez.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2290 c046a42c-6fe2-441c-8c8c-71466251a162
SCSI and USB async IO support.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2107 c046a42c-6fe2-441c-8c8c-71466251a162
usb destroy API change (Lonnie Mendez)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2066 c046a42c-6fe2-441c-8c8c-71466251a162
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
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
USB tablet support (Brad Campbell, Anthony Liguori)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1810 c046a42c-6fe2-441c-8c8c-71466251a162
added virtual USB mouse support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1599 c046a42c-6fe2-441c-8c8c-71466251a162