]> git.proxmox.com Git - qemu.git/commit
usb: move USB_REQ_{GET,SET}_CONFIGURATION handling to common code
authorGerd Hoffmann <kraxel@redhat.com>
Fri, 26 Nov 2010 19:20:41 +0000 (20:20 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 11 Jan 2011 14:56:01 +0000 (15:56 +0100)
commita980a065fb5e86d6dec337e6cb6ff432f1a143c9
tree770139308761e2eb59bea5b1520e5b5dd7431308
parent41c6abbdeb5a86a135ee80a30541ecf52ffd3e23
usb: move USB_REQ_{GET,SET}_CONFIGURATION handling to common code

This patch adds fields to the USBDevice struct for the current
speed (hard-wired to full speed for now) and current device
configuration.  Also a init function is added which inializes
these fields.  This allows USB_REQ_{GET,SET}_CONFIGURATION
handling to be moved to common code.

For most drivers the conversion is trivial ad they support a single
configuration only anyway.  One exception is bluetooth where some
device-specific setup code runs after get/set configuration.  The
other is usb-net which actually has two configurations so the
the code to check for the active configuration has been adapted.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb-bt.c
hw/usb-desc.c
hw/usb-desc.h
hw/usb-hid.c
hw/usb-hub.c
hw/usb-msd.c
hw/usb-net.c
hw/usb-serial.c
hw/usb-wacom.c
hw/usb.h
trace-events