summaryrefslogtreecommitdiffstats
path: root/include/hw/usb.h
Commit message (Collapse)AuthorAgeFilesLines
* usb: Remove unused functionsThomas Huth2015-04-301-5/+0
| | | | | | | | | | Delete set_usb_string(), usb_ep_get_ifnum(), usb_ep_get_max_packet_size() usb_ep_get_max_streams() and usb_ep_set_pipeline() since they are not used anymore. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* usb: Propagate errors through usb_register_companion()Markus Armbruster2015-03-171-5/+7
| | | | | | | | This loses the messages explaining the error printed with error_printf_unless_qmp(). The next commit will make up for the loss. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* hmp: Name HMP info handler functions hmp_info_SUBCOMMAND()Markus Armbruster2015-02-181-1/+1
| | | | | | | | | | | | | | | | | | | Some are called do_info_SUBCOMMAND() (old ones, usually), some hmp_info_SUBCOMMAND(), some SUBCOMMAND_info(), sometimes SUBCOMMAND pointlessly differs in spelling. Normalize to hmp_info_SUBCOMMAND(), where SUBCOMMAND is exactly the subcommand name with '-' replaced by '_'. Exceptions: * sun4m_irq_info(), sun4m_pic_info() renamed to sun4m_hmp_info_irq(), sun4m_hmp_info_pic(). * lm32_irq_info(), lm32_pic_info() renamed to lm32_hmp_info_irq(), lm32_hmp_info_pic(). Signed-off-by: Markus Armbruster <armbru@redhat.com>
* usb-bus: introduce a wrapper function to check speedGonglei2014-09-231-0/+1
| | | | | | | | | | In this way, we can check speed directly, don't need call usb_device_attach(), which has other conditions, such as checking the chardev is open. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* usb-bus: remove "init" from USBDeviceClass structGonglei2014-09-231-2/+0
| | | | | | | | | All usb-bus devices are realized by realize(), remove init callback function from USBDeviceClass struct. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* usb-bus: convert USBDeviceClass init to realizeGonglei2014-09-231-2/+8
| | | | | | | | | | | | | Add "realize/unrealize" in USBDeviceClass, which has errp as a parameter. So all the implementations now use error_setg instead of error_report for reporting error. Note: this patch still keep "init" in USBDeviceClass, and call kclass->init in usb_device_realize(), avoid breaking git bisect. After realize all usb devices, will be removed. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* usb: add usb_bus_release functionGonglei2014-08-291-0/+1
| | | | | | | | add global variables releasing logic when the usb buses were removed or hot-unpluged. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* hw/timer: Move extern declaration from .c to .h fileStefan Weil2014-08-091-1/+6
| | | | | | | | | | | | | This fixes a warning from smatch (static code analyser). Fix also the comment with the renamed source file name. Signed-off-by: Stefan Weil <sw@weilnetz.de> hw/timer/tusb6010.c | 3 --- include/hw/usb.h | 7 ++++++- 2 files changed, 6 insertions(+), 4 deletions(-) Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* usb: add usb_pick_speedGerd Hoffmann2014-06-021-0/+1
| | | | | | | | | | | | | | We can pick the usb port speed in generic code, by looking at the port and device speed masks and looking for the fastest match. So add a function to do exactly that, and drop the speed setting code from usb_desc_attach as it isn't needed any more. This way we can set the device speed before calling port->ops->attach, which fixes some xhci hotplug issues. https://bugzilla.redhat.com/show_bug.cgi?id=1046873 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* usb: Remove magic constants from device bmAttributesPantelis Koukousoulas2014-02-181-0/+5
| | | | | | | | Replace magic constants in device bmAttributes with symbolic ones from Linux kernel ch9.h Signed-off-by: Pantelis Koukousoulas <pktoss@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* usb: add support for microsoft os descriptorsGerd Hoffmann2014-01-161-0/+3
| | | | | | | | | | | This patch adds support for special usb descriptors used by microsoft windows. They allow more fine-grained control over driver binding and adding entries to the registry for configuration. As this is a guest-visible change the "msos-desc" compat property has been added to turn this off for 1.7 + older Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* usb: add vendor request definesGerd Hoffmann2013-11-281-4/+13
| | | | | | | | Add defines for vendor specific usb control requests. Group defines by Device / Interface / Endpoint while being at it. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* usb: Add usb_device_alloc/free_streamsHans de Goede2013-11-261-0/+12
| | | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* usb: Add max_streams attribute to endpoint infoHans de Goede2013-11-261-0/+3
| | | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* Remove dev-bluetooth.c dependency from vl.cMiroslav Rezanina2013-09-101-3/+0
| | | | | | | | Use usb_legacy_register handling to create bt-dongle device and remove code dependency from vl.c so CONFIG_USB_BLUETOOTH can be disabled. Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* usb: Pass size to usb_bus_new()Andreas Färber2013-08-301-1/+2
| | | | | | | | | To be passed to qbus_create_inplace(). Use DEVICE() cast to avoid a direct parent field access. Reviewed-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
* usb: add serial bus propertyGerd Hoffmann2013-06-241-0/+1
| | | | | | | | This patch adds a serial property for all usb devices, which can be used to set the serial number of a usb device (as listed by lsusb -v) to a specific value. Applies to emulated devices only. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* Merge remote-tracking branch 'bonzini/hw-dirs' into stagingAnthony Liguori2013-04-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # By Paolo Bonzini # Via Paolo Bonzini * bonzini/hw-dirs: (35 commits) hw: move private headers to hw/ subdirectories. MAINTAINERS: update for source code movement hw: move last file to hw/arm/ hw: move hw/kvm/ to hw/i386/kvm hw: move ARM CPU cores to hw/cpu/, configure with default-configs/ hw: move other devices to hw/misc/, configure with default-configs/ hw: move NVRAM interfaces to hw/nvram/, configure with default-configs/ hw: move GPIO interfaces to hw/gpio/, configure with default-configs/ hw: move interrupt controllers to hw/intc/, configure with default-configs/ hw: move DMA controllers to hw/dma/, configure with default-configs/ hw: move VFIO and ivshmem to hw/misc/ hw: move PCI bridges to hw/pci-* or hw/ARCH hw: move SD/MMC devices to hw/sd/, configure with default-configs/ hw: move timer devices to hw/timer/, configure with default-configs/ hw: move ISA bridges and devices to hw/isa/, configure with default-configs/ hw: move char devices to hw/char/, configure via default-configs/ hw: move more files to hw/xen/ hw: move SCSI controllers to hw/scsi/, configure via default-configs/ hw: move SSI controllers to hw/ssi/, configure via default-configs/ hw: move I2C controllers to hw/i2c/, configure via default-configs/ ... Message-id: 1365442249-18259-1-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* hw: move headers to include/Paolo Bonzini2013-04-081-0/+570
Many of these should be cleaned up with proper qdev-/QOM-ification. Right now there are many catch-all headers in include/hw/ARCH depending on cpu.h, and this makes it necessary to compile these files per-target. However, fixing this does not belong in these patches. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
OpenPOWER on IntegriCloud