diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2015-10-23 14:27:10 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2015-11-03 11:56:23 +0100 |
commit | a9be4e7c48c4892c836bda1be4d550bb1a6732bd (patch) | |
tree | 1a14656ea7ab0249a0e8dbce57a2f42229022088 /hw/usb/host-libusb.c | |
parent | cbf82fa01e6fd4ecb234b235b10ffce548154a95 (diff) |
usb-host: fix usb3ep0quirk test
usb->speed is the usb speed the device is actually running on in the
qemu emulation (i.e. from the guests point of view). So when plugging
usb3 devices into ehci hostadapter this is HIGH not SUPER.
To figure whenever the host talks to the device with superspeed we
have to check speedmask instead and see whenever the superspeed bit
is set there.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 1445603230-11840-1-git-send-email-kraxel@redhat.com
Diffstat (limited to 'hw/usb/host-libusb.c')
-rw-r--r-- | hw/usb/host-libusb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index 7695a97143..3f8e540bd2 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -1240,7 +1240,7 @@ static void usb_host_handle_control(USBDevice *udev, USBPacket *p, /* Fix up USB-3 ep0 maxpacket size to allow superspeed connected devices * to work redirected to a not superspeed capable hcd */ - if (udev->speed == USB_SPEED_SUPER && + if ((udev->speedmask & USB_SPEED_MASK_SUPER) && !(udev->port->speedmask & USB_SPEED_MASK_SUPER) && request == 0x8006 && value == 0x100 && index == 0) { r->usb3ep0quirk = true; |