sim-card
/
qemu
Archived
10
0
Fork 0
Commit Graph

25 Commits

Author SHA1 Message Date
aliguori 89b9b79f34 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 <maxk@kernel.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5049 c046a42c-6fe2-441c-8c8c-71466251a162
2008-08-21 19:29:38 +00:00
aliguori 4b096fc9ec 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
   usb_add host:5.*
QEMU will automatically grab any non-hub device with host address 5.*.

Same with the 'host:PID:*', we grab any device that matches PID.

Filtering itself is very generic so we can probably add more elaborate
syntax like 'host:BUS.ADDR:VID:PID'. So that we can do 'host:5.*:6000:*'.

Anyway, it's implemented using a periodic timer that scans host devices
and grabs those that match the filter. Timer is started when the first
filter is added.

We now keep the list of all host devices that we grabbed to make sure that
we do not grab the same device twice.

btw It's currently possible to grab the same host device more than once.
ie You can just do "usb_add host:1.1" more than once, which of course does
not work. So this patch fixes that issue too.

Along with auto disconnect patch that I send a minute ago the setup is very
seamless now. You can just allocate some usb ports to the VMs and plug/unplug
devices at any time.

Signed-off-by: Max Krasnyansky <maxk@kernel.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5048 c046a42c-6fe2-441c-8c8c-71466251a162
2008-08-21 19:28:55 +00:00
aliguori 1f3870ab24 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
when the actual host device is disconnected.

At first I've extended set_fd_handlerX() stuff to support checking
for exceptions on fds. But unfortunately usbfs code does not wake up
user-space process when device is removed, which means we need a
timer to periodically check if device is still there. So I removed
fd exception stuff and implemented it with the timer.

Signed-off-by: Max Krasnyansky <maxk@kernel.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5047 c046a42c-6fe2-441c-8c8c-71466251a162
2008-08-21 19:27:48 +00:00
balrog 6c9f886cea 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
2008-07-17 20:47:13 +00:00
balrog 942ac05261 Inventra MUSB-HDRC host-mode USB.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4232 c046a42c-6fe2-441c-8c8c-71466251a162
2008-04-22 03:15:10 +00:00
balrog a795421883 USB-to-serial device (Samuel Thibault).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3914 c046a42c-6fe2-441c-8c8c-71466251a162
2008-01-14 03:41:02 +00:00
pbrook 87ecb68bdf Break up vl.h.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162
2007-11-17 17:14:51 +00:00
ths 3b46e62427 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
2007-09-17 08:09:54 +00:00
ths 5fafdf24ef 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
2007-09-16 21:08:06 +00:00
balrog 47b2d338d9 Add USB HID keyboard.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2996 c046a42c-6fe2-441c-8c8c-71466251a162
2007-06-22 08:16:00 +00:00
balrog f6d2a316d2 Wacom PenPartner tablet (virtual USB device).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2977 c046a42c-6fe2-441c-8c8c-71466251a162
2007-06-10 19:21:04 +00:00
ths afcc3cdfc4 Use the correct PCI IDs for Malta.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2945 c046a42c-6fe2-441c-8c8c-71466251a162
2007-06-06 16:26:14 +00:00
pbrook d537cf6c86 Unify IRQ handling.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2635 c046a42c-6fe2-441c-8c8c-71466251a162
2007-04-07 18:14:41 +00:00
pbrook e24ad6f140 OHCI USB PXA support (Andrzej Zaborowski).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2490 c046a42c-6fe2-441c-8c8c-71466251a162
2007-03-17 16:59:31 +00:00
ths b63891a08e Fix typo, by Ed Swierk.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2408 c046a42c-6fe2-441c-8c8c-71466251a162
2007-02-10 21:32:46 +00:00
pbrook 4d611c9a2f SCSI and USB async IO support.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2107 c046a42c-6fe2-441c-8c8c-71466251a162
2006-08-12 01:04:27 +00:00
bellard 059809e451 usb destroy API change (Lonnie Mendez)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2066 c046a42c-6fe2-441c-8c8c-71466251a162
2006-07-19 18:06:15 +00:00
bellard 1f6e24e73c 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
2006-06-26 21:00:51 +00:00
pbrook 2e5d83bbef 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
2006-05-25 23:58:51 +00:00
pbrook 0d92ed3022 OHCI USB host emulation.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1928 c046a42c-6fe2-441c-8c8c-71466251a162
2006-05-21 16:30:15 +00:00
pbrook 502a53952d 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
2006-05-13 16:11:23 +00:00
bellard 09b26c5ec0 USB tablet support (Brad Campbell, Anthony Liguori)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1810 c046a42c-6fe2-441c-8c8c-71466251a162
2006-04-12 21:09:08 +00:00
bellard a594cfbf3e USB user interface
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1603 c046a42c-6fe2-441c-8c8c-71466251a162
2005-11-06 16:13:29 +00:00
bellard 59ae540c3d added virtual USB mouse support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1599 c046a42c-6fe2-441c-8c8c-71466251a162
2005-11-05 16:57:08 +00:00
bellard bb36d4708b initial USB support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1597 c046a42c-6fe2-441c-8c8c-71466251a162
2005-11-05 14:22:28 +00:00