Statistics
| Branch: | Revision:

root / hw / usb.h @ e13e973e

History | View | Annotate | Download (10.2 kB)

# Date Author Comment
53aa8c0e 05/26/2011 12:55 pm Gerd Hoffmann

usb: add usb_handle_packet

Add a usb_handle_packet function, put it into use everywhere.
Right now it just calls dev->info->handle_packet(), that will
change in future patches though.

Signed-off-by: Gerd Hoffmann <>

4ff658fb 05/26/2011 12:55 pm Gerd Hoffmann

usb: keep track of packet owner.

Keep track of the device which owns the usb packet for async processing.

Signed-off-by: Gerd Hoffmann <>

eb5e680a 05/26/2011 12:55 pm Gerd Hoffmann

usb: move cancel callback to USBDeviceInfo

Remove the cancel callback from the USBPacket struct, move it over
to USBDeviceInfo. Zap usb_defer_packet() which is obsolete now.

Signed-off-by: Gerd Hoffmann <>

c6d3ad0f 05/26/2011 12:55 pm Brad Hards

usb: Add Interface Association Descriptor descriptor type

Signed-off-by: Brad Hards <>
Signed-off-by: Gerd Hoffmann <>

6e625fc7 05/26/2011 12:55 pm Brad Hards

usb: add support for "grouped" interfaces and the Interface Association Descriptor

This is used for some devices that have multiple interfaces that form a logic
device. An example is Video Class, which has a Control interface and a
Streaming interface. There can be additional interfaces on the same (physical)...

007fd62f 05/26/2011 12:55 pm Hans de Goede

usb: Pass the packet to the device's handle_control callback

This allows using the generic usb_generic_handle_packet function from
device code which does ASYNC control requests (such as the linux host
pass through code).

Signed-off-by: Hans de Goede <>

50b7963e 05/26/2011 12:55 pm Hans de Goede

usb-linux: use usb_generic_handle_packet()

Make the linux usb host passthrough code use the usb_generic_handle_packet()
function, rather then the curent DYI code. This removes 200 lines of almost
identical code.

Signed-off-by: Hans de Goede <>

13a9a0d3 05/04/2011 03:11 pm Gerd Hoffmann

usb: move complete callback to port ops

19f33223 05/04/2011 01:25 pm Hans de Goede

usb: control buffer fixes

Windows allows control transfers to pass up to 4k of data, so raise our
control buffer size to 4k. For control out transfers the usb core code copies
the control request data to a buffer before calling the device's handle_control...

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

usb core: add migration support

Yes, seriously. There is no migration support at all for usb devices.
They loose state, especially the device address, and stop responding
because of that. Oops.

Luckily there is so much broken usb hardware out there that the guest...

ace1318b 01/12/2011 12:40 pm Gerd Hoffmann

usb: zap pdev from usbport

It isn't needed any more.

Signed-off-by: Gerd Hoffmann <>

5f69076b 01/11/2011 06:27 pm Gerd Hoffmann

usb: add port property.

This allows to explictily set the physical port where you want to
plug the usb device. Example:

-device usb-tablet,bus=usb.0,port=2

With explicit port addressing qemu can and will not automagically add
USB Hubs. This means that:...

c7a2196a 01/11/2011 06:24 pm Gerd Hoffmann

usb: keep track of physical port address.

Add a path string to USBPort. Add usb_port_location() function to set
the physical location of the usb port. Update all drivers implementing
usb ports to call it. Update the monitor commands to print it. Wind it...

b6f77fbe 01/11/2011 06:15 pm Gerd Hoffmann

usb: add attach callback

Add handle_attach() callback to USBDeviceInfo which is called by the
generic package handler when the device is attached to the usb bus
(i.e. plugged into a port).

Signed-off-by: Gerd Hoffmann <>

25620cba 01/11/2011 06:15 pm Gerd Hoffmann

usb: add device qualifier support

