yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
b38b0f
From 24300291c98529f7d5a00ebdf6fdea68f8af97f5 Mon Sep 17 00:00:00 2001
b38b0f
From: Gerd Hoffmann <kraxel@redhat.com>
b38b0f
Date: Wed, 14 Aug 2019 09:47:34 +0100
b38b0f
Subject: [PATCH 2/3] usb-hub: clear suspend on detach
b38b0f
MIME-Version: 1.0
b38b0f
Content-Type: text/plain; charset=UTF-8
b38b0f
Content-Transfer-Encoding: 8bit
b38b0f
b38b0f
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
b38b0f
Message-id: <20190814094734.18110-2-kraxel@redhat.com>
b38b0f
Patchwork-id: 89977
b38b0f
O-Subject: [RHEL-8.1.0 qemu-kvm PATCH 1/1] usb-hub: clear suspend on detach
b38b0f
Bugzilla: 1619661
b38b0f
RH-Acked-by: John Snow <jsnow@redhat.com>
b38b0f
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
b38b0f
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
b38b0f
b38b0f
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
b38b0f
Message-id: 20180912114012.6034-1-kraxel@redhat.com
b38b0f
(cherry picked from commit 3e9191acb797e4298adb853bf6c75cd31af47ef9)
b38b0f
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
b38b0f
---
b38b0f
 hw/usb/dev-hub.c | 4 ++++
b38b0f
 1 file changed, 4 insertions(+)
b38b0f
b38b0f
diff --git a/hw/usb/dev-hub.c b/hw/usb/dev-hub.c
b38b0f
index 752e30c..2452e88 100644
b38b0f
--- a/hw/usb/dev-hub.c
b38b0f
+++ b/hw/usb/dev-hub.c
b38b0f
@@ -191,6 +191,10 @@ static void usb_hub_detach(USBPort *port1)
b38b0f
         port->wPortStatus &= ~PORT_STAT_ENABLE;
b38b0f
         port->wPortChange |= PORT_STAT_C_ENABLE;
b38b0f
     }
b38b0f
+    if (port->wPortStatus & PORT_STAT_SUSPEND) {
b38b0f
+        port->wPortStatus &= ~PORT_STAT_SUSPEND;
b38b0f
+        port->wPortChange |= PORT_STAT_C_SUSPEND;
b38b0f
+    }
b38b0f
     usb_wakeup(s->intr, 0);
b38b0f
 }
b38b0f
 
b38b0f
-- 
b38b0f
1.8.3.1
b38b0f