summary refs log tree commit diff stats
path: root/hw/usb/dev-hub.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-10-01 12:33:18 +0100
committerPeter Maydell <peter.maydell@linaro.org>2018-10-01 12:33:18 +0100
commit24c3833717d2528b98833bb5ebf4397a5512043f (patch)
treec0061b7a88fc8b059544ec122119b1ad808d0aad /hw/usb/dev-hub.c
parentcc28dce2eccdcfc2660b8bf680eaa340ef2067d5 (diff)
parenta60f39a4681b369bdcc78a9d1a1067d4a6bb8736 (diff)
downloadfocaccia-qemu-24c3833717d2528b98833bb5ebf4397a5512043f.tar.gz
focaccia-qemu-24c3833717d2528b98833bb5ebf4397a5512043f.zip
Merge remote-tracking branch 'remotes/kraxel/tags/usb-20181001-pull-request' into staging
usb: fixes for mtp, hub and ohci.

# gpg: Signature made Mon 01 Oct 2018 10:28:36 BST
# gpg:                using RSA key 4CB6D8EED3E87138
# 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>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/usb-20181001-pull-request:
  ohci: set effectively usb frame rate to 1kHz
  usb-hub: clear suspend on detach
  usb-mtp: reset ObjectInfo dataset size on cleanup
  doc: replace x-root with rootdir for usb-mtp
  usb-mtp: fix error conditions for write operation

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/usb/dev-hub.c')
-rw-r--r--hw/usb/dev-hub.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/usb/dev-hub.c b/hw/usb/dev-hub.c
index 5d9743ef93..dc368179d1 100644
--- a/hw/usb/dev-hub.c
+++ b/hw/usb/dev-hub.c
@@ -191,6 +191,10 @@ static void usb_hub_detach(USBPort *port1)
         port->wPortStatus &= ~PORT_STAT_ENABLE;
         port->wPortChange |= PORT_STAT_C_ENABLE;
     }
+    if (port->wPortStatus & PORT_STAT_SUSPEND) {
+        port->wPortStatus &= ~PORT_STAT_SUSPEND;
+        port->wPortChange |= PORT_STAT_C_SUSPEND;
+    }
     usb_wakeup(s->intr, 0);
 }