cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
b38b0f
From 99588fb3673a3315a66f7890b25bdca9b829925e Mon Sep 17 00:00:00 2001
69f3e1
From: Gerd Hoffmann <kraxel@redhat.com>
69f3e1
Date: Tue, 4 Jun 2019 05:12:44 +0100
b38b0f
Subject: [PATCH 2/8] usb: call reset handler before updating state
69f3e1
MIME-Version: 1.0
69f3e1
Content-Type: text/plain; charset=UTF-8
69f3e1
Content-Transfer-Encoding: 8bit
69f3e1
69f3e1
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
69f3e1
Message-id: <20190604051246.11374-3-kraxel@redhat.com>
69f3e1
Patchwork-id: 88471
69f3e1
O-Subject: [RHEL-8.1.0 qemu-kvm PATCH 2/4] usb: call reset handler before updating state
b38b0f
Bugzilla: 1713677
69f3e1
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
69f3e1
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
69f3e1
RH-Acked-by: Max Reitz <mreitz@redhat.com>
69f3e1
69f3e1
That way the device reset handler can see what
69f3e1
the before-reset state of the device is.
69f3e1
69f3e1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
69f3e1
Message-id: 20190522094702.17619-2-kraxel@redhat.com
69f3e1
(cherry picked from commit 7ed4657396add28382081a15557c78cd480c1cf1)
69f3e1
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
69f3e1
---
69f3e1
 hw/usb/core.c | 2 +-
69f3e1
 1 file changed, 1 insertion(+), 1 deletion(-)
69f3e1
69f3e1
diff --git a/hw/usb/core.c b/hw/usb/core.c
69f3e1
index 241ae66..07b67fb 100644
69f3e1
--- a/hw/usb/core.c
69f3e1
+++ b/hw/usb/core.c
69f3e1
@@ -87,10 +87,10 @@ void usb_device_reset(USBDevice *dev)
69f3e1
     if (dev == NULL || !dev->attached) {
69f3e1
         return;
69f3e1
     }
69f3e1
+    usb_device_handle_reset(dev);
69f3e1
     dev->remote_wakeup = 0;
69f3e1
     dev->addr = 0;
69f3e1
     dev->state = USB_STATE_DEFAULT;
69f3e1
-    usb_device_handle_reset(dev);
69f3e1
 }
69f3e1
 
69f3e1
 void usb_wakeup(USBEndpoint *ep, unsigned int stream)
69f3e1
-- 
69f3e1
1.8.3.1
69f3e1