summaryrefslogtreecommitdiff
path: root/hw/usb/dev-hub.c
AgeCommit message (Collapse)AuthorFilesLines
2014-02-18usb: Remove magic constants from device bmAttributesPantelis Koukousoulas1-1/+2
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>
2013-09-02Revert "usb-hub: report status changes only once"Gerd Hoffmann1-5/+1
This reverts commit a309ee6e0a256f690760abfba44fceaa52a7c2f3. This isn't in line with the usb specification and adds regressions, win7 fails to drive the usb hub for example. Was added because it "solved" the issue of hubs interacting badly with the xhci host controller. Now with the root cause being fixed in xhci (commit <FIXME>) we can revert this one. Cc: qemu-stable@nongnu.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-09-02usb-hub: add tracepoint for status reportsGerd Hoffmann1-0/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-07-29devices: Associate devices to their logical categoryMarcel Apfelbaum1-0/+1
The category will be used to sort the devices displayed in the command line help. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Message-id: 1375107465-25767-4-git-send-email-marcel.a@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-03usb-hub: report status changes only onceGerd Hoffmann1-1/+5
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-04-03usb-hub: limit chain lengthGerd Hoffmann1-0/+6
USB supports up to 5 hubs chained. Catch attempts to chain more. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-02-19usb-core: usb3 streamsGerd Hoffmann1-5/+5
This patch adds support for usb3 streams to the usb subsystem core. This is just adding a streams field / parameter in a number of places. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-01-10Make all static TypeInfos constAndreas Färber1-1/+1
Since 39bffca2030950ef6efe57c2fac8327a45ae1015 (qdev: register all types natively through QEMU Object Model), TypeInfo as used in the common, non-iterative pattern is no longer amended with information and should therefore be const. Fix the documented QOM examples: sed -i 's/static TypeInfo/static const TypeInfo/g' include/qom/object.h Since frequently the wrong examples are being copied by contributors of new devices, fix all types in the tree: sed -i 's/^static TypeInfo/static const TypeInfo/g' */*.c sed -i 's/^static TypeInfo/static const TypeInfo/g' */*/*.c This also avoids to piggy-back these changes onto real functional changes or other refactorings. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-12-04usb: Call wakeup when data becomes available for all devices with int epsHans de Goede1-0/+2
This is necessary for proper interaction with the xhci controller, and it will allow other hcds to lower there frame timer while waiting for interrupt data. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-08usb: split packet result into actual_length + statusHans de Goede1-21/+13
Since with the ehci and xhci controllers a single packet can be larger then maxpacketsize, it is possible for the result of a single packet to be both having transferred some data as well as the transfer to have an error. An example would be an input transfer from a bulk endpoint successfully receiving 1 or more maxpacketsize packets from the device, followed by a packet signalling halt. While already touching all the devices and controllers handle_packet / handle_data / handle_control code, also change the return type of these functions to void, solely storing the status in the packet. To make the code paths for regular versus async packet handling more uniform. This patch unfortunately is somewhat invasive, since makeing the qemu usb core deal with this requires changes everywhere. This patch only prepares the usb core for this, all the hcd / device changes are done in such a way that there are no functional changes. This patch has been tested with uhci and ehci hcds, together with usb-audio, usb-hid and usb-storage devices, as well as with usb-redir redirection with a wide variety of real devices. Note that there is usually no need to directly set packet->actual_length form devices handle_data callback, as that is done by usb_packet_copy() Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-06-19Allow machines to configure the QEMU_VERSION that's exposed via hardwareCrístian Viana1-1/+1
QEMU exposes its version to the guest's hardware and in some cases that is wrong (e.g. Windows prints messages about driver updates when you switch the QEMU version). There is a new field now on the struct QEmuMachine, hw_version, which may contain the version that the specific machine should report. If that field is set, then that machine will report that version to the guest. Signed-off-by: Crístian Viana <vianac@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-04-26usb: add serial number generatorGerd Hoffmann1-0/+1
This patch adds a function which creates unique serial numbers for usb devices and puts it into use. Windows guests tend to become unhappy if they find two identical usb devices in the system. Effects range from non-functional devices (with yellow exclamation mark in device manager) to BSODs. Handing out unique serial numbers to devices fixes this. With this patch applied almost all emulated devices get a generated, unique serial number. There are two exceptions: * usb-storage devices will prefer a user-specified serial number and will only get a generated number in case the serial property is unset. * usb-hid devices keep the fixed serial number "42" as it is used to signal "remote wakeup actually works". See commit 7b074a22dab4bdda9864b933f1bc811a3db42845 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-04-17usb-hub: add tracepointsGerd Hoffmann1-2/+41
Add tracepoints to the usb hub emulation. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-03-13usb: the big renameGerd Hoffmann1-0/+549
Reorganize usb source files. Create a new hw/usb/ directory and move all usb source code to that place. Also make filenames a bit more descriptive. Host adapters are prefixed with "hch-" now, usb device emulations are prefixed with "dev-". Fixup paths Makefile and include paths to make it compile. No code changes. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>