From 3e9191acb797e4298adb853bf6c75cd31af47ef9 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann <kraxel@redhat.com> Date: Wed, 12 Sep 2018 13:40:12 +0200 Subject: [PATCH] usb-hub: clear suspend on detach Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180912114012.6034-1-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); }