History | View | Annotate | Download (15.4 kB)
usb: change VID/PID for usb-hub and usb-msd to prevent conflict
Some USB drivers, for example USBASPI.SYS, will skip different type ofdevice which has same VID/PID. The following patch helps preventingusb-msd being skipped by the driver.
Signed-off-by: Roy Tam <roytam@gmail.com>...
usb-hub: wakeup on attach
When attaching a new device we must send a wakeup request to the roothub, otherwise the guest will not notice the new device in case theusb hub is suspended.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb-hub: don't trigger assert on packet completion.
Calling usb_packet_complete() recursively when passing up the completionevent up the chain for devices connected via usb hub will trigger anassert. So don't do that, make the usb hub emulation call the upstream...
usb-hub: need to check dev->attached
commit 891fb2cd4592b6fe76106a69e0ca40efbf82726a did that for all hostcontrollers, the usb hub was left out by accident.
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: 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-hub: remove unused descriptor arrays
Somehow they where left over when converting the hubto the new usb descriptor infrastructure ...
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: 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: 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>
usb: move complete callback to port ops
usb hub: add migration support
usb: zap pdev from usbport
It isn't needed any more.
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 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: hub: remote wakeup support.
This patch makes the usb hub handle remote wakeup requests from devicesproperly by updating the port status register and forwarding the wakeupto the upstream port.
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 hub: use new descriptor infrastructure.
Switch the usb hub driver over to thenew descriptor infrastructure.
It also removes the nr_ports variable and MAX_PORTS define andintroduces a NUM_PORTS define instead. The numver of ports was(and still is) fixed at 8 anyway....
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>
Introduce fw_name field to DeviceInfo structure.
Add "fw_name" to DeviceInfo to use in device path building. Incontrast to "name" "fw_name" should refer to functionality deviceprovides instead of particular device model like "name" does.
Signed-off-by: Gleb Natapov <gleb@redhat.com>...
usb: remove dead assignments, spotted by clang analyzer
Value stored is never read.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
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: 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: 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 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
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
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
patch in bLength for hub descriptor (Lonnie Mendez)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1905 c046a42c-6fe2-441c-8c8c-71466251a162
fixes for more than 8 ports - return NAK if no change - FreeBSD workaround (Lonnie Mendez)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1872 c046a42c-6fe2-441c-8c8c-71466251a162
do not set PORT_STAT_C_ENABLE when doing port reset (Lonnie Mendez)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1849 c046a42c-6fe2-441c-8c8c-71466251a162
separate file for usb hub device
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1848 c046a42c-6fe2-441c-8c8c-71466251a162