History | View | Annotate | Download (12 kB)
usb: fix port reset
commit 891fb2cd4592b6fe76106a69e0ca40efbf82726a removed the implicitdetach before (re-)attaching in usb_attach(). Some usb host controllersused that behavior though to do a port reset by a detach+attachsequence.
This patch establishes old behavior by adding a new usb_reset() function...
usb: Remove leading underscores from __musb_irq_max
Identifiers with double leading underscore are reserved, so rename__musb_irq_max so we don't encroach on reserved namespace.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb-musb: Take a DeviceState* in init function
Initialise usb-musb by passing it a DeviceState* and the offset of theIRQs in its gpio array, rather than a plain pointer to an irq array.This is simpler for callers and also allows us to pass in a valid parent...
usb-musb: Add reset function
Add a separate reset function musb_reset() to the usb-musb interface,so that users who implement a reset function can also reset usb-musb.Use this in tusb6010.
Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>[Riku Voipio: Fixes and restructuring patchset]...
usb: claim port at device initialization time.
This patch makes qemu assign a port when creating the device, not whenattaching it. For most usb devices this isn't a noticable differencebecause they are in attached state all the time.
The change affects usb-host devices which live in detached state while...
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: 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: Add a register_companion USB bus op.
This is a preparation patch for adding support for USB companion controllers.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb: Make port wakeup and complete ops take a USBPort instead of a Device
This makes them consistent with the attach and detach ops, and in generalit makes sense to make portops take a port as argument. This also makesadding support for a companion controller easier / cleaner....
usb: Replace device_destroy bus op with a child_detach port op
Note this fixes 2 things in one go, first of all the device_destroy busop should be a device_detach bus op, as pending async packets from thedevice should be cancelled on detach not on destroy....
usb: ignore USB_DT_DEBUG
usb: Add a speedmask to devices
This is used to indicate at which speed[s] the device can operate,so that this can be checked to match the ports capabilities when it getsattached to a bus.
Note that currently all usb1 emulated device claim to be fullspeed, this...
usb: Add defines for USB Serial Bus Release Number register
Signed-off-by: Brad Hards <bradh@frogmouth.net>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb: cancel async packets on unplug
This patch adds USBBusOps struct with (for now) only a single callbackwhich is called when a device is about to be destroyed. The USB Hostadapters are implementing this callback and use it to cancel any asyncrequests which might be in flight before the device actually goes away....
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 willchange in future patches though.
usb: keep track of packet owner.
Keep track of the device which owns the usb packet for async processing.
usb: move cancel callback to USBDeviceInfo
Remove the cancel callback from the USBPacket struct, move it overto USBDeviceInfo. Zap usb_defer_packet() which is obsolete now.
usb: Add Interface Association Descriptor descriptor type
usb: add support for "grouped" interfaces and the Interface Association Descriptor
This is used for some devices that have multiple interfaces that form a logicdevice. An example is Video Class, which has a Control interface and aStreaming interface. There can be additional interfaces on the same (physical)...
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>
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 almostidentical code.
usb: move complete callback to port ops
usb: control buffer fixes
Windows allows control transfers to pass up to 4k of data, so raise ourcontrol buffer size to 4k. For control out transfers the usb core code copiesthe control request data to a buffer before calling the device's handle_control...
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 respondingbecause of that. Oops.
Luckily there is so much broken usb hardware out there that the guest...
usb: zap pdev from usbport
It isn't needed any more.
usb: add port property.
This allows to explictily set the physical port where you want toplug the usb device. Example:
-device usb-tablet,bus=usb.0,port=2
With explicit port addressing qemu can and will not automagically addUSB Hubs. This means that:...
usb: keep track of physical port address.
Add a path string to USBPort. Add usb_port_location() function to setthe physical location of the usb port. Update all drivers implementingusb ports to call it. Update the monitor commands to print it. Wind it...
usb: add attach callback
Add handle_attach() callback to USBDeviceInfo which is called by thegeneric package handler when the device is attached to the usb bus(i.e. plugged into a port).
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.0devices, i.e. in high-speed mode they return the full-speedconfiguration and visa versa....
usb: add speed mask to ports
Add a field to usb ports indicating the speed(s) they areable to handle.
usb: create USBPortOps, move attach there.
Create USBPortOps struct, move the attach function to that struct.
usb: rework attach/detach workflow
Add separate detach callback to USBPortOps, splituhci/ohci/musb/usbhub attach functions into two.
Move common code to the usb_attach() function, onlythe hardware-specific bits remain in the attach/detachcallbacks.
Keep track of the port it is attached to for each usb device....
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 wanttrigger a remote wakeup.
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: data structs and helpers for usb descriptors.
This patch adds hw/usb-desc.[ch] files. They carry data structuresfor various usb descriptors and helper functions to generate usbpackets from the structures.
The intention is to have a internal representation of the device...
usb descriptors: add settable strings.
This patch allows to set usb descriptor strings per device instance.
Record which USBDevice USBPort belongs too.
Ports on root hub will have NULL here. This is needed to reconstructpath from device to its root hub to build device path.
Signed-off-by: Gleb Natapov <gleb@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
usb: class specific interface requests
Mass Storage Reset and Get Max LUN are class specific requests, butthey were not marked as such in hw/usb-msd.c, moved thereforeClassInterfaceRequest and ClassInterfaceOutRequest from hw/usb-net.cto hw/usb.h.Furthermore there was a problem in hw/usb-ohci.c when using DEBUG...
usb-net: use qdev for -usbdevice
Rebased to master, adapted to device renaming by armbru,no other changes.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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...
usb-serial and braille: use qdev for -usbdevice
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 devicebeing attached (i.e. plugged into a usb port) automatically aftersuccessfull init().
Use cases (see next patches):...
usb-storage: use qdev for -usbdevice
Hook up usb_msd_init.
Also rework handling of encrypted block devices,move the code out vl.c.
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 acallback for -usbdevice parameter parsing.
The new usbdevice_create() function walks the qdev driver list and looks...
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....
switch usb bus to inplace allocation.
Fix sys-queue.h conflict for good
Problem: Our file sys-queue.h is a copy of the BSD file, but there aresome additions and it's not entirely compatible. Because of that, there havebeen conflicts with system headers on BSD systems. Some hacks have beenintroduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896,...
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()...
Follow coding conventions
Remove explicit struct qualifiers and rename structure types.
Signed-off-by: Paul Brook <paul@codesourcery.com>
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 servicesgain a new parameter (mon) that will once refer to the monitor instancethe output is supposed to appear on. However, the argument remains...
monitor: Rework modal password input (Jan Kiszka)
Currently, waiting for the user to type in some password blocks thewhole VM because monitor_readline starts its own I/O loop. And this loopalso screws up reading passwords from virtual console.
Patch below fixes the shortcomings by using normal I/O processing also...
monitor: Rework early disk password inquiry (Jan Kiszka)
Reading the passwords for encrypted hard disks during early startup isbroken (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...
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
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
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 tofind guest USB address of the host device....
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
usb: generic packet handler cleanup and documentation (Max Krasnyansky)
A bit better documentation of the USB device API, namelyreturn codes.Rewrite of usb_generic_handle_packet() to make it morereable and easier to follow.
Signed-off-by: Max Krasnyansky <maxk@kernel.org>...
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 handlewildcards. So for example if you do something like...
husb: support for USB host device auto disconnect (Max Krasnyansky)
I got really annoyed by the fact that you have to manually dousb_del in the monitor when host device is unplugged and decidedto fix it :)
Basically we now automatically remove guest USB device...
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
Inventra MUSB-HDRC host-mode USB.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4232 c046a42c-6fe2-441c-8c8c-71466251a162
USB-to-serial device (Samuel Thibault).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3914 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
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
Add USB HID keyboard.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2996 c046a42c-6fe2-441c-8c8c-71466251a162
Wacom PenPartner tablet (virtual USB device).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2977 c046a42c-6fe2-441c-8c8c-71466251a162
Use the correct PCI IDs for Malta.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2945 c046a42c-6fe2-441c-8c8c-71466251a162
Unify IRQ handling.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2635 c046a42c-6fe2-441c-8c8c-71466251a162
OHCI USB PXA support (Andrzej Zaborowski).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2490 c046a42c-6fe2-441c-8c8c-71466251a162
Fix typo, by Ed Swierk.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2408 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
OHCI USB host emulation.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1928 c046a42c-6fe2-441c-8c8c-71466251a162
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
USB tablet support (Brad Campbell, Anthony Liguori)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1810 c046a42c-6fe2-441c-8c8c-71466251a162
USB user interface
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1603 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
initial USB support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1597 c046a42c-6fe2-441c-8c8c-71466251a162