summaryrefslogtreecommitdiff
path: root/hw/usb/desc.h
AgeCommit message (Collapse)AuthorFilesLines
2016-02-23all: Clean up includesPeter Maydell1-1/+0
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Eric Blake <eblake@redhat.com>
2014-04-22usb: add CompatibleID support to msosGerd Hoffmann1-0/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-01-16usb: add support for microsoft os descriptorsGerd Hoffmann1-1/+10
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>
2013-11-28usb: move usb_{hi,lo} helpers to header file.Gerd Hoffmann1-0/+11
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-08usb: split packet result into actual_length + statusHans de Goede1-1/+2
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-09-11usb3: bos decriptorGerd Hoffmann1-0/+25
Add support for creating BOS descriptor and device cappability descriptors. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-09-11usb3: superspeed endpoint companionGerd Hoffmann1-5/+21
Add support for building superspeed endpoint companion descriptors, create them for superspeed usb devices. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-09-11usb3: superspeed descriptorsGerd Hoffmann1-0/+1
Add superspeed descriptor entry to USBDesc, advertise superspeed support when present. Signed-off-by: Gerd Hoffmann <kraxel@redhat.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: use USBDescriptor for endpoint descriptors.Gerd Hoffmann1-0/+9
Add endpoint descriptor substruct to USBDescriptor, use it in the descriptor generator code. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-04-17usb: use USBDescriptor for interface descriptors.Gerd Hoffmann1-0/+9
Add interface descriptor substruct to USBDescriptor, use it in the descriptor generator code. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-04-17usb: use USBDescriptor for config descriptors.Gerd Hoffmann1-0/+9
Add config descriptor substruct to USBDescriptor, use it in the descriptor generator code. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-04-17usb: use USBDescriptor for device qualifier descriptors.Gerd Hoffmann1-0/+10
Add device qualifier substruct to USBDescriptor, use it in the descriptor generator code. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-04-17usb: add USBDescriptor, use for device descriptors.Gerd Hoffmann1-0/+26
This patch adds a new type for the binary representation of usb descriptors. It is put into use for the descriptor generator code where the struct replaces the hard-coded offsets. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-03-13usb: the big renameGerd Hoffmann1-0/+117
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>