aboutsummaryrefslogtreecommitdiff
path: root/hw/usb/host-libusb.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-11-13 10:54:05 +0000
committerPeter Maydell <peter.maydell@linaro.org>2014-11-13 10:54:05 +0000
commit410bd787bf44ef95192507802967a0edce19955f (patch)
tree4dea08f06cf5ca58fd26893c10aa3ecf371f727e /hw/usb/host-libusb.c
parente0d0041ec6dce1b8bfb3f66e9e4b8b9cd7e34806 (diff)
parent79ae25af1569a50a0ec799901a1bb280c088f121 (diff)
Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-20141112-1' into staging
usb bugfixes for 2.2 # gpg: Signature made Wed 12 Nov 2014 14:35:09 GMT using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-usb-20141112-1: usb-host: fix usb_host_speed_compat tyops xhci: add sanity checks to xhci_lookup_uport Provide the missing LIBUSB_LOG_LEVEL_* for older libusb or FreeBSD. Providing just the needed value as a defined. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/usb/host-libusb.c')
-rw-r--r--hw/usb/host-libusb.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
index d2d161bc6e..a5f9dab0cd 100644
--- a/hw/usb/host-libusb.c
+++ b/hw/usb/host-libusb.c
@@ -143,6 +143,12 @@ static void usb_host_attach_kernel(USBHostDevice *s);
/* ------------------------------------------------------------------------ */
+#ifndef LIBUSB_LOG_LEVEL_WARNING /* older libusb didn't define these */
+#define LIBUSB_LOG_LEVEL_WARNING 2
+#endif
+
+/* ------------------------------------------------------------------------ */
+
#define CONTROL_TIMEOUT 10000 /* 10 sec */
#define BULK_TIMEOUT 0 /* unlimited */
#define INTR_TIMEOUT 0 /* unlimited */
@@ -743,13 +749,13 @@ static void usb_host_speed_compat(USBHostDevice *s)
udev->speedmask = (1 << udev->speed);
if (udev->speed == USB_SPEED_SUPER && compat_high) {
- udev->speedmask |= USB_SPEED_HIGH;
+ udev->speedmask |= USB_SPEED_MASK_HIGH;
}
if (udev->speed == USB_SPEED_SUPER && compat_full) {
- udev->speedmask |= USB_SPEED_FULL;
+ udev->speedmask |= USB_SPEED_MASK_FULL;
}
if (udev->speed == USB_SPEED_HIGH && compat_full) {
- udev->speedmask |= USB_SPEED_FULL;
+ udev->speedmask |= USB_SPEED_MASK_FULL;
}
}