From 24300291c98529f7d5a00ebdf6fdea68f8af97f5 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 14 Aug 2019 09:47:34 +0100 Subject: [PATCH 2/3] usb-hub: clear suspend on detach MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RH-Author: Gerd Hoffmann Message-id: <20190814094734.18110-2-kraxel@redhat.com> Patchwork-id: 89977 O-Subject: [RHEL-8.1.0 qemu-kvm PATCH 1/1] usb-hub: clear suspend on detach Bugzilla: 1619661 RH-Acked-by: John Snow RH-Acked-by: Markus Armbruster RH-Acked-by: Philippe Mathieu-Daudé Signed-off-by: Gerd Hoffmann Message-id: 20180912114012.6034-1-kraxel@redhat.com (cherry picked from commit 3e9191acb797e4298adb853bf6c75cd31af47ef9) Signed-off-by: Danilo C. L. de Paula --- 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 752e30c..2452e88 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); } -- 1.8.3.1