Age | Commit message (Collapse) | Author |
|
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
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>
|
|
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
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>
|
|
Add support for creating BOS descriptor and
device cappability descriptors.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Add support for building superspeed endpoint companion descriptors,
create them for superspeed usb devices.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Add superspeed descriptor entry to USBDesc,
advertise superspeed support when present.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
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>
|
|
Add endpoint descriptor substruct to USBDescriptor,
use it in the descriptor generator code.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Add interface descriptor substruct to USBDescriptor,
use it in the descriptor generator code.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Add config descriptor substruct to USBDescriptor,
use it in the descriptor generator code.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Add device qualifier substruct to USBDescriptor,
use it in the descriptor generator code.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
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>
|
|
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>
|