summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2018-09-12 13:40:12 +0200
committerGerd Hoffmann <kraxel@redhat.com>2018-10-01 10:49:54 +0200
commit3e9191acb797e4298adb853bf6c75cd31af47ef9 (patch)
treedb8a52176266899fe595e821b399645e748cee6c
parentf7c36a754c0a597e6c397e6e21e03798fc2eee69 (diff)
usb-hub: clear suspend on detach
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180912114012.6034-1-kraxel@redhat.com
-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);
}