Add support for device_qualifier and other_speed_config descriptors.
These are used to query the "other speed" configuration of usb 2.0
devices, i.e. in high-speed mode they return the full-speed
configuration and visa versa....

843d4e0c 01/11/2011 06:15 pm Gerd Hoffmann

usb: add speed mask to ports

Add a field to usb ports indicating the speed(s) they are
able to handle.

Signed-off-by: Gerd Hoffmann <>

0d86d2be 01/11/2011 06:01 pm Gerd Hoffmann

usb: create USBPortOps, move attach there.

Create USBPortOps struct, move the attach function to that struct.

Signed-off-by: Gerd Hoffmann <>

618c169b 01/11/2011 06:01 pm Gerd Hoffmann

usb: rework attach/detach workflow

Add separate detach callback to USBPortOps, split
uhci/ohci/musb/usbhub attach functions into two.

Move common code to the usb_attach() function, only
the hardware-specific bits remain in the attach/detach
callbacks.

Keep track of the port it is attached to for each usb device....

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

usb: add usb_wakeup() + wakeup callback to port ops

Add wakeup callback to port ops for remote wakeup handling.
Also add a usb_wakeup() function for devices which want
trigger a remote wakeup.

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...

37fb59d3 01/11/2011 04:56 pm Gerd Hoffmann

usb: data structs and helpers for usb descriptors.

This patch adds hw/usb-desc.[ch] files. They carry data structures
for various usb descriptors and helper functions to generate usb
packets from the structures.

The intention is to have a internal representation of the device...

132a3f55 01/11/2011 04:56 pm Gerd Hoffmann

usb descriptors: add settable strings.

This patch allows to set usb descriptor strings per device instance.

Signed-off-by: Gerd Hoffmann <>

ab28ccc0 12/11/2010 11:32 pm Gleb Natapov

Record which USBDevice USBPort belongs too.

Ports on root hub will have NULL here. This is needed to reconstruct
path from device to its root hub to build device path.

Signed-off-by: Gleb Natapov <>
Signed-off-by: Blue Swirl <>

f3571b1a 03/31/2010 07:16 pm Max Reitz

usb: class specific interface requests

Mass Storage Reset and Get Max LUN are class specific requests, but
they were not marked as such in hw/usb-msd.c, moved therefore
ClassInterfaceRequest and ClassInterfaceOutRequest from hw/usb-net.c
to hw/usb.h.
Furthermore there was a problem in hw/usb-ohci.c when using DEBUG...

42be86ce 12/18/2009 07:26 pm Gerd Hoffmann

usb-net: use qdev for -usbdevice

Rebased to master, adapted to device renaming by armbru,
no other changes.

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

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...

2b0efdc3 10/30/2009 03:39 pm Gerd Hoffmann

usb-serial and braille: use qdev for -usbdevice

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

61e094c0 10/30/2009 03:39 pm Gerd Hoffmann

usb: make attach optional.

Add a auto_attach field to USBDevice, which is enabled by default.
USB drivers can clear this field in case they do not want the device
being attached (i.e. plugged into a usb port) automatically after
successfull init().

Use cases (see next patches):...

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

usb-storage: use qdev for -usbdevice

Hook up usb_msd_init.

Also rework handling of encrypted block devices,
move the code out vl.c.

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

0958b4cc 10/30/2009 03:39 pm Gerd Hoffmann

usb core: use qdev for -usbdevice

This patchs adds infrastructure to handle -usbdevice via qdev callbacks.
USBDeviceInfo gets a name field (for the -usbdevice driver name) and a
callback for -usbdevice parameter parsing.

The new usbdevice_create() function walks the qdev driver list and looks...

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....

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

switch usb bus to inplace allocation.

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

72cf2d4f 09/12/2009 10:36 am Blue Swirl

Fix sys-queue.h conflict for good

Problem: Our file sys-queue.h is a copy of the BSD file, but there are
some additions and it's not entirely compatible. Because of that, there have
been conflicts with system headers on BSD systems. Some hacks have been
introduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896,...

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()...

bc24a225 05/10/2009 03:44 am Paul Brook

