usb-hub: clear suspend on detach
authorGerd Hoffmann <kraxel@redhat.com>
Wed, 12 Sep 2018 11:40:12 +0000 (13:40 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 1 Oct 2018 08:49:54 +0000 (10:49 +0200)
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20180912114012.6034-1-kraxel@redhat.com

hw/usb/dev-hub.c

index 5d9743ef93439bf41428092a279319a65503041a..dc368179d16747646997bb12f833db170c6d0aa8 100644 (file)
@@ -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);
 }