[Qemu-devel] [PATCH] usb-hub: clear suspend on detach

Gerd Hoffmann posted 1 patch 7 years, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180912114012.6034-1-kraxel@redhat.com
Test docker-clang@ubuntu failed
Test checkpatch passed
hw/usb/dev-hub.c | 4 ++++
1 file changed, 4 insertions(+)
[Qemu-devel] [PATCH] usb-hub: clear suspend on detach
Posted by Gerd Hoffmann 7 years, 1 month ago
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/usb/dev-hub.c | 4 ++++
 1 file changed, 4 insertions(+)

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);
 }
 
-- 
2.9.3