aboutsummaryrefslogtreecommitdiff
path: root/hw/usb/host-libusb.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2013-06-24 14:33:00 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2013-06-24 14:33:00 -0500
commit89f204d2c60fbf3e0c5af1ff1681e57c9f057178 (patch)
treee459490511249032a62d792357bfe7c09c4eef02 /hw/usb/host-libusb.c
parent21ca4a5bb3cde109e68059ee357b3114afbc51e4 (diff)
parent93c8e4dc386a243d7d417567d81dc1f1698478a4 (diff)
Merge remote-tracking branch 'kraxel/usb.84' into staging
# By Andreas Färber (3) and others # Via Gerd Hoffmann * kraxel/usb.84: usb: fix serial number for hid devices usb: add serial bus property usb-host-libusb: set USB_DEV_FLAG_IS_HOST usb/host-libusb: Fix building with libusb git master code usb/hcd-ehci: Add Faraday FUSBH200 support usb/hcd-ehci: Replace PORTSC macros with variables usb/hcd-ehci: Add Tegra2 SysBus EHCI device usb/hcd-ehci: Split off instance_init from realize usb/hcd-ehci-sysbus: Convert to QOM realize
Diffstat (limited to 'hw/usb/host-libusb.c')
-rw-r--r--hw/usb/host-libusb.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
index 3a582c526d..e2f3cc8ade 100644
--- a/hw/usb/host-libusb.c
+++ b/hw/usb/host-libusb.c
@@ -241,7 +241,11 @@ static int usb_host_get_port(libusb_device *dev, char *port, size_t len)
size_t off;
int rc, i;
+#if LIBUSBX_API_VERSION >= 0x01000102
+ rc = libusb_get_port_numbers(dev, path, 7);
+#else
rc = libusb_get_port_path(ctx, dev, path, 7);
+#endif
if (rc < 0) {
return 0;
}
@@ -891,6 +895,7 @@ static int usb_host_initfn(USBDevice *udev)
USBHostDevice *s = USB_HOST_DEVICE(udev);
loglevel = s->loglevel;
+ udev->flags |= (1 << USB_DEV_FLAG_IS_HOST);
udev->auto_attach = 0;
QTAILQ_INIT(&s->requests);
QTAILQ_INIT(&s->isorings);