Follow coding conventions

Remove explicit struct qualifiers and rename structure types.

Signed-off-by: Paul Brook <>

376253ec 03/06/2009 01:01 am aliguori

monitor: Rework API (Jan Kiszka)

Refactor the monitor API and prepare it for decoupled terminals:
term_print functions are renamed to monitor_* and all monitor services
gain a new parameter (mon) that will once refer to the monitor instance
the output is supposed to appear on. However, the argument remains...

bb5fc20f 03/06/2009 01:01 am aliguori

monitor: Rework modal password input (Jan Kiszka)

Currently, waiting for the user to type in some password blocks the
whole VM because monitor_readline starts its own I/O loop. And this loop
also screws up reading passwords from virtual console.

Patch below fixes the shortcomings by using normal I/O processing also...

c0f4ce77 03/06/2009 01:01 am aliguori

monitor: Rework early disk password inquiry (Jan Kiszka)

Reading the passwords for encrypted hard disks during early startup is
broken (I guess for quiet a while now):
- No monitor terminal is ready for input at this point
- Forcing all mux'ed terminals into monitor mode can confuse other...

e6a6d5ab 09/29/2008 03:40 am balrog

Emulate a USB bluetooth dongle (or HCI Transport layer).

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

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

5d0c5750 09/14/2008 04:07 am aliguori

usb: Support for removing device by host addr, improved auto filter syntax (Max Krasnyansky)

This patch adds support for removing USB devices by host address.
Which is usefull for things like libvirtd because there is no easy way to
find guest USB address of the host device....

79383c9c 08/30/2008 12:51 pm blueswir1

Fix some warnings that would be generated by gcc -Wredundant-decls

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

89b9b79f 08/21/2008 10:29 pm aliguori

usb: generic packet handler cleanup and documentation (Max Krasnyansky)

A bit better documentation of the USB device API, namely
return codes.
Rewrite of usb_generic_handle_packet() to make it more
reable and easier to follow.

Signed-off-by: Max Krasnyansky <>...

4b096fc9 08/21/2008 10:28 pm aliguori

husb: support for USB host device auto connect (Max Krasnyansky)

QEMU can now automatically grab host USB devices that match the filter.
For now I just extended 'host:X.Y' and 'host:VID:PID' syntax to handle
wildcards. So for example if you do something like...

1f3870ab 08/21/2008 10:27 pm aliguori

husb: support for USB host device auto disconnect (Max Krasnyansky)

I got really annoyed by the fact that you have to manually do
usb_del in the monitor when host device is unplugged and decided
to fix it :)

Basically we now automatically remove guest USB device...

6c9f886c 07/17/2008 11:47 pm balrog

Add CDC-Ethernet usb NIC (original patch from Thomas Sailer).

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

942ac052 04/22/2008 06:15 am balrog

Inventra MUSB-HDRC host-mode USB.

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

a7954218 01/14/2008 05:41 am balrog

USB-to-serial device (Samuel Thibault).

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3914 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

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

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

f6d2a316 06/10/2007 10:21 pm balrog

Wacom PenPartner tablet (virtual USB device).

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

afcc3cdf 06/06/2007 07:26 pm ths

Use the correct PCI IDs for Malta.

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

d537cf6c 04/07/2007 09:14 pm pbrook

Unify IRQ handling.

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

e24ad6f1 03/17/2007 06:59 pm pbrook

OHCI USB PXA support (Andrzej Zaborowski).

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

b63891a0 02/10/2007 11:32 pm ths

Fix typo, by Ed Swierk.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2408 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

0d92ed30 05/21/2006 07:30 pm pbrook

OHCI USB host emulation.

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

502a5395 05/13/2006 07:11 pm pbrook

Rearrange PCI host emulation code.
Add ARM PCI emulation.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1916 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

a594cfbf 11/06/2005 06:13 pm bellard

USB user interface

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1603 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

bb36d470 11/05/2005 04:22 pm bellard

initial USB support

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