aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2015-11-03 14:09:59 +0000
committerPeter Maydell <peter.maydell@linaro.org>2015-11-03 14:09:59 +0000
commit19bb5467135df4b234af2c93bf6c50284158d6ca (patch)
treee154fe0f6c626476879a75ae3e109b02efc9663e /hw
parent130d0bc6594d0cc6591d00312841891b3c187b07 (diff)
parenta9be4e7c48c4892c836bda1be4d550bb1a6732bd (diff)
downloadqemu-19bb5467135df4b234af2c93bf6c50284158d6ca.zip
qemu-19bb5467135df4b234af2c93bf6c50284158d6ca.tar.gz
qemu-19bb5467135df4b234af2c93bf6c50284158d6ca.tar.bz2
Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-20151103-1' into staging
usb: two bugfixes for ehci & usb-host. # gpg: Signature made Tue 03 Nov 2015 10:57:28 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-20151103-1: usb-host: fix usb3ep0quirk test ehci: clear suspend bit on detach Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/usb/hcd-ehci.c2
-rw-r--r--hw/usb/host-libusb.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
index 64a54c6..4e2161b 100644
--- a/hw/usb/hcd-ehci.c
+++ b/hw/usb/hcd-ehci.c
@@ -726,7 +726,7 @@ static void ehci_detach(USBPort *port)
ehci_queues_rip_device(s, port->dev, 0);
ehci_queues_rip_device(s, port->dev, 1);
- *portsc &= ~(PORTSC_CONNECT|PORTSC_PED);
+ *portsc &= ~(PORTSC_CONNECT|PORTSC_PED|PORTSC_SUSPEND);
*portsc |= PORTSC_CSC;
ehci_raise_irq(s, USBSTS_PCD);
diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
index 7695a97..3f8e540 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;